|
@@ -127,22 +127,22 @@ class BleUtil {
|
|
|
}
|
|
|
|
|
|
sendWiFiInfo(wifiName, pwd) {
|
|
|
- const hex_util = require('../hex_util');
|
|
|
+ const hexUtil = require('../hexUtil');
|
|
|
let result = [];
|
|
|
|
|
|
// 字母*6 +
|
|
|
- let wifiList = hex_util.string2ListInt(wifiName);
|
|
|
+ let wifiList = hexUtil.string2ListInt(wifiName);
|
|
|
|
|
|
// 数字*3 +
|
|
|
- let pwdList = hex_util.string2ListInt(pwd);
|
|
|
+ let pwdList = hexUtil.string2ListInt(pwd);
|
|
|
|
|
|
// 16进制
|
|
|
result.push(0x22);
|
|
|
- result.push(parseInt(hex_util.int2Hex(wifiList.length + pwdList.length + 6), 16));
|
|
|
+ result.push(parseInt(hexUtil.int2Hex(wifiList.length + pwdList.length + 6), 16));
|
|
|
|
|
|
// 账号
|
|
|
result.push(0x33);
|
|
|
- result.push(parseInt(hex_util.int2Hex(wifiList.length), 16));
|
|
|
+ result.push(parseInt(hexUtil.int2Hex(wifiList.length), 16));
|
|
|
|
|
|
let p = result[3] + 4;
|
|
|
let j = 0;
|
|
@@ -152,7 +152,7 @@ class BleUtil {
|
|
|
|
|
|
// 密码
|
|
|
result.splice(p, 0, 0x44);
|
|
|
- result.splice(++p, 0, parseInt(hex_util.int2Hex(pwdList.length), 16));
|
|
|
+ result.splice(++p, 0, parseInt(hexUtil.int2Hex(pwdList.length), 16));
|
|
|
p++;
|
|
|
j = 0;
|
|
|
for (let i = p; i < p + pwdList.length; i++) {
|