After pairing and connecting an Android phone and a Windows computer on the Bluetooth settings page, open the phone’s Bluetooth interface to release the pairing with the computer. At this point, using the computer to initiate a BLE connection to the phone will trigger the SMP encryption process. When attempting data exchange, a key missing message will be reported, and then the PC will disconnect on its own. What Windows API can be used to establish a connection without triggering the SMP encryption process or using other methods to disconnect without reporting a key missing message and allow data exchange to proceed normally?
I tried setting the ProtectionLevel of GattCharacteristic to the lowest level and also tried GattSession MaintainConnection (true) was used to maintain the connection, and attempts were made to use APIs such as GetGattServicesAsync(), GetGattServicesAsync(BluetoothCacheMode), GetGattServicesForUuidAsync(Guid), GetGattServicesForUuidAsync(Guid, BluetoothCacheMode) to initiate the connection, but none of them could avoid key missing and disconnection
xiansen c is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
3