How to update peripheral device BD Address after device disconnection

Hi

I am developing an application where I need to update the BD address for advertising after each disconnection and on reboot.
I know Zephyr stack has the API bt_id_reset() which can be used to reset the bd_address but it also clean up the stored keys and connection information.
but my requirement is to update the bd address during advertisment without resetting anything. how can I achieve it?

Parents Reply Children
  • You can advertise with only one ID but yse the sample I referred to for how to do that (you do not have to make multiple advertisers). So this seems to fit what you need as far as I can see (though you just need parts of the sample as you just want one advertiser). But if you only want a single ID and nost use the old, I don't see the problem with bt_id_reset()? (the old bonds are deleted, but they are also assosiated with the old identity and cannot be used with the new anyway, so there is no reason to keep it)

Related