【发布时间】:2019-02-28 16:46:05
【问题描述】:
如果设备具有 HID over GATT 服务,Windows 将自动连接到它。所以,它显然是在关注设备何时在范围内。
对于非 HID 设备,Win32 仅在我向它发出请求时连接到 BLE 设备,例如设置特征或注册通知。如何检测设备何时可以成功连接(在范围内)?我很想运行一个循环尝试连接,但这肯定不是最好的解决方案。
【问题讨论】:
-
BluetoothLeAdvertisementWatcher (docs.microsoft.com/en-us/uwp/api/…)
-
我猜你必须执行蓝牙 LE 扫描。
标签: winapi bluetooth-lowenergy