问题描述
我已经创建了一个WDK库,用于与Bluetooth LE设备进行交互(紧接示例此处) .该库在Windows的早期版本上运行良好-我能够连接到我的设备,编写特征并获得异步通知.我将Windows更新到版本1709(内部版本16299.98)后,该库停止工作:
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:
- 通过设置"->设备"->蓝牙"配对设备
- BLE设备闪烁LED指示广告
- 运行使用上述库的应用程序
- 一旦应用程序打开配对设备的句柄(使用
hDevice = CreateFile(pInterfaceDetailData->DevicePath, GENERIC_WRITE | GENERIC_READ, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, NULL);
),设备就会痉挛地闪烁,表明它可以非常快速地连接和断开连接. - 有时,几秒钟后,设备会一直亮着,表明它已连接(Windows设置中的状态也为已连接")
- 从我的代码对设备的任何访问(例如,通过调用
BluetoothGATTSetDescriptorValue()
以启用BLE通知)均失败,并出现超时(ERROR_SEM_TIMEOUT
))
- 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.
有什么想法吗?
如果相关,则我的本地蓝牙设备是Qualcom Atheros USB模块(VID_0489& PID_E076& REV_0001).
If its relevant, my local Bluetooth device is Qualcom Atheros USB module (VID_0489&PID_E076&REV_0001).
推荐答案
这是Windows 10的问题,已在 KB4054517
This was an issue with Windows 10, resolved in KB4054517
这篇关于蓝牙LE设备在Windows 10 v1709中停止连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!