diff --git a/pages/asyntest/asyntest.js b/pages/asyntest/asyntest.js index f0733ff..5e1cf77 100644 --- a/pages/asyntest/asyntest.js +++ b/pages/asyntest/asyntest.js @@ -167,22 +167,21 @@ Page({ }, 1000); let cmd = 0x29 - let dn = util.stringToUint8ArrayWithPadding(deviceNum, 20, 'F') - let data = 0x00360008 - - let length = 1 + 20 + 4 + 1 + 1 + let dn = util.stringToUint8ArrayWithPadding(deviceNum, 20, 0xff) + let length = 1 + 20 + 5 + 1 + 1 let b = new Uint8Array(length) b[0] = cmd b.set(dn, 1) - - b[21] = (data>>24)&0xff; - b[22] = (data>>16)&0xff; - b[23] = (data>>8)&0xff; - b[24] = data&0xff; - b[25] = 0x03 - b[26] = 0x01 + b[21] = 0x00 + b[22] = 0x36 + b[23] = 0x00 + b[24] = 0x00 + b[25] = 0x08 + + b[26] = 0x03 + b[27] = 0x01 console.log(b) app.globalData.ble.send(cmd, b, length)