| 数据搜索系统,热门电子元器件搜索 |
|
PM0237 数据表(PDF) 64 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
PM0237 数据表(HTML) 64 Page - STMicroelectronics |
|
64 / 88 page ![]() Design an application using BlueNRG, BlueNRG-MS ACI APIs PM0237 64/88 DocID027104 Rev 2 ret = aci_hal_write_config_data(CONFIG_DATA_IR_OFFSET, CONFIG_DATA_IR_LEN,(uint8_t *) IR); To successfully pair with a device, IO capabilities have to be correctly configured, depending on the IO capabilily available on the selected device. aci_gap_set_io_capability(io_capability) should be used with one of the following io_capability value: 0x00: Display Only 0x01: Display yes/no 0x02: Keyboard Only 0x03: No Input, no output 0x04: Keyboard display PassKey Entry example with 2 BlueNRG devices: Device_1, Device_2 The following pseudocode example illustrates only the specific steps to be followed for pairing two devices by using the PassKey entry method. As described in Section Table 11.: Methods used for calculating the Temporary Key (TK), Device_1, Device_2 have to set the IO capability in order to select PassKey entry as a security method. On this particular example, "Display Only" on Device_1 and "KeyBoard Only" on Device_2 are selected, as follows: /* Device_1: */ tBleStatus ret; ret = aci_gap_set_io_capability(IO_CAP_DISPLAY_ONLY) if (ret != BLE_STATUS_SUCCESS) PRINTF("Failure.\n")} /* Device_2 */ tBleStatus ret; ret = aci_gap_set_io_capability(IO_CAP_KEYBOARD_ONLY) if (ret != BLE_STATUS_SUCCESS) PRINTF("Failure.\n")} Once the IO capability are defined, the aci_gap_set_auth_requirement () should be used for setting all the security authentication requirements the device needs (MITM mode (authenticated link or not), OOB data present or not, use fixed pin or not, enabling bonding or not). The following pseudocode example illustrates only the specific steps to be followed for setting the authentication requirements for a device with: “MITM protection , No OOB data, don’t use fixed pin”: this configuration is used to authenticate the link and to use a not fixed pin during the pairing process with PassKey Method. ret = aci_gap_set_auth_requirement(MITM_PROTECTION_REQUIRED, OOB_AUTH_DATA_ABSENT, /* no OOB data is present */ NULL, /* no OOB data */ 7, /* Min. encryption key size */ 16, /* Max encryption key size */ DONOT_USE_FIXED_PIN_FOR_PAIRING,/* no fixed pin */ 0, /* fixed pin not used */ |
|
链接网址 |
| 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 |