I does not write to any specific location determined by us.
Does anyone know how we can read the stored bonding data out of the memory?
I am looking to build an application that behaves differently depending on the stored bonding data.
E.G: If the board has a bond, connect to that bond, otherwise advertise as being "open"
I've been looking through the documentation/datasheet, but it only mentions writing and clearing the "currently connected" device into the bonding data flash.
After not getting any helpful reply I investigated this and found the only way to access this was to get the address from the map file and access it directly by address. This is not good practice of course but I could not find any other way.
I actually used the value from the ELF file but thats specific to bootloadable code. The map file should have it.
To erase all bonding data:
uint32 flashaddr = 0x14380; // value of "p_sp_flash_storage" from parsed ELF
Hmmmmm, you're right that it does sound "hacky" :P
Specifically I really only want to be able to compare the incoming connection request BDAddr with the stored bond BDAddr to verify that I've already connected to it previously, but I'm thinking I'll check out the whitelist-side of the stack before I dig into custom flash reading.
(Thanks for the info btw :))
Aha, I found something: CYBLE_API_RESULT_T CyBle_GapGetBondedDevicesByRank (CYBLE_GAP_DEVICE_ADDR_LIST_T
It claims to return a list of the bonded addresses into the pointer passed into the call. I'll see if I can get a working test of this going.