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

NRF51822: Bonds not saving with SDK5.1.0

I am finding that bonds are not saved to flash when using the latest SDK and S110 SoftDevice.

To test this, I am using the HTS example code, and the Master Dongle. I open Master Control Panel, and [Start Discovery] to list the advertising device.

First, I [select device], then do [Service discovery], [Bond], and [Enable services]. The temperature service starts notifying.

I then click [Disconnect] and [Back] and repeat the process. The bond is still in nRF51822 RAM, so temperature notifies fine.

I then click [Disconnect] and [Back], CYCLE POWER, and repeat the process. Temperature does not notify, the bond is not made since the nRF51822 looses it on power cycle.

I then click [Disconnect] and [Back] and then click [Delete bond info] and repeat. A new bond is created, and temperature is notifying again.

I am using: SDK 5.1.0 S110 6.0.0 production

When using old SDK and S110 (prior to pstorage) the Bond persists over power cycle.

Parents
  • Hi Paul,

    I am unable to reproduce the problem, however do note that if you are automating the application to turn to enter system off as soon bond manager API returns, the it is possible that you are turning off the device before flash operation could be completed by SoftDevice. Do note that the flash access is SoftDevice is of asynchronous nature and an event is notified to indicate completion of an operation. Also, only one flash access operation is permitted at a time, hence a queue is implemented in the pstorage module to ensure application is not impacted.

    An improvement noted for the pstorage interface however is to provide an API that the application can wait on to know there is no flash access pending to know definitively when a System Off could be entered. This is planned for future SDK release.

    Hope this helps!

Reply
  • Hi Paul,

    I am unable to reproduce the problem, however do note that if you are automating the application to turn to enter system off as soon bond manager API returns, the it is possible that you are turning off the device before flash operation could be completed by SoftDevice. Do note that the flash access is SoftDevice is of asynchronous nature and an event is notified to indicate completion of an operation. Also, only one flash access operation is permitted at a time, hence a queue is implemented in the pstorage module to ensure application is not impacted.

    An improvement noted for the pstorage interface however is to provide an API that the application can wait on to know there is no flash access pending to know definitively when a System Off could be entered. This is planned for future SDK release.

    Hope this helps!

Children
No Data
Related