diff --git a/include/mqttclient.h b/include/mqttclient.h index d1bef44e..5f942aa3 100644 --- a/include/mqttclient.h +++ b/include/mqttclient.h @@ -3,11 +3,12 @@ #include "globals.h" #include "rcommand.h" -#include #include +#include -#define MQTT_INTOPIC "paxcounter/in" -#define MQTT_OUTTOPIC "paxcounter/out" +#define MQTT_ETHERNET 0 // set to 0 to run on Wifi +#define MQTT_INTOPIC "paxin" +#define MQTT_OUTTOPIC "paxout" #define MQTT_PORT 1883 #define MQTT_SERVER "broker.shiftr.io" //#define MQTT_CLIENTNAME "arduino" diff --git a/platformio.ini b/platformio.ini index 533a6e5b..5449c8bc 100644 --- a/platformio.ini +++ b/platformio.ini @@ -19,7 +19,7 @@ ;halfile = ttgov21new.h ;halfile = ttgofox.h ;halfile = ttgobeam.h -;halfile = ttgobeam10.h +halfile = ttgobeam10.h ;halfile = fipy.h ;halfile = lopy.h ;halfile = lopy4.h @@ -33,7 +33,7 @@ ;halfile = tinypicomatrix.h ;halfile = m5core.h ;halfile = m5fire.h -halfile = olimexpoeiso.h +;halfile = olimexpoeiso.h [platformio] ; upload firmware to board with usb cable @@ -61,8 +61,7 @@ display_library = ; set by build.py and taken from hal file lib_deps_lora = MCCI LoRaWAN LMIC library@3.2.0 ; MCCI LMIC by Terrill Moore lib_deps_display = - ;OneBitDisplay@>1.4.0 - https://github.com/bitbank2/OneBitDisplay.git + OneBitDisplay@1.5.0 QRCode@0.0.1 BitBang_I2C@2.1.1 TFT_eSPI@>=2.2.8 @@ -73,7 +72,7 @@ lib_deps_rgbled = lib_deps_gps = 1655@>=1.0.2 ; #1655 TinyGPSPlus by Mikal Hart lib_deps_sensors = - Adafruit Unified Sensor@>=1.1.3 + Adafruit Unified Sensor@>=1.1.4 Adafruit BME280 Library@>=2.0.2 Adafruit BMP085 Library@>=1.1.0 BSEC Software Library@1.5.1474 diff --git a/src/lorawan.cpp b/src/lorawan.cpp index 0d39ded8..8ed6aa14 100644 --- a/src/lorawan.cpp +++ b/src/lorawan.cpp @@ -582,6 +582,7 @@ const char *getCrName(rps_t rps) { #if (VERBOSE) // decode LORAWAN MAC message +// see https://github.com/mcci-catena/arduino-lmic/blob/master/doc/LoRaWAN-at-a-glance.pdf void mac_decode(const uint8_t cmd[], const uint8_t cmdlen, bool is_down) { if (!cmdlen) diff --git a/src/mqttclient.cpp b/src/mqttclient.cpp index a36dff54..e9333c8a 100644 --- a/src/mqttclient.cpp +++ b/src/mqttclient.cpp @@ -16,8 +16,8 @@ esp_err_t mqtt_init(void) { // setup network connection WiFi.onEvent(NetworkEvent); ETH.begin(); - // WiFi.mode(WIFI_STA); - // WiFi.begin("SSID", "PW"); + //WiFi.mode(WIFI_STA); + //WiFi.begin("SSID", "PASSWORD"); // setup mqtt client mqttClient.begin(MQTT_SERVER, MQTT_PORT, netClient);