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

Directed Advertising Peripheral

Hi

I have a Nordic nRF51 as a Peripheral. I have it open advertising until it connects for the first time to an Android handset.

When a connection is made it stays in directed mode advertising so that no other devices can connect in the future (for security purposes)

On a power cycle of the Android handset, it changes its address so I can never connect to the peripheral again, since its directing at the old handset address.

Any help would be much appreciated

Regards Luke

Parents
  • Hi Luke,

    You need to check what kind of address the Android phone has. If it's using random static address, I don't think there is anyway we can guess the new address to do correct directed advertising. If the phone has Resolvable Random Address, meaning there is a same IRK to generate the address. Then you need to exchange IRK and then do directed advertising with IRK. You can have a look at this example.

    Note that even you do directed advertising, other central device can still be able to connect to your device, there is nothing to stop them to do that. On the phone this function may be disable, but with a customized central or rooted phone, it should be possible.

    And easier way to reconnect a device previously bonded is to use whitelist, either on central or on peripheral.

    If you use whitelist on peripheral, you also need the IRK to detect the previously bonded phone.

  • Just looked and sd_ble_gap_device_identities_set() is only available in S132 which is for nRF52. I am using a nRF51, so this solution is not suitable. Please advise of other possibilities, as I am urgently trying to resolve this in my company Luke

Reply Children
No Data
Related