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

How can i start an advertising with a whitelist?

Hi all, I'm reading the ble_peripheral samples of the SDK. I know start a advertising with the function ble_advertising_start(); Now, i know a central address, then i want connect to that device. I want start the advertising with a whitelist for can be connected by that central only. How to modify the sample codes and do i need irks or something else? Thanks~~

Parents
  • Hi King,

    You question tag says that you are using nrf51822 and then you confused me saying that you are using SDK0.9.1 (which is for nRF52)

    You can just use directed advertising and implement BLE_ADV_EVT_PEER_ADDR_REQUEST. Please read about the advertising module here and use directed advertising instead of whitelist if you just want to send advertising to one know (unbonded) central

    If you still want to use whitelist, then you can do it, but in your above code snippet, what happens is, that when the Advertising module asks your app for whitelist , your app is asking device manager to provide that info. That means that device manager will give the already bonded peers as whitelist. I think that is not what you intend. Instead of asking device manager, you need to construct your whitelist with the central address-

Reply Children
Related