I've been developing an application using the WinRT API for Bluetooth Low Energy for Windows 8.1 and above. It's worked for a while, but I've run into a serious issue: the software cannot connect to the device after Windows reboots.
If I close and restart the software, it still won't pair. The only thing that works is if I unpair and re-pair with the device. However, considering the use case for our users, this is completely unacceptable. It can't be a problem with the device firmware, because it's still capable of pairing and interacting with iOS.
In debugging, whenever I try to write to the device using
As mentioned in my edit, the error is fixed if I change the
Now, we were worried about this meaning there would be no encryption or authentication. However, this doesn't seem to be the case after we used a Bluetooth packet sniffer just to be sure. This is because the details for encryption and authentication are done upon pairing, not upon connection.
Per the documentation:
Plain: Uses the default protection level.
Plain does not mean
None. It means "use the minimum security the device requires," or in essence, automatic based upon what information it got at pair time.