Bluetooth LE on Windows 10 throws exception 0x80070572 on second connection attempt

2

I am using the Bluetooth Low Energy API on Windows 8.1 and Windows 10 to connect to a custom Bluetooth LE device. I have to pair the device with Windows before connecting to it through my code, and it all works on Windows 8.1, and partially works on Windows 10, because on Windows 10 I have to unpair the device and pair it again in order to get it working. On Windows 10, if I try to connect to the device a second time, I get the following exception:

'System.Exception' in mscorlib.ni.dll There is no user session key for the specified logon session. (Exception from HRESULT: 0x80070572)

I believe this might be because my external Bluetooth device isn't storing bonding information - but this doesn't explain why it works on Windows 8.1 without a problem, I'm not sure if the way the PC handles Bluetooth changed drastically between those two versions. Does anyone know a way around this exception, or what I can do?

c#
windows
windows-10
bluetooth-lowenergy
windows-10-universal
asked on Stack Overflow Sep 27, 2016 by daniel metlitski • edited Sep 27, 2016 by daniel metlitski

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0