You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Web Bluetooth中BLE设备serial_number_string被拦截的绕过方法咨询

绕过WebBluetooth中Serial Number String特征的黑名单限制
  • WebBluetooth将0x2A25(Serial Number String)特征列入黑名单是浏览器层面的安全机制,目的是防止恶意网站通过设备唯一标识追踪用户,没有官方支持的绕过方式。
  • 可行的替代解决思路:
    • 联系设备厂商修改BLE固件,把序列号数据迁移到自定义特征中,或者在已能正常读取的特征(如厂商名称、型号名称)里附加序列号信息。
    • 如果设备支持,通过自定义GATT服务暴露序列号,WebBluetooth不会限制自定义服务和特征的读取操作。
  • 你当前的代码逻辑没有问题,拦截是浏览器的内置限制,无法通过代码直接突破:
    const deviceInfoService = await device.value?.gatt?.getPrimaryService('device_information')
    const deviceInfoCharacteristics = await deviceInfoService?.getCharacteristic(0x2a25) //serial_number_string
    

内容的提问来源于stack exchange,提问作者user12824511

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.05 04:47:38