问题
I've created a WDK library for interacting with a Bluetooth LE device (closly following the example here). The library worked well on a previous version of Windows - I was able to connect to my device, write characteristics and get asynchronous notifications. Once I updated to Windows to version 1709 (build 16299.98), the library stopped working:
- pair the device via Settings-->Devices-->Bluetooth
- the BLE device blinks a led as an indication of Advertising
- Run my application which uses aforesaid library
- Once the application opens the paired device's handle (using
hDevice = CreateFile(pInterfaceDetailData->DevicePath, GENERIC_WRITE | GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
), the device blinks spasmodically, indicating that it connects and disconnects very fast. - Sometimes, after several long seconds, the device has solid light, indicating it is connected (the status in Windows Settings is also 'Connected')
- Any access to the device from my code (e.g. by calling
BluetoothGATTSetDescriptorValue()
to enable BLE notification), fails with a timeout (ERROR_SEM_TIMEOUT
))
For some reason, first-time pairing with the device does not exhibit these symptoms.
Any ideas?
If its relevant, my local Bluetooth device is Qualcom Atheros USB module (VID_0489&PID_E076&REV_0001).
回答1:
This was an issue with Windows 10, resolved in KB4054517
来源:https://stackoverflow.com/questions/47777899/bluetooth-le-device-stopped-connecting-in-windows-10-v1709