cancel
Showing results for 
Search instead for 
Did you mean: 

NUCLEO WB55RG BLE Periferal can not paring

AkihiroN
Associate III

I am developing a BLE peripheral device using the NUCLEO WB55RG. I am having trouble connecting to smartphones. The pairing process is as follows: The security is Just Work, using bonding mode.

During the first pairing:

  1. The peripheral sends a security request (aci_gap_slave_security_req).
  2. A pairing request comes from the central device.
  3. The peripheral responds to the pairing request.
  4. A pairing completion notification comes from the central device.

During the second pairing:

  1. The peripheral sends a security request (aci_gap_slave_security_req).
  2. An encryption request comes from the central device.
  3. The peripheral sends an encryption accept.

How can I detect the events of the first ③ and the second ②? Also, how should I respond to CCCD writes?

1 REPLY 1
STTwo-32
ST Employee

Hello @AkihiroN 

You can detect the event where the peripheral responds to the pairing request by handling the ACI_GAP_PAIRING_COMPLETE_EVENT. This event indicates that the pairing process has completed successfully or failed.

 You can detect the encryption request event by handling the HCI_LE_ENCRYPTION_CHANGE_EVENT or the HCI_LE_ENCRYPTION_KEY_REFRESH_COMPLETE_EVENT. These events indicate that the encryption has been started or the keys have been refreshed as part of the bonding process.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.