From f116585c2a4b7c20620379f342b851c9995fd82e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Fri, 7 Oct 2022 19:26:45 +0200 Subject: [PATCH 1/4] Don't mix MQTT Payloads of Firmware 1.2 and 1.3/2.0 --- src/mqtt/MQTT.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mqtt/MQTT.cpp b/src/mqtt/MQTT.cpp index f4ff05596..7087c58c8 100644 --- a/src/mqtt/MQTT.cpp +++ b/src/mqtt/MQTT.cpp @@ -14,9 +14,9 @@ MQTT *mqtt; -String statusTopic = "msh/1/stat/"; -String cryptTopic = "msh/1/c/"; // msh/1/c/CHANNELID/NODEID -String jsonTopic = "msh/1/json/"; // msh/1/json/CHANNELID/NODEID +String statusTopic = "msh/2/stat/"; +String cryptTopic = "msh/2/c/"; // msh/2/c/CHANNELID/NODEID +String jsonTopic = "msh/2/json/"; // msh/2/json/CHANNELID/NODEID void MQTT::mqttCallback(char *topic, byte *payload, unsigned int length) { From 63ced7da7c496241adf3b8f2d5f837c32e8a3eb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Fri, 7 Oct 2022 20:28:20 +0200 Subject: [PATCH 2/4] use upstream nRF52 toolkit. (TEST) also RTC Lib 1.0.1 is finally out. --- arch/nrf52/nrf52.ini | 4 ++-- variants/m5stack_coreink/platformio.ini | 3 +-- variants/t-echo/platformio.ini | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/arch/nrf52/nrf52.ini b/arch/nrf52/nrf52.ini index a79ebda48..8e0d2f1b8 100644 --- a/arch/nrf52/nrf52.ini +++ b/arch/nrf52/nrf52.ini @@ -1,7 +1,7 @@ [nrf52_base] ; Instead of the standard nordicnrf52 platform, we use our fork which has our added variant files -; platform = nordicnrf52 ;pending https://github.com/platformio/builder-framework-arduino-nrf5/pull/7 -platform = https://github.com/meshtastic/platform-nordicnrf52.git#merge +platform = platformio/nordicnrf52@^9.4.0 +; platform = https://github.com/meshtastic/platform-nordicnrf52.git#merge extends = arduino_base build_type = debug ; I'm debugging with ICE a lot now diff --git a/variants/m5stack_coreink/platformio.ini b/variants/m5stack_coreink/platformio.ini index 00c44628d..c33187da0 100644 --- a/variants/m5stack_coreink/platformio.ini +++ b/variants/m5stack_coreink/platformio.ini @@ -12,8 +12,7 @@ build_flags = lib_deps = ${esp32_base.lib_deps} zinggjm/GxEPD2@^1.4.9 -# lewisxhe/PCF8563_Library@^1.0.1 // switch to this one when it is released! - https://github.com/lewisxhe/PCF8563_Library.git#fe8cface109f63b5a4fb6abeaf87c6de0faa24c6 + lewisxhe/PCF8563_Library@^1.0.1 board_build.f_cpu = 240000000L upload_protocol = esptool upload_port = /dev/ttyACM* diff --git a/variants/t-echo/platformio.ini b/variants/t-echo/platformio.ini index 3582f7ed9..201c14657 100644 --- a/variants/t-echo/platformio.ini +++ b/variants/t-echo/platformio.ini @@ -14,6 +14,5 @@ lib_deps = ${nrf52840_base.lib_deps} https://github.com/meshtastic/GxEPD2#afce87a97dda1ac31d8a28dc8fa7c6f55dc96a61 adafruit/Adafruit BusIO@^1.13.2 -# lewisxhe/PCF8563_Library@^1.0.1 // switch to this one when it is released! - https://github.com/lewisxhe/PCF8563_Library.git#fe8cface109f63b5a4fb6abeaf87c6de0faa24c6 + lewisxhe/PCF8563_Library@^1.0.1 ;upload_protocol = fs From 984f0ca12cf46b95ffd217a2ff08e766de374bcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Mon, 10 Oct 2022 12:28:31 +0200 Subject: [PATCH 3/4] check allowed range for lora.channel_num --- src/mesh/RadioInterface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesh/RadioInterface.cpp b/src/mesh/RadioInterface.cpp index 1a6ad856d..9674f0c88 100644 --- a/src/mesh/RadioInterface.cpp +++ b/src/mesh/RadioInterface.cpp @@ -422,7 +422,7 @@ void RadioInterface::applyModemConfig() // If user has manually specified a channel num, then use that, otherwise generate one by hashing the name const char *channelName = channels.getName(channels.getPrimaryIndex()); - int channel_num = loraConfig.channel_num ? loraConfig.channel_num - 1 : hash(channelName) % numChannels; + int channel_num = (loraConfig.channel_num ? loraConfig.channel_num - 1 : hash(channelName)) % numChannels; // Old frequency selection formula // float freq = myRegion->freqStart + ((((myRegion->freqEnd - myRegion->freqStart) / numChannels) / 2) * channel_num); From d2fe4426c115cfb9365337af5911068ef5a2fc5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20G=C3=B6ttgens?= Date: Mon, 10 Oct 2022 12:32:08 +0200 Subject: [PATCH 4/4] Revert Platform Change for now. --- arch/nrf52/nrf52.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/nrf52/nrf52.ini b/arch/nrf52/nrf52.ini index 8e0d2f1b8..a79ebda48 100644 --- a/arch/nrf52/nrf52.ini +++ b/arch/nrf52/nrf52.ini @@ -1,7 +1,7 @@ [nrf52_base] ; Instead of the standard nordicnrf52 platform, we use our fork which has our added variant files -platform = platformio/nordicnrf52@^9.4.0 -; platform = https://github.com/meshtastic/platform-nordicnrf52.git#merge +; platform = nordicnrf52 ;pending https://github.com/platformio/builder-framework-arduino-nrf5/pull/7 +platform = https://github.com/meshtastic/platform-nordicnrf52.git#merge extends = arduino_base build_type = debug ; I'm debugging with ICE a lot now