How does the app get notified if authentication failed?


Li, Jun R
 

Hi,

 

In my BLE project, a passkey is required to access the NRF51 device; thus the callback functions of “struct bt_conn_auth_cb” were implemented to achieve secured paring. What I observed is that

  1. The function “cancel” will be called if the other peer canceled the pairing process.
  2. The function “security_changed” will be called if the passkey was successfully entered.

 

However, my application was NOT notified if a wrong passkey was entered, thus the BLE connection is still kept. Ideally, I hope to immediately disconnect the connection if the passkey is wrong. However, I can’t find a callback function to notify the application if the passkey was wrong. 

 

With more debugging logs, I can see the function  “smp_pairing_complete” got status (-4) when pairing failed while this status is zero when successful.

 

Can anyone enlighten me what kind of function can be used to notify the application that pairing failed?  Thank you!

 

Regards,

Jun

 

Join devel@lists.zephyrproject.org to automatically receive all group messages.