我正在试验Chrome的蓝牙api的一些示例功能。我试图改变可用样本中的代码以适应将根据指定信标的接近度调整div可见性属性的函数。 假设下面的代码在页面就绪时从设备请求服务。
main-SendThread(0:0:0:0:0:0:0:1:2181) o.a.s.s.o.a.z.ClientCnxn
[WARN]Session 0x0 for server null, unexpected error,
closing socket connection and attempting reconnect
java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:701)
at org.apache.storm.shade.org.apache.zookeeper.ClientCnxnSocketNIO.
doTransport (ClientCnxnSocketNIO.java:361) at org.apache.storm.shade.org.
apache.zookeeper.ClientCnxn$SendThread.run(ClientCnxn.java:1081)
2017-03-13 22:00:10.937 main-SendThread(0:0:0:0:0:0:0:1:2181)o.a.s.s.
o.a.z.ClientCnxn [INFO] Opening socket connection
to server 127.0.0.1/127.0.0.1:2181. Will not attempt to
authenticate using SASL (unknown error)
有人知道Chrome蓝牙API是否具有确定设备接近度的任何功能?如果是这样,你能指导我一些我可以复习的文件。
谢谢
答案 0 :(得分:0)
首先EDF094632432432D9C585014E22E7073
不是有效的蓝牙GATT UUID。
关于您的初始问题,截至2017年3月,无法扫描BLE广告包(例如信标)。在某些时候,应该实施Web蓝牙扫描:https://webbluetoothcg.github.io/web-bluetooth/scanning