Add eddystone uid support (#188)

This commit is contained in:
Darrell 2022-01-17 14:26:13 -05:00 committed by GitHub
parent 43a75d023d
commit 7c6e5939c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 0 deletions

View File

@ -166,6 +166,18 @@ void BleFingerprint::fingerprint(BLEAdvertisedDevice *advertisedDevice)
Serial.println(oBeacon.toString().c_str()); Serial.println(oBeacon.toString().c_str());
#endif #endif
} }
else if (strServiceData[0] == 0x00)
{
auto serviceData = strServiceData.c_str();
int8_t rss0m = *(int8_t *)(serviceData + 1);
calRssi = EDDYSTONE_ADD_1M + rss0m;
setId(Sprintf("eddy:%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x-%02x%02x%02x%02x%02x%02x",
strServiceData[2], strServiceData[3], strServiceData[4], strServiceData[5], strServiceData[6],
strServiceData[6], strServiceData[7], strServiceData[8], strServiceData[9], strServiceData[10],
strServiceData[11], strServiceData[12], strServiceData[13], strServiceData[14], strServiceData[15],
strServiceData[16], strServiceData[17]),
ID_TYPE_EBEACON);
}
} }
else else
{ {