Html5如何监听蓝牙

_锦衣卫 2016-11-27 04:53:47
Html5如何监听蓝牙(可结合JS或者PHP实现),有没有哪位亲知道具体的实现方法!!!
...全文
1986 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
zzyhost 2020-05-25
  • 打赏
  • 举报
回复
解决了吗?我的需求是设备要通过蓝牙向手机app发送数据,不知道咋整,还无从下手,不知道用不用连接,还是直接监听
qq_40590092 2019-04-26
  • 打赏
  • 举报
回复
业余草 2017-05-21
  • 打赏
  • 举报
回复

研究一下!
_锦衣卫 2016-12-08
  • 打赏
  • 举报
回复
怎么匹配,是搜到附近所有的蓝牙吗?
zgycsmb 2016-11-30
  • 打赏
  • 举报
回复
作者:林友昂 链接:https://www.zhihu.com/question/30884733/answer/104715177 来源:知乎 著作权归作者所有,转载请联系作者获得授权。 以下是以上链接介绍的简单列子 Here is a very simple example, showing a button: <button id="the-button">Try it</button> …and the following JavaScript: const button = document.querySelector('#the-button'); button.addEventListener('click', function() { navigator.bluetooth.requestDevice({ filters: [{ services: ['battery_service'] }] }).then(device => { console.log('Got device:', device.name); console.log('id:', device.id); }); }); As mentioned earlier, the method navigator.bluetooth.requestDevice() can only be called in response to a user action like a button click. This method calls up a dialog box showing the list of available BLE devices matching the query filter. In our case, the filter we have set pertains to BLE devices which expose a so-called “GATT service” called battery_service. We’ll find out more about GATT services in the next section. 可试下

39,085

社区成员

发帖
与我相关
我的任务
社区描述
HTML5是构建Web内容的一种语言描述方式。HTML5是互联网的下一代标准,是构建以及呈现互联网内容的一种语言方式.被认为是互联网的核心技术之一。
社区管理员
  • HTML5社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧