| поискавой системы для электроныых деталей |
|
PM0237 датащи(PDF) 66 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
PM0237 датащи(HTML) 66 Page - STMicroelectronics |
|
66 / 88 page ![]() Design an application using BlueNRG, BlueNRG-MS ACI APIs PM0237 66/88 DocID027104 Rev 2 Alternatively, if the user wants to set the authentication requirements with a fixed pin 0x123456 (no pass key event is required), the following pseudocode can be used: tBleStatus ret; ret = aci_gap_set_auth_requirement(MITM_PROTECTION_REQUIRED, OOB_AUTH_DATA_ABSENT,NULL, 7, 16, USE_FIXED_PIN_FOR_PAIRING, 0x123456,/* Fixed pin */ BONDING ); if (ret != BLE_STATUS_SUCCESS) PRINTF("Failure.\n")} NOTEs: 1. When the pairing procedure is started by calling the described APIs (aci_gap_slave_security_request() or aci_gap_send_pairing_request()) and the value ret = BLE_STATUS_SUCCESS is returned, on termination of the procedure, a EVT_BLUE_GAP_PAIRING_CMPLT event is returned on the HCI_Event_CB() event callback to indicate the pairing status: • 0x00: Pairing success; • 0x01: Pairing Timeout; • 0x02: Pairing Failed. The pairing status is given from the status field of the evt_gap_pairing_cmplt data associated to the EVT_BLUE_GAP_PAIRING_CMPLT event. 2. When 2 devices get paired, the link is automatically encrypted during the first connection. If bonding is also enabled (keys are stored for a future time), when the 2 devices get connected again, the link can be simply encrypted (without no need to perform again the pairing procedure). Host applications can simply use the same APIs which will not perform the paring process but will just encrypt the link: • aci_gap_slave_security_request() on the GAP Peripheral (slave) device or • aci_gap_send_pairing_request() on the GAP Central (master ) device. 3. If a slave has already bonded with a master, it can send a slave security request to the master to encrypt the link. When receiving the slave security request, the master may encrypt the link, initiate the pairing procedure, or reject the request. Typically, the master only encrypts the link, without performing the pairing procedure. Instead, if the master starts the pairing procedure, it means that for some reasons, the master lost its bond information, so it has to start the pairing procedure again. As a consequence, the slave device receives the EVT_BLUE_GAP_BOND_LOST event to inform the host application that it is not bonded anymore with the master it was previously bonded. Then, the slave application can decide to allow the security manager to complete the pairing procedure and re-bond with the master by calling the command aci_gap_allow_rebond(), or just close the connection and inform the user about the security issue. 4. Alternatively, the out-of-band method can be selected by using the aci_gap_set_auth_requirement() with OOB_Enable field enabled and the OOB data |
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю 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 |