| 전자부품 데이터시트 검색엔진 |
|
PM0237 데이터시트(PDF) 56 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
PM0237 데이터시트(HTML) 56 Page - STMicroelectronics |
|
56 / 88 page ![]() Design an application using BlueNRG, BlueNRG-MS ACI APIs PM0237 56/88 DocID027104 Rev 2 3.4.1 Set discoverable mode & use direct connection establishment procedure The following pseudocode example illustrates only the specific steps to be followed for putting a GAP Peripheral device in general discoverable mode, and for a GAP central device to direct connect to it through a direct connection establishment procedure. /* GAP Peripheral: general discoverable mode (and no scan response is sent) */ Note: Note: It is assumed that the device public address has been set during the initialization phase as follows: uint8_t bdaddr[] = {0x12, 0x34, 0x00, 0xE1, 0x80, 0x02}; ret=aci_hal_write_config_data(CONFIG_DATA_PUBADDR_OFFSET,CONFIG_DATA_PUBAD DR_LEN, bdaddr); if (ret != BLE_STATUS_SUCCESS) PRINTF("Failure.\n")} */ void GAP_Peripheral_Make_Discoverable(void ) { tBleStatus ret; const char local_name[]= {AD_TYPE_COMPLETE_LOCAL_NAME,'B','l','u','e','N','R','G','_','T','e','s',' t'}; /* disable scan response: passive scan */ hci_le_set_scan_resp_data(0,NULL); /* Put the GAP peripheral in general discoverable mode: Advertising_Event_Type: ADV_IND (undirected scannable and connectable); Adv_Interval_Min: 0; Adv_Interval_Max: 0; Address_Type: PUBLIC_ADDR (public address: 0x00); aci_gap_start_selective_conn_establishment() It starts a selective connection establishment procedure. The GAP adds the specified device addresses into white list and enables scanning in the controller with the scanner filter policy set to “accept packets only from devices in whitelist”. All the devices found are sent to the upper layer by the event EVT_BLUE_GAP_DEVICE_FOUND on BlueNRG device and EVT_LE_ADVERTISING_REPORT on BlueNRG-MS device. aci_gap_terminate_gap_procedure() Terminate the specified GAP procedure. Table 36. ACI: connection procedures APIs (continued) ACI API Description |
|
링크 URL |
| ALLDATASHEET 가 귀하에 도움이 되셨나요? [ DONATE ] |
Alldatasheet는? | 광고문의 | 운영자에게 연락하기 | 개인정보취급방침 | 링크 투 데이터시트 | 링크교환 | 제조사별 검색 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |