首页 > 解决方案 > 需要访问自行车蓝牙速度传感器服务名称。蓝牙分配服务页面已关闭。我还能在哪里找到这些信息?

问题描述

我想查找将这个示例从电池服务更改为自行车速度传感器服务所需的服务。只需执行navigator.bluetooth.requestDevice(acceptAllDevices=true)与自行车速度传感器设备配对的工作,但由于我没有为其提供正确的服务名称而出错。

navigator.bluetooth.requestDevice({ filters: [{ services: ['battery_service'] }] })
.then(device => { /* … */ })
.catch(error => { console.error(error); });

我发现心率{filters:[{services:[ 'heart_rate' ]}]})只是猜测。仍然没有弄清楚骑车速度和踏频传感器的名称。由于文档已关闭,有没有办法自省requestDevice得到这个?

https://webbluetoothcg.github.io/web-bluetooth/#biblio-bluetooth-assigned-services

给出链接

https://developer.bluetooth.org/gatt/descriptors/Pages/DescriptorsHomePage.aspx

哪个页面不再存在,403 Forbidden错误

在此处输入图像描述

标签: javascriptbluetoothbluetooth-lowenergy

解决方案


规范已被移动,现在可以在以下位置找到:https ://www.bluetooth.com/specifications/specs/gatt-specification-supplement-4/


推荐阅读