Use only unique portion of advertisement (#431)

This commit is contained in:
Darrell 2022-03-31 16:59:37 -04:00 committed by GitHub
parent 7e0d1477a4
commit 8222d1a133
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -189,10 +189,10 @@ void BleFingerprint::fingerprintServiceData(NimBLEAdvertisedDevice *advertisedDe
setId("exp:" + String(strServiceData.length()), ID_TYPE_EXPOSURE);
disc = hexStr(strServiceData).c_str();
}
else if (uuid == smartTagUUID)
else if (uuid == smartTagUUID && strServiceData.length() == 20)
{ // found Samsung smart tag
asRssi = haveTxPower ? BleFingerprintCollection::refRssi + txPower : NO_RSSI;
setId(String("smarttag:") + hexStr(strServiceData).c_str(), ID_TYPE_SMARTTAG);
setId(String("smarttag:") + hexStr(strServiceData).substr(8, 16).c_str(), ID_TYPE_SMARTTAG);
}
else if (uuid == miThermUUID)
{