运行 heart-rate-sensor example ,我无法在 chrome.bluetooth.getDevices
调用后的结果回调中检测到 BLE 设备(已知良好的心率传感器评估套件)。
即使我尝试每 5 秒定期重新调用 getDevices
:
setInterval(chrome.bluetooth.getDevices, 5000, onDeviceSearchCompleted);
和 ble 设备上的电源玩具,我只看到我以前在我的 onDeviceSearchCompleted
回调中连接的音频设备。
我可以通过这个 mac app 看到该设备显然是广告和可发现的.
最佳答案
BLE Chrome API 尚未在 OSX 上实现或 Windows .继续等待。太糟糕了Chrome Bluetooth API没有提到支持的操作系统。这也让我燃起了希望。
关于javascript - chrome.bluetooth.getDevices 未发现 BLE 设备,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28145217/