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

Bonded device scanning

Hi all,

My project involves a ble-central initialising peripherals and creating a bond. When this is complete the peripheral should go into sleep mode and only wake up when data is ready. I want the central to be constantly scanning for the bonded peripherals and immediately connect to extract information when one is found. 

For this functionality i'll need to scan for only previously bonded devices so I can either; A) create a list of all the "awake" peripherals or B) automatically connect as they are discovered.

The amount of possible peripherals will be in the 20 - 30 range.

Does anyone know how this could be achieved? Any possible examples would be a big help.

Thanks,

Parents
  • Hi ble_bmt, 

    Have you used our peer manager library ? 

    You can have a look at ble_app_hrs_c example, in the example we do use whitelist when scanning and connecting. So that the device only scan for bonded peripherals. To disable whitelist to add a new device, you need to press BTN_ID_WHITELIST_OFF (button 2 on the nRF52 DK)

    However, the whitelist only support up to 8 addresses.  If you want to do a whitelisting for up to 20-30 devices, you would need to do it manually. Take a look at is_connect_per_addr inside scan_init() in the same example. 

Reply
  • Hi ble_bmt, 

    Have you used our peer manager library ? 

    You can have a look at ble_app_hrs_c example, in the example we do use whitelist when scanning and connecting. So that the device only scan for bonded peripherals. To disable whitelist to add a new device, you need to press BTN_ID_WHITELIST_OFF (button 2 on the nRF52 DK)

    However, the whitelist only support up to 8 addresses.  If you want to do a whitelisting for up to 20-30 devices, you would need to do it manually. Take a look at is_connect_per_addr inside scan_init() in the same example. 

Children
Related