Our IOS application communicates with some device (Intel NUC) over BLE, writing to some characteristics. We use encrypted characteristics which enforce system pairing at the moment we write to characteristic for the first time.
Another piece of software on the same device is using classic BT to synchronize contacts (Phone Book Access Profile) and stream music from iPhone to Intel NUC. This also requires system pairing (separate from the one needed for BLE connection).
Once devices are paired both for BLE and classic BT profiles (two separate pairing processes) everything works fine. The problem arise when we disconnect from the peripheral either manually from system BT settings, or, event worse, by going with the iPhone out of range of NUC device. The devices stays disconnected in BT settings, event if we are back so that both devices are in range. It should not be a problem as we are paired for BLE communication so we should be able to connect with device that is currently disconnected but in range. However, when trying to connect over BLE then we get the error:
Domain=CBATTErrorDomain Code=14 "Peer removed pairing information" UserInfo={NSLocalizedDescription=Peer removed pairing information}
We connect to the device returned from CBCentralManager.retrievePeripherals(:withIdentifiers) method
Once we manually connect in system BT settings everything stars working again.
We tried using CBConnectPeripheralOptionEnableTransportBridgingKey flag passed to CBCentralManager.connect() method, but it's getting even worse. There are problems in system pairing for classic BT profiles and even if we manage to do it somehow, connecting over BLE time outs.
Any idea what might be the reason of the problem?