|
@@ -37,7 +37,7 @@ class BLE{
|
|
|
var bleArray = res.devices;
|
|
|
//这里会收到周边搜索到的蓝牙
|
|
|
console.log("\n\nfind devices ----");
|
|
|
- console.log(res);
|
|
|
+ // console.log(res);
|
|
|
console.log(res.devices);
|
|
|
// 对
|
|
|
for (let index = 0; index < bleArray.length; index++) {
|
|
@@ -46,7 +46,11 @@ class BLE{
|
|
|
if(ble.advertisData){
|
|
|
// 解析到特征值设备
|
|
|
let advertisData = buf2hex(ble.advertisData);
|
|
|
+ let deviceId = buf2hex(ble.deviceId);
|
|
|
+ let devName = ble.name;
|
|
|
+ console.log(`设备名:${devName} 设备id:${deviceId} 特征值:${advertisData}`);
|
|
|
console.log(advertisData);
|
|
|
+
|
|
|
console.log(ble);
|
|
|
if (this.useWhiteList ){
|
|
|
if(whiteList.find(codeStr=>advertisData.startsWith(codeStr))){
|