CoreBluetooth: Failed to encrypt connection BM3 STATUS 706

Our iOS app talks to our own BLE accessory using CoreBluetooth. This has been working for a few months on all our devices (I have personally tested it on iPod touch 6th gen, iPad mini 2, iPhone 5s, iPhone 6s and iPhone 7). We just got our hands on an iPad mini 4 and, for some reason, have been experiencing issues:


- the initial connection triggers the iOS pairing dialog

- after entering the proper passkey I am able to read values from the device just fine

- any subsequent attempts at reading value (CBPeripheral.readValue) just sits there and the didUpdateValue delegate method is never called


I've been trying to figure out what's happening and, I was looking at the device logs, noticed the following:


Oct 23 13:18:38 iPad-mini-03 bluetoothd[77] <Notice>: Received XPC message "CBMsgIdCharacteristicReadValue" from session "net.prolon.Focus-central-746-120"
Oct 23 13:18:38 iPad-mini-03 bluetoothd[77] <Notice>: Reading value for characteristic handle 0x002d on device "<private>"
Oct 23 13:18:38 iPad-mini-03 bluetoothd[77] <Error>: Failed to encrypt connection BM3 STATUS 706. (status=65535)
Oct 23 13:18:38 iPad-mini-03 bluetoothd[77] <Notice>: encryptionStatusChangedCb handle:0x11e002fc0 status=706 address=<private> isPairing=0
Oct 23 13:18:38 iPad-mini-03 bluetoothd[77] <Notice>: Encryption is now disabled for device "D51E8EAE-04F0-6B66-2EBE-D6DDA57A61DE" (<private>)
Oct 23 13:18:38 iPad-mini-03 bluetoothd[77] <Notice>: Clearing database cache for device "<private>"


I am not getting this error line on my other devices. Any idea what this is? I am trying to pinpoint the cause of the problem - I even tried to identify which hardware Bluetooth controller was present in the different iOS devices to try and detect a pattern of some sort.

Answered by bbousquet in 271975022

Found the issue. Our device wasn't cleaning its bindings table properly so it was refusing any further bindings once it reached its maximum number of entries.

Accepted Answer

Found the issue. Our device wasn't cleaning its bindings table properly so it was refusing any further bindings once it reached its maximum number of entries.

CoreBluetooth: Failed to encrypt connection BM3 STATUS 706
 
 
Q