|
@@ -56,7 +56,7 @@ class bleManager {
|
|
if (res.deviceId) {
|
|
if (res.deviceId) {
|
|
if (that.callBackConnect != null) {
|
|
if (that.callBackConnect != null) {
|
|
if (that.connectWillDevice != null && res.name == that.connectWillDevice.clientType) {
|
|
if (that.connectWillDevice != null && res.name == that.connectWillDevice.clientType) {
|
|
- res.advertisData = res.advertisData ? that.buf2hex(res.advertisData) : '';
|
|
|
|
|
|
+ res.mac = res.advertisData ? that.buf2hex(res.advertisData) : '';
|
|
if (that.callBackConnect != null) {
|
|
if (that.callBackConnect != null) {
|
|
that.callBackConnect(res);
|
|
that.callBackConnect(res);
|
|
}
|
|
}
|
|
@@ -86,7 +86,7 @@ class bleManager {
|
|
for (var i = 0; i < res.devices.length; i++) {
|
|
for (var i = 0; i < res.devices.length; i++) {
|
|
var temp = res.devices[i];
|
|
var temp = res.devices[i];
|
|
if (that.connectWillDevice != null && temp.name == that.connectWillDevice.clientType) {
|
|
if (that.connectWillDevice != null && temp.name == that.connectWillDevice.clientType) {
|
|
- temp.advertisData = temp.advertisData ? that.buf2hex(temp.advertisData) : '';
|
|
|
|
|
|
+ temp.mac = temp.advertisData ? that.buf2hex(temp.advertisData) : '';
|
|
if (that.callBackConnect != null) {
|
|
if (that.callBackConnect != null) {
|
|
that.callBackConnect(temp);
|
|
that.callBackConnect(temp);
|
|
}
|
|
}
|
|
@@ -118,7 +118,7 @@ class bleManager {
|
|
else if (res[0]) {
|
|
else if (res[0]) {
|
|
if (that.callBackConnect != null) {
|
|
if (that.callBackConnect != null) {
|
|
if (that.connectWillDevice != null && res[0].name == that.connectWillDevice.clientType) {
|
|
if (that.connectWillDevice != null && res[0].name == that.connectWillDevice.clientType) {
|
|
- res[0].advertisData = res[0].advertisData ? that.buf2hex(res[0].advertisData) : '';
|
|
|
|
|
|
+ res[0].mac = res[0].advertisData ? that.buf2hex(res[0].advertisData) : '';
|
|
if (that.callBackConnect != null) {
|
|
if (that.callBackConnect != null) {
|
|
that.callBackConnect(res[0]);
|
|
that.callBackConnect(res[0]);
|
|
}
|
|
}
|
|
@@ -154,7 +154,7 @@ class bleManager {
|
|
for (var i = 0; i < res.devices.length; i++) {
|
|
for (var i = 0; i < res.devices.length; i++) {
|
|
var temp = res.devices[i];
|
|
var temp = res.devices[i];
|
|
if (that.connectWillDevice != null && temp.name == that.connectWillDevice.clientType) {
|
|
if (that.connectWillDevice != null && temp.name == that.connectWillDevice.clientType) {
|
|
- temp.advertisData = temp.advertisData ? that.buf2hex(temp.advertisData) : '';
|
|
|
|
|
|
+ temp.mac = temp.advertisData ? that.buf2hex(temp.advertisData) : '';
|
|
if (that.callBackConnect != null) {
|
|
if (that.callBackConnect != null) {
|
|
that.callBackConnect(temp);
|
|
that.callBackConnect(temp);
|
|
}
|
|
}
|