API method to check if the connected device is bonded

4 posts / 0 new
Last post
ankitdaf
Offline
Last seen:2 years 8 months ago
加入:2015-09-03 20:14
API method to check if the connected device is bonded

Hi

有一个API方法,让我们检查吗if the currently connected device is bonded or not ?

Thanks
Ankit

Device:
MT_dialog
Offline
Last seen:1 month 1 week ago
Staff
加入:2015-06-08 11:34
Hi ankitdaf,

Hi ankitdaf,

There is no API to indicate that the device is bonded, you can check if the there are any bonding data in the app_env_sec or if you use a flash to store those data you can check your flash.

Thanks MT_dialog

ankitdaf
Offline
Last seen:2 years 8 months ago
加入:2015-09-03 20:14
Thanks for the prompt

Thanks for the prompt response !

Just to clarify the question, I meant to ask,

I have bonded a device before to an Android phone. Now, I have disconnected it. The next time, on connection, I want to check if the device I have connected to is bonded or not. Does that mean I will have to check if app_env_sec parameters match the value I have stored in flash, or it simpler than that ?

Thanks
Ankit

MT_dialog
Offline
Last seen:1 month 1 week ago
Staff
加入:2015-06-08 11:34
Hi ankitdaf,

Hi ankitdaf,

If you are in extended sleep the bonding data should be saved in the app_sec_env and since the sysram never shuts down should be retained. In case you use deep you should store the bonding data to an external flash. Now regarding the re-connection, yes by checking the bonding data you should allow or not a device to connect to your peripheral. You can check the Smart Tag application implementation that stores and checks the bonding data in every connection request depending if its bonded or not.

Thanks MT_dialog