连接中断后,Windows 10停止连接到BLE设备 [英] Windows 10 Stops Connecting to BLE Device after Connection is Interrupted

查看:137
本文介绍了连接中断后,Windows 10停止连接到BLE设备的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

BLE设备是使用蓝牙4.0和GATT的自定义BLE设备。

The BLE device is a custom BLE device using Bluetooth 4.0 and GATT.


  1. 配对BLE设备到Windows 10然后我的应用程序可以连接和断开设备。
  2. 然后我可以在断开与BLE设备的连接后重新启动计算机。然后将设备连接并断开连接。
  3. 当我从BLE设备断电时。 (我的应用程序每隔几秒就会轮询一次BLE设备。)然后,即使重新启动计算机,我也无法再次连接到BLE设备。
  1. Pair BLE device to Windows 10 then my application can connect and disconnect from the device.
  2. Then I can restart the computer after disconnecting from the BLE device. Then the device be connected and disconnected to.
  3. When I remove power from the BLE device. (My applications poll the BLE device every few seconds.) Then I am unable to connect to the BLE device again even after restarting the computer.

我无法连接回设备,直到我从计算机取消配对设备并重新配对。

如果连接没有中断,我不会遇到这个问题。

我在Windows 8.1上仅在Windows 10上没有出现此问题。

I don't get this issue on Windows 8.1 only Windows 10.

visual studio中显示的错误

The errors displayed in visual studio

推荐答案

我也是使用C ++和Win32 API获得此行为。我的代码之前在Windows 8.1中运行,并且断开连接和重新连接是"正常"行为,Windows需要应对此问题。

I was also getting this behaviour using C++ and the Win32 APIs. My code was previously working in Windows 8.1, and given that disconnection and reconnection is 'normal' behaviour Windows needs to cope with this.

当我在蓝牙设备后查看蓝牙设置面板时已经循环上电,我看到设备在已连接和已配对之间切换。我发现如果我将我的设备设置为不允许绑定,那么这种行为就会消失,并且所有
都能正常工作。问题归结为设备忘记了绑定信息,而Windows保留了它并期望使用它。我收到错误0x80070572,这让我看看配对和绑定之间的区别。

When I looked in the Bluetooth settings panel after the Bluetooth device has been power cycled I see the device toggling between Connected and Paired. I have discovered that if I set my device to not allow bonding, that this behaviour goes away and it all works well. The issue comes down to the device forgetting the bonding information, whilst windows retains it and expects to use it. I was getting error 0x80070572, which led me to look at the difference between pairing and bonding.

我希望这有帮助,

彼得


这篇关于连接中断后,Windows 10停止连接到BLE设备的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆