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

How can I use directed advertizing when my application reset or wake up from sd_power_system_off?

Hi, every one,

In my application , we need to bond my device with host , and then our application will go to deep sleep by calling sd_power_system_off. When I wake up my application by a wake up pin, how to do the directed advertizing when I had bonded my device with host successfully before?

Parents
  • If you want to manage your flash directly use PSTORAGE API. Else you can use device_manager API (which internally uses pstorage) to manage your bond information.

    If you are directly using pstorage, then you need to write the bonded peer address to the flash before going to sleep. Look in the documentation how you do load and store of your data. Your Pstorage handle will be same after bootup as long as your registration sequence does not differ from the one that was before going to system off.

    Doing a directed advertising after waking up from system off is not recommended. Some devices (phones) uses Random resolvable addresses that change after some 15 mins or so. If your device wakes up after that time, then the peer you have bonded would have already changed its address. That is why you have to use IRK and preferably use this in whilelisting for your device while advertising. Then you would not have the above mentioned problem. I do not know if you already considered this in your design.

    Also look at this information. It is little outdated (as we now have device manager instead of bond manager) but the rest of the information still holds.

Reply Children
No Data
Related