|
@@ -38,7 +38,8 @@ function isDevice(device, data) {
|
|
|
// if ( advertisData.slice(4, 10).toString() == "095A5832") {
|
|
|
// return true;
|
|
|
// }
|
|
|
- if (data.name === "ZX2202220000000") {
|
|
|
+ // if (data.name === "ZX2202220000000") {
|
|
|
+ if (data.name === "865416038002201") {
|
|
|
return true
|
|
|
}
|
|
|
|
|
@@ -52,14 +53,14 @@ function alterConnect(device, deviceId) {
|
|
|
//切换正常,工厂下发指令 [[0x22,0x22,0x54,0x01,0x01,0x12,0xAA,0xAA]]
|
|
|
//OTA 升级指令 [[0x22,0x22,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,n,0xCB,0xAA,0xAA]]
|
|
|
|
|
|
- const data = [0x1F, 0x0F, 0x5A, 0x58, 0x32, 0x32, 0x30, 0x32, 0x32, 0x32, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
|
|
|
- 0x08, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x67, 0xAC, 0x53, 0xE7, 0x08, 0x00
|
|
|
- ]
|
|
|
+ // const data = [0x1F, 0x0F, ,0x5A,0x58, 0x35, 0x32, 0x30, 0x32, 0x32, 0x32, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30,
|
|
|
+ // 0x08, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x67, 0xAC, 0x53, 0xE7, 0x08, 0x00]
|
|
|
+
|
|
|
+ const data=[ 0x1F, 0x0F,0x38, 0x36, 0x35, 0x34, 0x31, 0x36, 0x30, 0x33, 0x38, 0x30, 0x30, 0x32, 0x32, 0x30, 0x31]
|
|
|
const crc_data = crc8Ieee8023(data)
|
|
|
console.log(crc_data, 111);
|
|
|
return [
|
|
|
- [0x22, 0x22, 0x01, 0x1F, 0x0F, 0x5A, 0x58, 0x32, 0x32, 0x30, 0x32, 0x32, 0x32, 0x30, 0x30, 0x30, 0x30, 0x30,
|
|
|
- 0x30, 0x30, 0x08, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x67, 0xAC, 0x53, 0xE7, 0x08, 0x00,
|
|
|
+ [0x22, 0x22, 0x01, 0x1F, 0x0F, 0x38, 0x36, 0x35, 0x34, 0x31, 0x36, 0x30, 0x33, 0x38, 0x30, 0x30, 0x32, 0x32, 0x30, 0x31, 0x08, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, 0x38, 0x67, 0xAC, 0x53, 0xE7, 0x08, 0x00,
|
|
|
crc_data, 0xAA, 0xAA
|
|
|
]
|
|
|
]
|