Here's my setup:
- iPad believes it's bonded to a BLE device
- BLE device (proprietary) has lost the bond
- BLE device has a "ready to bond" mode which is currently false.
So our iOS app, believing all is well, tries to write to a characteristic in a bonded service of the BLE device. I assume that since iOS believes the bond is still intact, it sends the characteristic write to the BLE device which rejects it because it thinks they aren't bonded. I further assume that iOS then sends a "let's bond" request which the BLE device rejects because its "ready bond" mode is false.
In previous versions of iOS (we are now running 12.1) we got back various errors in this situation, the most helpful one being CBATTErrorDomain Code=15 "Encryption is insufficient." but now we just never get anything back. I've got debugging output on all of the various delegate objects and absolutely nothing is firing. After a few seconds my code times out.
Is there a delegate or other notification in iOS that I should be watching, to know that a bonding request was attempted and rejected? Or, if iOS is really insistent on my app knowing NOTHING about bonding (which is the general case with the BLE subsystem), is it an iOS bug that it doesn't tell me that my write attempt failed?