When you reprogram the device it erases the bonded information of the phone.
So two device after pairing and bonding, from the next time onwards they won't expect to exchange the keys.
After programming keys would be deleted so when phone sends pairing request, server would respond that it has no keys related to that device.
It is expected scenario only. Based on the device address, phone always thinks that it is the known bonded device.
if encryption key is not correct then pairing process will fail. You are not supposed to request new keys with the same address and with same peer device
I am a little confused... If the server recognizes that it doesn't have any keys related to that device, does it automatically respond to the phone without any coding on my part? It seems like it does automatically respond but iOS may be having a problem with the response, and here's why I think that's the case:
When I use CySmart on my android device, I connect and bond the first time, disconnect and reprogram the server, and when I try to reconnect, the android phone automatically recognizes that the key doesn't work anymore and re-pairs with the server. HOWEVER, using CySmart on my iOS device, I connect and bond the first time, disconnect and reprogram the server, and when I try to connect again, the connection process just times out and won't connect unless I manually forget the device in the iOS settings.
Is there something wrong with how the Cypress chip responds to iOS devices as opposed to android devices? Because everything seems fine on android but iOS struggles with out of date keys. Or is there something on the iOS app side that needs to be done that both my App developer AND the CySmart app developer missed?
Does this make sense?
I'm facing the same issue, my cyble works as hid peripheral, using unauthenticated pairing with encryption , first time works, my problem is it can not disconnect from ios phone, when I disconnect, it will auto reconnect back, so there is no chance that other phone to pair and connect to it if I do not forget it or turn off bluetooth on ios phone.
I think cypress ble stack should give application level an event that the key has been lost, so the engineer could disconnect the central if the central still retain the connection even the slave response key lost.
I have same issue as you on iOS device. However I use authentication, I can connect as well at the first time. But after restart cypress module then iOS cysmart app can not connect anymore, always get time out.
Did you find any solution?
Update to all of you. After I tried to forget device in bluetooth setting, I can connect again as well.
I am using CySmart and I see the same behavior. How do you make it to forget device in cySmart?
On the PC CySmart, highlight the device in the "Device List" window and click on "Remove".
On Android CySmart, you can use "Forget" in the Bluetooth Settings or touch the "Paired" button top right of the entry for your device in "Ble Devices" screen.
No idea about iOS CYSmart but guess it is similar to Android.