Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Get a callback each time a peripheral refuse a connection with a not whitelisted device

Hi, we're developing a peripheral (SD 132) which uses whitelist to prevent connection from unwanted devices.

All works fine and when an unlisted device try to connect, it receive back a connection error with BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED.

Is there a way on peripheral device which refuse unlisted connections, to rise a callback each time a connection is refused for unlisted devices?

Thanks

Luca

Parents
  • Hi, not really, but if you setup advertisment with whitelist using p_adv_params->fp = BLE_GAP_ADV_FP_FILTER_CONNREQ; then you can still configure to get a BLE_GAP_OPT_SCAN_REQ_REPORT every time someone is requesting a scan request, with for instance the RSSI value (so maybe you can take an action if someone is scanning you very close, for instance by adding them to the whitelist). You need to use sd_ble_opt_set() to enable scan request events.

Reply
  • Hi, not really, but if you setup advertisment with whitelist using p_adv_params->fp = BLE_GAP_ADV_FP_FILTER_CONNREQ; then you can still configure to get a BLE_GAP_OPT_SCAN_REQ_REPORT every time someone is requesting a scan request, with for instance the RSSI value (so maybe you can take an action if someone is scanning you very close, for instance by adding them to the whitelist). You need to use sd_ble_opt_set() to enable scan request events.

Children
Related