从写入读取响应的解决方法

时间:2018-10-26 18:35:12

标签: bluetooth web-bluetooth

https://webbluetoothcg.github.io/web-bluetooth/#dom-bluetoothremotegattcharacteristic-writevalue中,我看到writeValue返回了一个DataView,但是我在Chrome(High Sierra上的版本70.0.3538.77(正式版本)(64位)上)一直为空。

我的工作如下,writeValue()的状态为null,readValue()的值为空的DataView:

let status = await wifiChar.writeValue(encoder.encode(wifiValue));
console.log('status: ', status)
let value = await wifiChar.readValue();
console.log('value: ', value)

0 个答案:

没有答案
相关问题