关于BLE写数据在IOS真机与安卓真机数据的问题
发布于 6 年前 作者 yong62 18409 次浏览 来自 问答

代码

  wx.writeBLECharacteristicValue({

                          deviceId: mac,

                          serviceId: suuid,

                          characteristicId: cuuid,

                          value: wcommand.buffer,

                          success: function (res) {

                            console.log(‘写成功了’);

                            callback(res);

                          },

                          fail: function (res) {

                            console.log(res);

                            callback(res);

}

两平台版本均是6.5.10.我的蓝牙设备是发送完指令,就会立即断开连接的。

在IOS上写完就没有反映了,运行结果是对的,回调无法工作。在安卓上,是正常的。

回到顶部