我用readBLECharacteristicValue只回:readBLECharacteristicValue:ok
向蓝牙写数据也是回:writeBLECharacteristicValue:ok
其他什么信息都没有了,该怎么接收信息啊?
let buffer = new ArrayBuffer(2);
let dataView = new DataView(buffer);
console.log(dataView);
dataView.setInt8(0, '0x17');
dataView.setInt8(1, '0x60');
console.log(buffer)
wx.writeBLECharacteristicValue();
还有发送16进制的,结果转成10进制的了
该怎么通信啊,有没有大佬说下,有demo更好了
你好,收蓝牙回包用onBLECharacteristicValueChange,具体见文档
https://developers.weixin.qq.com/miniprogram/dev/api/device/bluetooth-ble/wx.onBLECharacteristicValueChange.html