收藏
回答

BLE DEMO有错误

回答关注问题邀请回答
收藏

1 个回答

  • 👿
    👿
    2023-11-28
      writeBLECharacteristicValue() {
        // 向蓝牙设备发送一个0x00的16进制数据
        let buffer = new ArrayBuffer(1)
        let dataView = new DataView(buffer)
        dataView.setUint8(0Math.random() * 255 | 0)
        wx.writeBLECharacteristicValue({
          deviceIdthis._deviceId,
          //以下代码serviceId定义错了
          serviceIdthis._deviceId,
          characteristicIdthis._characteristicId,
          value: buffer,
        })
      },
    
    2023-11-28
    有用
    回复
登录 后发表内容