Date: Wed, 4 Apr 2018 01:37:59 +0200
Subject: [PATCH 10/12] Added warning on software deveui override by HW one
---
README.md | 8 +++++---
src/loraconf.sample.h | 2 ++
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
index d824ca9c..0fb86f77 100644
--- a/README.md
+++ b/README.md
@@ -23,10 +23,10 @@ Currently supported IoT boards:
- TTGOv2 {1}
- Pycom LoPy {2}
- Pycom LoPy4 {2}
-- LoLin32 with [LoraNode32 shield](https://github.com/hallard/LoLin32-Lora) {2}
-- LoLin32 Lite with [LoraNode32-Lite shield](https://github.com/hallard/LoLin32-Lite-Lora) {2}
+- LoLin32 with [LoraNode32 shield](https://github.com/hallard/LoLin32-Lora) {2}{3}
+- LoLin32 Lite with [LoraNode32-Lite shield](https://github.com/hallard/LoLin32-Lite-Lora) {2}{3}
-{1} on board OLED Display supported; {2} on board RGB LED supported
+{1} on board OLED Display supported; {2} on board RGB LED supported; {3} on board Hardware unique DEVEUI supported
Target platform must be selected in [platformio.ini](https://github.com/cyberman54/ESP32-Paxcounter/blob/master/platformio.ini).
Hardware dependent settings (pinout etc.) are stored in board files in /hal directory.
@@ -52,6 +52,8 @@ Use PlatformIO with your preferred IDE for
Before compiling the code, create file loraconf.h in the /src directory from the template [loraconf.sample.h](https://github.com/cyberman54/ESP32-Paxcounter/blob/master/src/loraconf.sample.h) and populate it with your personal APPEUI und APPKEY for the LoRaWAN network. Only OTAA join is supported, not ABP. The DEVEUI will be derived from the device's MAC adress during device startup and is shown as well on the device's display (if it has one) as on the serial console for copying it to your LoRaWAN network server settings. If you enter a DEVEUI in loraconf.h it will be used instead.
+**If Using a board with Microchip 24AA02E64 Unique ID for deveui, it will override the one of loraconf.h**
+
# Uploading
To upload the code to your ESP32 board this needs to be switched from run to bootloader mode. Boards with USB bridge like Heltec and TTGO usually have an onboard logic which allows soft switching by the upload tool. In PlatformIO this happenes automatically.
diff --git a/src/loraconf.sample.h b/src/loraconf.sample.h
index 300b4d0d..cbfd3d47 100644
--- a/src/loraconf.sample.h
+++ b/src/loraconf.sample.h
@@ -12,6 +12,8 @@
// Set your DEVEUI here, if you have one. You can leave this untouched,
// then the DEVEUI will be generated during runtime from device's MAC adress
// Note: Use same format as in TTN console (cut & paste, for your convenience)
+// *** Take care : If Using a board with Microchip 24AA02E64 Uinique ID for deveui, **
+// *** this DEVEUI will be overwriten by the one contained in the Microchip module ***
static const u1_t DEVEUI[8]={ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
// Note: Use msb format for APPEUI as in TTN console (cut & paste, for your convenience)
From 0144a305e579f49b691ed5fd66b5d46b35b1e562 Mon Sep 17 00:00:00 2001
From: Charles
Date: Wed, 4 Apr 2018 01:42:10 +0200
Subject: [PATCH 11/12] Bump to v1.2.93
---
src/main.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main.h b/src/main.h
index b6b675d5..16e8a293 100644
--- a/src/main.h
+++ b/src/main.h
@@ -1,5 +1,5 @@
// program version - note: increment version after modifications to configData_t struct!!
-#define PROGVERSION "1.2.92" // use max 10 chars here!
+#define PROGVERSION "1.2.93" // use max 10 chars here!
#define PROGNAME "PAXCNT"
// Verbose enables serial output
From dd99c078f1ed5659e135044da3413a7d9cccb3a2 Mon Sep 17 00:00:00 2001
From: Verkehrsrot <10289836+cyberman54@users.noreply.github.com>
Date: Wed, 4 Apr 2018 09:51:33 +0200
Subject: [PATCH 12/12] revert change in macsniff.cpp (to be further tested)
---
src/macsniff.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/macsniff.cpp b/src/macsniff.cpp
index ce324b80..3b217135 100644
--- a/src/macsniff.cpp
+++ b/src/macsniff.cpp
@@ -47,7 +47,7 @@ bool mac_add(uint8_t *paddr, int8_t rssi, bool sniff_type) {
// https://en.wikipedia.org/wiki/MAC_Address_Anonymization
addr2int |= (uint64_t) salt << 48; // prepend 16-bit salt to 48-bit MAC
- snprintf(macbuf, sizeof(macbuf), "%llx", addr2int); // convert unsigned 64-bit salted MAC to 16 digit hex string
+ snprintf(macbuf, 21, "%llx", addr2int); // convert unsigned 64-bit salted MAC to 16 digit hex string
hashedmac = rokkit(macbuf, 5); // hash MAC string, use 5 chars to fit hash in uint16_t container
newmac = macs.insert(hashedmac); // add hashed MAC to total container if new unique
added = newmac.second; // true if hashed MAC is unique in container
@@ -65,7 +65,7 @@ bool mac_add(uint8_t *paddr, int8_t rssi, bool sniff_type) {
}
if (added) { // first time seen this WIFI or BLE MAC
- snprintf(counter, sizeof(counter), "%i", macs.size()); // convert 16-bit MAC counter to decimal counter value
+ snprintf(counter, 6, "%i", macs.size()); // convert 16-bit MAC counter to decimal counter value
u8x8.draw2x2String(0, 0, counter); // display number on unique macs total Wifi + BLE
ESP_LOGI(TAG, "%s RSSI %04d -> Hash %04x -> counted #%05i", typebuff, rssi, hashedmac, macs.size());
} else { // already seen WIFI or BLE MAC