From 970f4652f5dd11c96b91a9dd35c63dcd710d01e2 Mon Sep 17 00:00:00 2001 From: Simon Hailes Date: Thu, 8 Apr 2021 18:00:14 +0100 Subject: [PATCH] Update to iBeacon to use only MAC to recognise different beacons - this brings it into line with common use. A further update would be nice to display major & minor in the web ui, not included here. --- tasmota/xsns_52_esp32_ibeacon_ble.ino | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasmota/xsns_52_esp32_ibeacon_ble.ino b/tasmota/xsns_52_esp32_ibeacon_ble.ino index 432455924..4ead16697 100644 --- a/tasmota/xsns_52_esp32_ibeacon_ble.ino +++ b/tasmota/xsns_52_esp32_ibeacon_ble.ino @@ -337,7 +337,7 @@ uint32_t ibeacon_add(struct IBEACON *ib) { if (!strncmp(ib->MAC,"FFFF",4) || strncmp(ib->FACID,"00000000",8)) { for (uint32_t cnt=0;cntUID,PSTR("00000000000000000000000000000000"),32)) { +// if (!strncmp_P(ib->UID,PSTR("00000000000000000000000000000000"),32)) { if (!strncmp(ibeacons[cnt].MAC,ib->MAC,12)) { // exists strncpy(ibeacons[cnt].NAME,ib->NAME,sizeof(ibeacons[cnt].NAME)); @@ -350,7 +350,7 @@ uint32_t ibeacon_add(struct IBEACON *ib) { ibeacons[cnt].count++; return 2; } - } else { +/* } else { if (!strncmp(ibeacons[cnt].UID,ib->UID,32)) { // exists strncpy(ibeacons[cnt].NAME,ib->NAME,sizeof(ibeacons[cnt].NAME)); @@ -363,7 +363,7 @@ uint32_t ibeacon_add(struct IBEACON *ib) { ibeacons[cnt].count++; return 2; } - } + }*/ } } for (uint32_t cnt=0;cnt