W3C Web 蓝牙 "acceptAllDevices: true" 不 return 所有设备。为什么?

W3C Web Bluetooth "acceptAllDevices: true" does not return all devicies. Why?

顺带一提 网络蓝牙 社区小组报告草案,2019 年 2 月 11 日 https://webbluetoothcg.github.io/web-bluetooth/#example-filter-by-services

网络蓝牙API https://developer.mozilla.org/en-US/docs/Web/API/Web_Bluetooth_API

以下代码应该return所有可用的蓝牙设备:

navigator.bluetooth.requestDevice({acceptAllDevices:true}).then(function(device) {
    console.log('Name: ' + device.name);
}).catch(function(error) {
    console.log("Something went wrong. " + error);
});

当我刷新 html 页面时,我看到显示屏顶部显示“http://localhost 想要配对”,并且列出了一些我不知道的设备;但是,Windows10"Bluetooth & other devices" 信息框中清楚显示的其他设备不在 Web 蓝牙信息框中。

我正在尝试尽可能创建最简单的代码示例。我对为什么这不起作用感到困惑。任何帮助将不胜感激。谢谢!

是的,Google Chrome 是最新的 版本 73.0.3683.86(正式版)(64 位)

没有显示的 "other" 设备是什么?在 phone 或平板电脑上安装 nRF Connect 应用程序并使用它进行检查。值得信赖。 Windows 10 显示的是当前在范围内或广告中的设备,还是显示您的机器之前连接过的设备?

我相信 Web 蓝牙选择器中显示的设备是您可以在 Windows 上连接的设备。

Web 蓝牙仅适用于低功耗蓝牙 (BLE);因此,标准蓝牙设备可能会出现在您的 Windows10"Bluetooth & other devices" 信息框中,但不会出现在您的 Web 蓝牙配对框中。

了解 Web 蓝牙的一个好方法是研究 Web Bluetooth Samples and get the BLE Peripheral Simulator 来自 Google Play 的示例代码。