wx.onBLECharacteristicValueChange(function(res) {
  console.log(`characteristic ${res.characteristicId} has changed, now is ${res.value}`)
})

藍(lán)牙錯(cuò)誤碼(errCode)列表

錯(cuò)誤碼 說(shuō)明 備注
0 ok 正常
10000 not init 未初始化藍(lán)牙適配器
10001 not available 當(dāng)前藍(lán)牙適配器不可用
10002 no device 沒(méi)有找到指定設(shè)備
10003 connection fail 連接失敗
10004 no service 沒(méi)有找到指定服務(wù)
10005 no characteristic 沒(méi)有找到指定特征值
10006 no connection 當(dāng)前連接已斷開(kāi)
10007 property not support 當(dāng)前特征值不支持此操作
10008 system error 其余所有系統(tǒng)上報(bào)的異常
10009 system not support Android 系統(tǒng)特有,系統(tǒng)版本低于 4.3 不支持BLE
10010 no descriptor 沒(méi)有找到指定描述符