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

Whitelist problem - what am I missing?

Hello!

I'm trying to get my whitelist work, but I think I'm missing something. Let me present you my problem:

  1. Power up both central and peripheral1
  2. Central enters in non-selective scan
  3. Central connects to peripheral1 but whitelist is not created (I get device_instance_find err_code 5)
  4. Peripheral1 sends bond request using dm_security_setup_req().
  5. Central bonds with peripheral and stores the context (peripheral1 addr and device type, among other)
  6. Peripheral1 auto sleeps
  7. Peripheral1 is powered up
  8. Central connects (selective scan now) with peripheral1 via whitelist and returns err 0 in device_instance_find. Connection is established via bonded device.
  9. Peripheral1 auto sleeps
  10. I power down the central. Whitelist is lost and I have to repeat all the steps to whitelist work again.
A) I see this behaviour after adding dm_security_setup_req in the peripheral code: The peripheral does not promptly register the device in the whitelist, as other examples do (HRS and HRS_C). Actually, it needs 2 connections (as explained above) to get the addr added to the whitelist.

B) I adjusted central's settings to bond to only 1 peripheral at time.

Do you guys know what I'm missing?

Thanks

Related