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.

  • Hi Luke,

    Sorry that I didn't check you are using S130. Advertising with privacy is not support on S130.

    In your case, I would suggest doing whitelisting. Whitelisting meaning you advertise in open, discoverable mode but only the central device that has been bonded with your can connect. The peripheral will discard the connect request from other central.

    Usually, what we do in our mouse and keyboard reference design is to advertise in directed advertising for a short period of time (few hundred milliseconds) before switching to normal advertising with whitelist. This is to take advantage of the high duty cycle adv interval directed advertising can have (3.5ms) to connect quickly. But this mode consume high power consumption so it should only be used short period of time.

    You can refer to our ble_app_mouse and keyboard example in the SDK to see how we do whitelisting.

Reply
  • Hi Luke,

    Sorry that I didn't check you are using S130. Advertising with privacy is not support on S130.

    In your case, I would suggest doing whitelisting. Whitelisting meaning you advertise in open, discoverable mode but only the central device that has been bonded with your can connect. The peripheral will discard the connect request from other central.

    Usually, what we do in our mouse and keyboard reference design is to advertise in directed advertising for a short period of time (few hundred milliseconds) before switching to normal advertising with whitelist. This is to take advantage of the high duty cycle adv interval directed advertising can have (3.5ms) to connect quickly. But this mode consume high power consumption so it should only be used short period of time.

    You can refer to our ble_app_mouse and keyboard example in the SDK to see how we do whitelisting.

Children
No Data
Related