Skip to content

Commit

Permalink
[RMAC] Filter on RMAC instead of model_id (#74)
Browse files Browse the repository at this point in the history
Replace the filter on model_id by the type identification of random mac RMAC
  • Loading branch information
1technophile authored Apr 13, 2023
1 parent ae268c5 commit 77c634b
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions src/DeviceManager_theengs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,8 @@ Device * DeviceManager::createTheengsDevice_fromAdv(const QBluetoothDeviceInfo &
deviceTypes = QString::fromStdString(doc["type"]);
deviceProps = QString::fromStdString(dec.getTheengProperties(deviceModelID.toLatin1()));

if (deviceModelID == "IBEACON") continue;
if (deviceModelID == "MS-CDP") continue;
if (deviceModelID == "GAEN") continue;
// Do not process devices with random macs
if (deviceTypes == "RMAC") continue;

qDebug() << "addDevice() FOUND [mfd] :" << deviceModel << deviceModelID << deviceTags << deviceTypes << deviceProps;
break;
Expand Down Expand Up @@ -184,9 +183,8 @@ Device * DeviceManager::createTheengsDevice_fromAdv(const QBluetoothDeviceInfo &
deviceTypes = QString::fromStdString(doc["type"]);
deviceProps = QString::fromStdString(dec.getTheengProperties(deviceModelID.toLatin1()));

if (deviceModelID == "IBEACON") continue;
if (deviceModelID == "MS-CDP") continue;
if (deviceModelID == "GAEN") continue;
// Do not process devices with random macs
if (deviceTypes == "RMAC") continue;

qDebug() << "addDevice() FOUND [svd] :" << deviceModel << deviceModelID << deviceTags << deviceTypes << deviceProps;
break;
Expand Down Expand Up @@ -281,10 +279,10 @@ QString DeviceManager::getDeviceModelIdTheengs_fromAdv(const QBluetoothDeviceInf
{
QString model = QString::fromStdString(doc["model"]);
QString modelId = QString::fromStdString(doc["model_id"]);
QString deviceTypes = QString::fromStdString(doc["type"]);

if (modelId == "IBEACON") continue;
if (modelId == "MS-CDP") continue;
if (modelId == "GAEN") continue;
// Do not process devices with random macs
if (deviceTypes == "RMAC") continue;
if (modelId.isEmpty()) continue;

return modelId;
Expand All @@ -306,10 +304,10 @@ QString DeviceManager::getDeviceModelIdTheengs_fromAdv(const QBluetoothDeviceInf
{
QString model = QString::fromStdString(doc["model"]);
QString modelId = QString::fromStdString(doc["model_id"]);
QString deviceTypes = QString::fromStdString(doc["type"]);

if (modelId == "IBEACON") continue;
if (modelId == "MS-CDP") continue;
if (modelId == "GAEN") continue;
// Do not process devices with random macs
if (deviceTypes == "RMAC") continue;
if (modelId.isEmpty()) continue;

return modelId;
Expand Down

0 comments on commit 77c634b

Please sign in to comment.