diff --git a/miniprogram/services/ble/commands.js b/miniprogram/services/ble/commands.js index 79c947d..3a41d25 100644 --- a/miniprogram/services/ble/commands.js +++ b/miniprogram/services/ble/commands.js @@ -72,6 +72,7 @@ function writeRawCommand(bytes) { reject({ error_code: 0xFF, error_msg: 'command characteristic not found' }) return } + console.log('[BLE] FFE1 发送', bytes.length + '字节', '| hex:', protocol.bytesToHex(bytes)) wx.writeBLECharacteristicValue({ deviceId: connection.getDeviceId(), serviceId: chars.command.serviceId, @@ -80,7 +81,8 @@ function writeRawCommand(bytes) { success: function () { resolve({ message: 'success', bytes: bytes }) }, - fail: function () { + fail: function (err) { + console.error('[BLE] FFE1 发送失败', err) reject({ error_code: 0x0C, error_msg: 'ERR_BLE_DISCONNECTED' }) } })