This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Advertise with Whitelist

Hi 

I am working on ble_app_cli to acieve my requirements.

I want to whitelist device based on recieved scan request report before making connection with the central.

as soon as i recieve a new scan request report check for rssi and if is above threshold add it to whitelist.

How do i achieve this???

Please suggest.

Parents
  • Hi,

    So you should allow scan request from all peer, but only allow connection request from a whitelist peer. This is done by using BLE_GAP_ADV_FP_FILTER_CONNREQ during advertisement. Then each time you get a BLE_GAP_EVT_SCAN_REQ_REPORT you can check the RSSI, and add the peer to the whitelist you want to allow to connect.

    You may need to populate an invalid whitelist to start with (e.g, just a fixed gap address), and then update the whitelist with the peer you want to allow to connect based on the RSSI value. Likely need to re-start the advertisement for this to work.

    Best regards,
    Kenneth

Reply
  • Hi,

    So you should allow scan request from all peer, but only allow connection request from a whitelist peer. This is done by using BLE_GAP_ADV_FP_FILTER_CONNREQ during advertisement. Then each time you get a BLE_GAP_EVT_SCAN_REQ_REPORT you can check the RSSI, and add the peer to the whitelist you want to allow to connect.

    You may need to populate an invalid whitelist to start with (e.g, just a fixed gap address), and then update the whitelist with the peer you want to allow to connect based on the RSSI value. Likely need to re-start the advertisement for this to work.

    Best regards,
    Kenneth

Children
Related