How do I check to see if a peripheral is inside the list of bonded units of a central?
I know I can just scan -> see unit -> connect -> change security and if it IS bonded then it will not try to attempt a re-pairing. It will use the stored keys. However, i want ot prevent either making a connection by something being broadcasted in the advertisement i an scan and compare. Or if i have to connect, I would like to check to see if it is paired BEFORE i do a change security.
Trying to implement a means to pair on request and then auto-connect to devices already bonded. I am not seeing anything available.
What i do right now for pair/bonding, I advertise either a 0 or a 1 in manufacturer data as a pair bit. if the central sees a 1, then establish a connection and pair/bond with device. If it sees a 0, it should check to see if the device is in its bond list and then connect if it is.
I have not gone thru the process of establishing a whitelist. There are many ways of doing this by establishing my own whitelist. but i was hoping, if i am bonding, the device knows it is bound to an object, i should be able to get that same info prior to attempting to connect and change security.
I have a bunch of very code intensive methods i can think of to solve this, but i am hoping there is just an isBonded() i can call of sorts.