debug: log FFE1 command hex on every writeRawCommand
这个提交包含在:
@@ -72,6 +72,7 @@ function writeRawCommand(bytes) {
|
|||||||
reject({ error_code: 0xFF, error_msg: 'command characteristic not found' })
|
reject({ error_code: 0xFF, error_msg: 'command characteristic not found' })
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
console.log('[BLE] FFE1 发送', bytes.length + '字节', '| hex:', protocol.bytesToHex(bytes))
|
||||||
wx.writeBLECharacteristicValue({
|
wx.writeBLECharacteristicValue({
|
||||||
deviceId: connection.getDeviceId(),
|
deviceId: connection.getDeviceId(),
|
||||||
serviceId: chars.command.serviceId,
|
serviceId: chars.command.serviceId,
|
||||||
@@ -80,7 +81,8 @@ function writeRawCommand(bytes) {
|
|||||||
success: function () {
|
success: function () {
|
||||||
resolve({ message: 'success', bytes: bytes })
|
resolve({ message: 'success', bytes: bytes })
|
||||||
},
|
},
|
||||||
fail: function () {
|
fail: function (err) {
|
||||||
|
console.error('[BLE] FFE1 发送失败', err)
|
||||||
reject({ error_code: 0x0C, error_msg: 'ERR_BLE_DISCONNECTED' })
|
reject({ error_code: 0x0C, error_msg: 'ERR_BLE_DISCONNECTED' })
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
在新工单中引用
屏蔽一个用户