From 16bc2dda23e03e633bc7c021040ee7ae7716f01a Mon Sep 17 00:00:00 2001 From: Klaus K Wilting Date: Fri, 23 Mar 2018 16:45:27 +0100 Subject: [PATCH] loraconf_sample.h updated --- README.md | 2 +- src/loraconf.sample.h | 6 ++++-- src/lorawan.cpp | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bab5c05d..9f255cd4 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ Paxcounter is a device for metering passenger flows in realtime. It counts how m Intention of this project is to do this without intrusion in privacy: You don't need to track and fingerprint people owned devices, if you just want to count them. -Bonus of this project is that metered data ist transferred via a LoRaWAN network, not via usual GSM/LTE or Wifi uplink. +Bonus of this project is that metered data is transferred via a LoRaWAN network, not via usual GSM/LTE or Wifi uplink. If you need it, you can build this project battery powered and reach uptimes up to 3 days with a single 18650 Li-Ion cell. diff --git a/src/loraconf.sample.h b/src/loraconf.sample.h index 8a4d907c..26768853 100644 --- a/src/loraconf.sample.h +++ b/src/loraconf.sample.h @@ -9,11 +9,13 @@ /* -// Only define DEVEUI here if you don't want it to be derived from device's MAC address +// 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) -// static const u1_t DEVEUI[8]={ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; +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) +// For TTN, APPEUI always starts with 0x70, 0xB3, 0xD5 static const u1_t APPEUI[8]={ 0x00, 0x00, 0x00, 0x00, 0x00, 0xD5, 0xB3, 0x70 }; // This key should be in big endian format (or, since it is not really a diff --git a/src/lorawan.cpp b/src/lorawan.cpp index 85164280..2ce12385 100644 --- a/src/lorawan.cpp +++ b/src/lorawan.cpp @@ -53,7 +53,7 @@ void printKey(const char * name, const uint8_t * key, uint8_t len, bool lsb) { uint8_t start=lsb?len:0; uint8_t end = lsb?0:len; const uint8_t * p ; - char keystring[len+1] = "", keybyte[3]; + char keystring[len+1], keybyte[3]; for (uint8_t i=0; i