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

Clear only certain entries in persistent data

I am trying to allow 2 peripherals to bond to a central, and would like to be able to use 2 push buttons to delete the bond information for either device. Is it possible to clear the persistent data selectively like this?

Parents
  • From the further searching I've done it seems like when I bond the device using button 1 I would need to save the address of that device as device 1. Then when I want to delete device 1 I just retrieve the address from that fixed location and delete it?

    The issue I'm having is that it seems like all the context storing functions use a device handle, but if I want to delete a device without it being connected then I don't have access to the handle if I understand correctly.

Reply
  • From the further searching I've done it seems like when I bond the device using button 1 I would need to save the address of that device as device 1. Then when I want to delete device 1 I just retrieve the address from that fixed location and delete it?

    The issue I'm having is that it seems like all the context storing functions use a device handle, but if I want to delete a device without it being connected then I don't have access to the handle if I understand correctly.

Children
No Data
Related