| Datenblatt-Suchmaschine für elektronische Bauteile |
|
PM0237 Datenblatt(PDF) 65 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
PM0237 Datenblatt(HTML) 65 Page - STMicroelectronics |
|
65 / 88 page ![]() DocID027104 Rev 2 65/88 PM0237 Design an application using BlueNRG, BlueNRG-MS ACI APIs 88 BONDING /* bonding is enabled */); if (ret != BLE_STATUS_SUCCESS) PRINTF("Failure.\n")} Once the security IO capability and authentication requirements are defined, an application can initiate a pairing procedure as follow: 1. by using aci_gap_slave_security_request() on a GAP Peripheral (slave) device (it sends a slave security request to the master): tBleStatus ret; ret = aci_gap_slave_security_request(conn_handle, BONDING, MITM_PROTECTION_REQUIRED ); if (ret != BLE_STATUS_SUCCESS) PRINTF("Failure.\n")} or 2. by using the aci_gap_send_pairing_request() on a GAP Central (master ) device. Since the DONOT_USE_FIXED_PIN_FOR_PAIRING (no fixed pin) has been set, once the paring procedure is initiated by one of the 2 devices, BlueNRG, BlueNRG-MS will generate the EVT_BLUE_GAP_PASS_KEY_REQUEST event (with related connection handle) for asking to the host application to provide the password to be used for establishing the encryption key. BlueNRG, BlueNRG-MS application has to provide the correct password by using the aci_gap_pass_key_response(conn_handle,passkey)API. The following pseudocode example illustrates only the specific steps to be followed for providing the pass key (for example a random pin) to be used for the pairing process, when the EVT_BLUE_GAP_PASS_KEY_REQUEST event is generated on Device_1 (“Display Only” capability) : tBleStatus ret; /* Generate a random pin with an user specific function */ pin = generate_random_pin(); ret = aci_gap_slave_security_request(conn_handle, BONDING, MITM_PROTECTION_REQUIRED ); if (ret != BLE_STATUS_SUCCESS) PRINTF("Failure.\n")} Since the Device_1, I/O capability is set as “Display Only”, it should display the generated pin in the device display. Since Device_2 , I/O capability is set as “Keyboard Only”, the user can provide the pin displayed on Device_1 to the Device_2 though the same aci_gap_pass_key_response() API, by a keyboard. |
|
Link URL |
| War ALLDATASHEET hilfreich? [ DONATE ] |
Über Alldatasheet | Werbung | Kontakt | Privatsphäre und Datenschutz | Link zum Datenblatt | Linktausch | Hersteller 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 |