From a23c58c10a7a71994be8f5c07aa8ab752d869403 Mon Sep 17 00:00:00 2001 From: oscgonfer Date: Wed, 6 Aug 2025 13:38:36 +0200 Subject: [PATCH 01/11] Avoid acquiring lock twice (#7555) Co-authored-by: Ben Meadors --- src/modules/Telemetry/Sensor/NAU7802Sensor.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/modules/Telemetry/Sensor/NAU7802Sensor.cpp b/src/modules/Telemetry/Sensor/NAU7802Sensor.cpp index ef1756b36..b6b5d89f7 100644 --- a/src/modules/Telemetry/Sensor/NAU7802Sensor.cpp +++ b/src/modules/Telemetry/Sensor/NAU7802Sensor.cpp @@ -112,9 +112,8 @@ bool NAU7802Sensor::saveCalibrationData() } else { okay = true; } - spiLock->lock(); + // Note: SafeFile::close() already acquires the lock and releases it internally okay &= file.close(); - spiLock->unlock(); return okay; } From 691327b2db474e2cf30e3dc099f2ee1ddd08cceb Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Thu, 7 Aug 2025 06:28:15 -0500 Subject: [PATCH 02/11] Initial support for the ThinkNode M5 (#7502) * Initial support for the ThinkNode M5 * Update variants/esp32s3/ELECROW-ThinkNode-M5/platformio.ini Co-authored-by: Austin * Cleanup variant.h for Elecrow Thinknode M5 * Properly detect battery voltage * Turn backlight off when screen sleeps --------- Co-authored-by: Ben Meadors Co-authored-by: Austin --- src/graphics/EInkDisplay2.cpp | 15 ++++ src/graphics/EInkDisplay2.h | 2 +- src/graphics/Screen.cpp | 9 ++ src/main.cpp | 13 +++ src/main.h | 5 ++ src/modules/SerialModule.cpp | 11 ++- src/platform/esp32/architecture.h | 2 + .../ELECROW-ThinkNode-M5/pins_arduino.h | 28 +++++++ .../ELECROW-ThinkNode-M5/platformio.ini | 21 +++++ .../esp32s3/ELECROW-ThinkNode-M5/variant.h | 83 +++++++++++++++++++ 10 files changed, 184 insertions(+), 5 deletions(-) create mode 100644 variants/esp32s3/ELECROW-ThinkNode-M5/pins_arduino.h create mode 100644 variants/esp32s3/ELECROW-ThinkNode-M5/platformio.ini create mode 100644 variants/esp32s3/ELECROW-ThinkNode-M5/variant.h diff --git a/src/graphics/EInkDisplay2.cpp b/src/graphics/EInkDisplay2.cpp index 3bd20feec..a627a42cc 100644 --- a/src/graphics/EInkDisplay2.cpp +++ b/src/graphics/EInkDisplay2.cpp @@ -151,6 +151,21 @@ bool EInkDisplay::connect() #else adafruitDisplay->setRotation(3); #endif + adafruitDisplay->setPartialWindow(0, 0, displayWidth, displayHeight); + } +#elif defined(ELECROW_ThinkNode_M5) + { + // Start HSPI + hspi = new SPIClass(HSPI); + hspi->begin(PIN_EINK_SCLK, -1, PIN_EINK_MOSI, PIN_EINK_CS); // SCLK, MISO, MOSI, SS + + auto lowLevel = new EINK_DISPLAY_MODEL(PIN_EINK_CS, PIN_EINK_DC, PIN_EINK_RES, PIN_EINK_BUSY, *hspi); + + adafruitDisplay = new GxEPD2_BW(*lowLevel); + adafruitDisplay->init(); + + adafruitDisplay->setRotation(4); + adafruitDisplay->setPartialWindow(0, 0, displayWidth, displayHeight); } #elif defined(MESHLINK) diff --git a/src/graphics/EInkDisplay2.h b/src/graphics/EInkDisplay2.h index 284337627..b840ce9ba 100644 --- a/src/graphics/EInkDisplay2.h +++ b/src/graphics/EInkDisplay2.h @@ -80,7 +80,7 @@ class EInkDisplay : public OLEDDisplay // If display uses HSPI #if defined(HELTEC_WIRELESS_PAPER) || defined(HELTEC_WIRELESS_PAPER_V1_0) || defined(HELTEC_VISION_MASTER_E213) || \ defined(HELTEC_VISION_MASTER_E290) || defined(TLORA_T3S3_EPAPER) || defined(CROWPANEL_ESP32S3_5_EPAPER) || \ - defined(CROWPANEL_ESP32S3_4_EPAPER) || defined(CROWPANEL_ESP32S3_2_EPAPER) + defined(CROWPANEL_ESP32S3_4_EPAPER) || defined(CROWPANEL_ESP32S3_2_EPAPER) || defined(ELECROW_ThinkNode_M5) SPIClass *hspi = NULL; #endif diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index 33dc7efcc..8d5635f89 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -391,6 +391,10 @@ void Screen::handleSetOn(bool on, FrameCallback einkScreensaver) dispdev->displayOn(); #endif +#ifdef ELECROW_ThinkNode_M5 + io.digitalWrite(PCA_PIN_EINK_EN, HIGH); +#endif + #if defined(ST7789_CS) && \ !defined(M5STACK) // set display brightness when turning on screens. Just moved function from TFTDisplay to here. static_cast(dispdev)->setDisplayBrightness(brightness); @@ -425,6 +429,11 @@ void Screen::handleSetOn(bool on, FrameCallback einkScreensaver) digitalWrite(PIN_EINK_EN, LOW); } #endif + +#ifdef ELECROW_ThinkNode_M5 + io.digitalWrite(PCA_PIN_EINK_EN, LOW); +#endif + dispdev->displayOff(); #ifdef USE_ST7789 SPI1.end(); diff --git a/src/main.cpp b/src/main.cpp index 605fbe50a..7fc1d2cf2 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -38,6 +38,10 @@ #include #include +#ifdef ELECROW_ThinkNode_M5 +PCA9557 io(0x18, &Wire); +#endif + #ifdef ARCH_ESP32 #include "freertosinc.h" #if !MESHTASTIC_EXCLUDE_WEBSERVER @@ -296,6 +300,15 @@ void setup() digitalWrite(PIN_POWER_EN, HIGH); #endif +#if defined(ELECROW_ThinkNode_M5) + Wire.begin(48, 47); + io.pinMode(PCA_PIN_EINK_EN, OUTPUT); + io.pinMode(PCA_PIN_POWER_EN, OUTPUT); + io.digitalWrite(PCA_PIN_EINK_EN, HIGH); + io.digitalWrite(PCA_PIN_POWER_EN, HIGH); + // io.pinMode(C2_PIN, OUTPUT); +#endif + #ifdef LED_POWER pinMode(LED_POWER, OUTPUT); digitalWrite(LED_POWER, LED_STATE_ON); diff --git a/src/main.h b/src/main.h index 7105bd62b..3568daad2 100644 --- a/src/main.h +++ b/src/main.h @@ -51,6 +51,11 @@ extern Adafruit_DRV2605 drv; extern AudioThread *audioThread; #endif +#ifdef ELECROW_ThinkNode_M5 +#include +extern PCA9557 io; +#endif + #ifdef HAS_UDP_MULTICAST #include "mesh/udp/UdpMulticastHandler.h" extern UdpMulticastHandler *udpHandler; diff --git a/src/modules/SerialModule.cpp b/src/modules/SerialModule.cpp index f3091e5bf..39b297965 100644 --- a/src/modules/SerialModule.cpp +++ b/src/modules/SerialModule.cpp @@ -60,7 +60,8 @@ SerialModule *serialModule; SerialModuleRadio *serialModuleRadio; -#if defined(TTGO_T_ECHO) || defined(CANARYONE) || defined(MESHLINK) || defined(ELECROW_ThinkNode_M1) +#if defined(TTGO_T_ECHO) || defined(CANARYONE) || defined(MESHLINK) || defined(ELECROW_ThinkNode_M1) || \ + defined(ELECROW_ThinkNode_M5) SerialModule::SerialModule() : StreamAPI(&Serial), concurrency::OSThread("Serial") {} static Print *serialPrint = &Serial; #elif defined(CONFIG_IDF_TARGET_ESP32C6) @@ -178,7 +179,8 @@ int32_t SerialModule::runOnce() Serial.begin(baud); Serial.setTimeout(moduleConfig.serial.timeout > 0 ? moduleConfig.serial.timeout : TIMEOUT); } -#elif !defined(TTGO_T_ECHO) && !defined(CANARYONE) && !defined(MESHLINK) && !defined(ELECROW_ThinkNode_M1) +#elif !defined(TTGO_T_ECHO) && !defined(CANARYONE) && !defined(MESHLINK) && !defined(ELECROW_ThinkNode_M1) && \ + !defined(ELECROW_ThinkNode_M5) if (moduleConfig.serial.rxd && moduleConfig.serial.txd) { #ifdef ARCH_RP2040 Serial2.setFIFOSize(RX_BUFFER); @@ -234,7 +236,8 @@ int32_t SerialModule::runOnce() } } -#if !defined(TTGO_T_ECHO) && !defined(CANARYONE) && !defined(MESHLINK) && !defined(ELECROW_ThinkNode_M1) +#if !defined(TTGO_T_ECHO) && !defined(CANARYONE) && !defined(MESHLINK) && !defined(ELECROW_ThinkNode_M1) && \ + !defined(ELECROW_ThinkNode_M5) else if ((moduleConfig.serial.mode == meshtastic_ModuleConfig_SerialConfig_Serial_Mode_WS85)) { processWXSerial(); @@ -494,7 +497,7 @@ ParsedLine parseLine(const char *line) void SerialModule::processWXSerial() { #if !defined(TTGO_T_ECHO) && !defined(CANARYONE) && !defined(CONFIG_IDF_TARGET_ESP32C6) && !defined(MESHLINK) && \ - !defined(ELECROW_ThinkNode_M1) + !defined(ELECROW_ThinkNode_M1) && !defined(ELECROW_ThinkNode_M5) static unsigned int lastAveraged = 0; static unsigned int averageIntervalMillis = 300000; // 5 minutes hard coded. static double dir_sum_sin = 0; diff --git a/src/platform/esp32/architecture.h b/src/platform/esp32/architecture.h index 3168d9121..522e862ac 100644 --- a/src/platform/esp32/architecture.h +++ b/src/platform/esp32/architecture.h @@ -146,6 +146,8 @@ #define HW_VENDOR meshtastic_HardwareModel_EBYTE_ESP32_S3 #elif defined(ELECROW_ThinkNode_M2) #define HW_VENDOR meshtastic_HardwareModel_THINKNODE_M2 +#elif defined(ELECROW_ThinkNode_M5) +#define HW_VENDOR meshtastic_HardwareModel_THINKNODE_M5 #elif defined(ESP32_S3_PICO) #define HW_VENDOR meshtastic_HardwareModel_ESP32_S3_PICO #elif defined(SENSELORA_S3) diff --git a/variants/esp32s3/ELECROW-ThinkNode-M5/pins_arduino.h b/variants/esp32s3/ELECROW-ThinkNode-M5/pins_arduino.h new file mode 100644 index 000000000..46415d30f --- /dev/null +++ b/variants/esp32s3/ELECROW-ThinkNode-M5/pins_arduino.h @@ -0,0 +1,28 @@ +// Need this file for ESP32-S3 +// No need to modify this file, changes to pins imported from variant.h +// Most is similar to https://github.com/espressif/arduino-esp32/blob/master/variants/esp32s3/pins_arduino.h + +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include +#include + +#define USB_VID 0x303a +#define USB_PID 0x1001 + +// Serial +static const uint8_t TX = UART_TX; +static const uint8_t RX = UART_RX; + +// Default SPI will be mapped to Radio +static const uint8_t SS = LORA_CS; +static const uint8_t SCK = LORA_SCK; +static const uint8_t MOSI = LORA_MOSI; +static const uint8_t MISO = LORA_MISO; + +// The default Wire will be mapped to PMU and RTC +static const uint8_t SCL = I2C_SCL; +static const uint8_t SDA = I2C_SDA; + +#endif /* Pins_Arduino_h */ diff --git a/variants/esp32s3/ELECROW-ThinkNode-M5/platformio.ini b/variants/esp32s3/ELECROW-ThinkNode-M5/platformio.ini new file mode 100644 index 000000000..7dac6e66e --- /dev/null +++ b/variants/esp32s3/ELECROW-ThinkNode-M5/platformio.ini @@ -0,0 +1,21 @@ +[env:thinknode_m5] +extends = esp32s3_base +board = ESP32-S3-WROOM-1-N4 +build_flags = + ${esp32s3_base.build_flags} + -D ELECROW_ThinkNode_M5 + -I variants/esp32s3/ELECROW-ThinkNode-M5 + -DEINK_DISPLAY_MODEL=GxEPD2_154_D67 + -DEINK_WIDTH=200 + -DEINK_HEIGHT=200 + -DUSE_EINK_DYNAMICDISPLAY ; Enable Dynamic EInk + -DEINK_LIMIT_FASTREFRESH=10 ; How many consecutive fast-refreshes are permitted //20 + -DEINK_LIMIT_RATE_BACKGROUND_SEC=10 ; Minimum interval between BACKGROUND updates //30 + -DEINK_LIMIT_RATE_RESPONSIVE_SEC=1 ; Minimum interval between RESPONSIVE updates +; -DEINK_LIMIT_GHOSTING_PX=2000 ; (Optional) How much image ghosting is tolerated + -DEINK_BACKGROUND_USES_FAST ; (Optional) Use FAST refresh for both BACKGROUND and RESPONSIVE, until a limit is reached. + +lib_deps = ${esp32s3_base.lib_deps} + https://github.com/meshtastic/GxEPD2/archive/1655054ba298e0e29fc2044741940f927f9c2a43.zip + lewisxhe/PCF8563_Library@^1.0.1 + maxpromer/PCA9557-arduino @ ^1.0.0 \ No newline at end of file diff --git a/variants/esp32s3/ELECROW-ThinkNode-M5/variant.h b/variants/esp32s3/ELECROW-ThinkNode-M5/variant.h new file mode 100644 index 000000000..61d6149d2 --- /dev/null +++ b/variants/esp32s3/ELECROW-ThinkNode-M5/variant.h @@ -0,0 +1,83 @@ +#ifndef ELECROW_ThinkNode_M5_VAR +#define ELECROW_ThinkNode_M5_VAR + +#define UART_TX 43 +#define UART_RX 44 + +// LED +// Both of these are on the GPIO expander +#define PCA_LED_USER 1 // the Blue LED +#define PCA_LED_POWER 3 // the Red LED? Seems to have hardware logic to blink when USB is plugged in. + +// USB_CHECK +#define EXT_PWR_DETECT 12 +#define BATTERY_PIN 8 +#define ADC_CHANNEL ADC1_GPIO8_CHANNEL + +#define PIN_BUZZER 9 + +// Buttons + +#define PIN_BUTTON2 14 +#define PIN_BUTTON1 21 + +// Wire Interfaces + +#define I2C_SCL 1 +#define I2C_SDA 2 + +// GPS pins +#define GPS_SWITH 10 +#define HAS_GPS 1 +#define GPS_L76K +#define PIN_GPS_REINIT 13 // An output to reset L76K GPS. As per datasheet, low for > 100ms will reset the L76K + +#define PIN_GPS_STANDBY 11 // An output to wake GPS, low means allow sleep, high means force wake + +#define GPS_TX_PIN 20 // This is for bits going TOWARDS the CPU +#define GPS_RX_PIN 19 // This is for bits going TOWARDS the GPS + +#define GPS_THREAD_INTERVAL 50 + +#define PIN_SERIAL1_RX GPS_TX_PIN +#define PIN_SERIAL1_TX GPS_RX_PIN + +// PCF8563 RTC Module +#define PCF8563_RTC 0x51 + +#define SX126X_CS 17 +#define LORA_SCK 16 +#define LORA_MOSI 15 +#define LORA_MISO 7 +#define SX126X_RESET 6 +#define SX126X_BUSY 5 +#define SX126X_DIO1 4 +#define SX126X_DIO2_AS_RF_SWITCH +#define SX126X_DIO3_TCXO_VOLTAGE 3.3 +#define SX126X_POWER_EN 46 +#define SX126X_MAX_POWER 22 // SX126xInterface.cpp defaults to 22 if not defined, but here we define it for good practice +#define USE_SX1262 +#define LORA_CS SX126X_CS // FIXME: for some reason both are used in /src +#define LORA_DIO1 SX126X_DIO1 + +#define USE_EINK +#define PIN_EINK_EN -1 // Note: this is really just backlight power +#define PCA_PIN_EINK_EN 5 // This is the pin number on the GPIO expander +#define PIN_EINK_CS 39 +#define PIN_EINK_BUSY 42 +#define PIN_EINK_DC 40 +#define PIN_EINK_RES 41 +#define PIN_EINK_SCLK 38 +#define PIN_EINK_MOSI 45 // also called SDI + +// Controls power for all peripherals (eink + GPS + LoRa + Sensor) +#define PIN_POWER_EN -1 +#define PCA_PIN_POWER_EN 4 // This is the pin number on the GPIO expander + +#define PIN_SPI_MISO 7 +#define PIN_SPI_MOSI 15 +#define PIN_SPI_SCK 16 + +#define BUTTON_PIN PIN_BUTTON1 +#define BUTTON_PIN_ALT PIN_BUTTON2 +#endif From f2a880f81361d252427632d1c77ddb967382e2a1 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 7 Aug 2025 13:56:17 +0200 Subject: [PATCH 03/11] chore(deps): update adafruit shtc3 to v1.0.2 (#7557) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 8bf56cf5b..6330f3908 100644 --- a/platformio.ini +++ b/platformio.ini @@ -178,7 +178,7 @@ lib_deps = # renovate: datasource=custom.pio depName=Adafruit MAX1704X packageName=adafruit/library/Adafruit MAX1704X adafruit/Adafruit MAX1704X@1.0.3 # renovate: datasource=custom.pio depName=Adafruit SHTC3 packageName=adafruit/library/Adafruit SHTC3 Library - adafruit/Adafruit SHTC3 Library@1.0.1 + adafruit/Adafruit SHTC3 Library@1.0.2 # renovate: datasource=custom.pio depName=Adafruit LPS2X packageName=adafruit/library/Adafruit LPS2X adafruit/Adafruit LPS2X@2.0.6 # renovate: datasource=custom.pio depName=Adafruit SHT31 packageName=adafruit/library/Adafruit SHT31 Library From 8568b56ac6cdcc39efdc19b3c0fd6cad27d51ac0 Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Thu, 7 Aug 2025 12:28:01 -0500 Subject: [PATCH 04/11] Fix a crash on Native reboot (#7570) --- src/Power.cpp | 6 ++++-- src/mesh/api/WiFiServerAPI.cpp | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/Power.cpp b/src/Power.cpp index b489bc33c..8a16132f1 100644 --- a/src/Power.cpp +++ b/src/Power.cpp @@ -724,10 +724,12 @@ void Power::reboot() SPI.end(); Wire.end(); Serial1.end(); - if (screen) + if (screen) { delete screen; + screen = nullptr; + } LOG_DEBUG("final reboot!"); - reboot(); + ::reboot(); #elif defined(ARCH_STM32WL) HAL_NVIC_SystemReset(); #else diff --git a/src/mesh/api/WiFiServerAPI.cpp b/src/mesh/api/WiFiServerAPI.cpp index 5b63bc165..b19194f78 100644 --- a/src/mesh/api/WiFiServerAPI.cpp +++ b/src/mesh/api/WiFiServerAPI.cpp @@ -17,7 +17,10 @@ void initApiServer(int port) } void deInitApiServer() { - delete apiPort; + if (apiPort) { + delete apiPort; + apiPort = nullptr; + } } WiFiServerAPI::WiFiServerAPI(WiFiClient &_client) : ServerAPI(_client) From 7b874cf597e1a68dd9adafe903e87ce0c02943fd Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 8 Aug 2025 11:31:49 -0500 Subject: [PATCH 05/11] chore(deps): update meshtastic/device-ui digest to d044c01 (#7578) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 6330f3908..a5a23e56f 100644 --- a/platformio.ini +++ b/platformio.ini @@ -110,7 +110,7 @@ lib_deps = [device-ui_base] lib_deps = # renovate: datasource=git-refs depName=meshtastic/device-ui packageName=https://github.com/meshtastic/device-ui gitBranch=master - https://github.com/meshtastic/device-ui/archive/c75d545bf9e8d1fe20051c319f427f711113ff22.zip + https://github.com/meshtastic/device-ui/archive/d044c01e87583867011991a96f926e4e929d8a93.zip ; Common libs for environmental measurements in telemetry module [environmental_base] From c1f4f79d4a35ec6fc3e7b89e515b9ef5ee40e4a4 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sat, 9 Aug 2025 06:11:56 -0500 Subject: [PATCH 06/11] Revert "128row display (#7511)" This reverts commit d1f3c3c9821bd6f6d2a1c1e0a64929d7458a703b. --- src/main.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 7fc1d2cf2..9e46021c9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -774,17 +774,8 @@ void setup() #if defined(USE_SH1107_128_64) screen_model = meshtastic_Config_DisplayConfig_OledType_OLED_SH1107; // keep dimension of 128x64 - screen_geometry = GEOMETRY_128_64; #endif - // if we have one of the fixed overrides in the settings, adjust display type accordingly. - if (screen_model == meshtastic_Config_DisplayConfig_OledType_OLED_SH1107) { - screen_geometry = GEOMETRY_128_128; - } else if (screen_model == meshtastic_Config_DisplayConfig_OledType_OLED_SH1107_128_64) { - screen_model = meshtastic_Config_DisplayConfig_OledType_OLED_SH1107; - screen_geometry = GEOMETRY_128_64; - } - #if !MESHTASTIC_EXCLUDE_I2C #if !defined(ARCH_STM32WL) if (acc_info.type != ScanI2C::DeviceType::NONE) { @@ -830,7 +821,7 @@ void setup() #elif !defined(ARCH_ESP32) // ARCH_RP2040 SPI.begin(); #else - // ESP32 + // ESP32 #if defined(HW_SPI1_DEVICE) SPI1.begin(LORA_SCK, LORA_MISO, LORA_MOSI, LORA_CS); LOG_DEBUG("SPI1.begin(SCK=%d, MISO=%d, MOSI=%d, NSS=%d)", LORA_SCK, LORA_MISO, LORA_MOSI, LORA_CS); From 2de9f015b1df8d2e2e72a4d3be48d3910168e7b7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 9 Aug 2025 08:12:24 -0500 Subject: [PATCH 07/11] Automated version bumps (#7586) Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com> --- bin/org.meshtastic.meshtasticd.metainfo.xml | 3 +++ debian/changelog | 7 +++++-- version.properties | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/bin/org.meshtastic.meshtasticd.metainfo.xml b/bin/org.meshtastic.meshtasticd.metainfo.xml index 116155807..d52b804ee 100644 --- a/bin/org.meshtastic.meshtasticd.metainfo.xml +++ b/bin/org.meshtastic.meshtasticd.metainfo.xml @@ -87,6 +87,9 @@ + + https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.5 + https://github.com/meshtastic/firmware/releases?q=tag%3Av2.7.4 diff --git a/debian/changelog b/debian/changelog index 02a32f2f1..9421e9925 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -meshtasticd (2.7.4.0) UNRELEASED; urgency=medium +meshtasticd (2.7.5.0) UNRELEASED; urgency=medium [ Austin Lane ] * Initial packaging @@ -34,4 +34,7 @@ meshtasticd (2.7.4.0) UNRELEASED; urgency=medium [ ] * GitHub Actions Automatic version bump - -- Sat, 19 Jul 2025 11:36:55 +0000 + [ ] + * GitHub Actions Automatic version bump + + -- Sat, 09 Aug 2025 12:46:53 +0000 diff --git a/version.properties b/version.properties index aa959bcac..7764a56c9 100644 --- a/version.properties +++ b/version.properties @@ -1,4 +1,4 @@ [VERSION] major = 2 minor = 7 -build = 4 +build = 5 From be60f9612eec02a9598c807bf3582f851736655b Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 9 Aug 2025 08:14:04 -0500 Subject: [PATCH 08/11] Update protobufs (#7587) Co-authored-by: thebentern <9000580+thebentern@users.noreply.github.com> --- protobufs | 2 +- src/mesh/generated/meshtastic/mesh.pb.h | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/protobufs b/protobufs index 1ecf94da9..13d8946c6 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit 1ecf94da9898ea0b8f2745bfe6bda2a8f2ca4073 +Subproject commit 13d8946c6d2119864cc167ebe4b53ef6dd57000c diff --git a/src/mesh/generated/meshtastic/mesh.pb.h b/src/mesh/generated/meshtastic/mesh.pb.h index f915a1db3..bd0b72937 100644 --- a/src/mesh/generated/meshtastic/mesh.pb.h +++ b/src/mesh/generated/meshtastic/mesh.pb.h @@ -1149,7 +1149,8 @@ typedef struct _meshtastic_FromRadio { /* A heartbeat message is sent to the node from the client to keep the connection alive. This is currently only needed to keep serial connections alive, but can be used by any PhoneAPI. */ typedef struct _meshtastic_Heartbeat { - char dummy_field; + /* The nonce of the heartbeat message */ + uint32_t nonce; } meshtastic_Heartbeat; /* Packets/commands to the radio will be written (reliably) to the toRadio characteristic. @@ -1551,6 +1552,7 @@ extern "C" { #define meshtastic_FromRadio_fileInfo_tag 15 #define meshtastic_FromRadio_clientNotification_tag 16 #define meshtastic_FromRadio_deviceuiConfig_tag 17 +#define meshtastic_Heartbeat_nonce_tag 1 #define meshtastic_ToRadio_packet_tag 1 #define meshtastic_ToRadio_want_config_id_tag 3 #define meshtastic_ToRadio_disconnect_tag 4 @@ -1882,7 +1884,7 @@ X(a, STATIC, SINGULAR, UINT32, excluded_modules, 12) #define meshtastic_DeviceMetadata_DEFAULT NULL #define meshtastic_Heartbeat_FIELDLIST(X, a) \ - +X(a, STATIC, SINGULAR, UINT32, nonce, 1) #define meshtastic_Heartbeat_CALLBACK NULL #define meshtastic_Heartbeat_DEFAULT NULL @@ -1992,7 +1994,7 @@ extern const pb_msgdesc_t meshtastic_ChunkedPayloadResponse_msg; #define meshtastic_DuplicatedPublicKey_size 0 #define meshtastic_FileInfo_size 236 #define meshtastic_FromRadio_size 510 -#define meshtastic_Heartbeat_size 0 +#define meshtastic_Heartbeat_size 6 #define meshtastic_KeyVerificationFinal_size 65 #define meshtastic_KeyVerificationNumberInform_size 58 #define meshtastic_KeyVerificationNumberRequest_size 52 From 7fe2c741398a6740799747066e9cd0c54744c3ba Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 9 Aug 2025 09:14:22 -0500 Subject: [PATCH 09/11] Update protobufs (#7588) Co-authored-by: jp-bennett <5630967+jp-bennett@users.noreply.github.com> --- protobufs | 2 +- src/mesh/generated/meshtastic/deviceonly.pb.h | 2 +- src/mesh/generated/meshtastic/mesh.pb.cpp | 2 + src/mesh/generated/meshtastic/mesh.pb.h | 37 +++++++++++++++++-- 4 files changed, 37 insertions(+), 6 deletions(-) diff --git a/protobufs b/protobufs index 13d8946c6..e2c0831aa 160000 --- a/protobufs +++ b/protobufs @@ -1 +1 @@ -Subproject commit 13d8946c6d2119864cc167ebe4b53ef6dd57000c +Subproject commit e2c0831aa3d34a58a36c2b9fdcb828e58961cbc5 diff --git a/src/mesh/generated/meshtastic/deviceonly.pb.h b/src/mesh/generated/meshtastic/deviceonly.pb.h index ba1a52b27..f47091384 100644 --- a/src/mesh/generated/meshtastic/deviceonly.pb.h +++ b/src/mesh/generated/meshtastic/deviceonly.pb.h @@ -362,7 +362,7 @@ extern const pb_msgdesc_t meshtastic_BackupPreferences_msg; #define MESHTASTIC_MESHTASTIC_DEVICEONLY_PB_H_MAX_SIZE meshtastic_BackupPreferences_size #define meshtastic_BackupPreferences_size 2271 #define meshtastic_ChannelFile_size 718 -#define meshtastic_DeviceState_size 1728 +#define meshtastic_DeviceState_size 1737 #define meshtastic_NodeInfoLite_size 196 #define meshtastic_PositionLite_size 28 #define meshtastic_UserLite_size 98 diff --git a/src/mesh/generated/meshtastic/mesh.pb.cpp b/src/mesh/generated/meshtastic/mesh.pb.cpp index 85735357a..9966e52f8 100644 --- a/src/mesh/generated/meshtastic/mesh.pb.cpp +++ b/src/mesh/generated/meshtastic/mesh.pb.cpp @@ -119,6 +119,8 @@ PB_BIND(meshtastic_ChunkedPayloadResponse, meshtastic_ChunkedPayloadResponse, AU + + diff --git a/src/mesh/generated/meshtastic/mesh.pb.h b/src/mesh/generated/meshtastic/mesh.pb.h index bd0b72937..1d1ff47e0 100644 --- a/src/mesh/generated/meshtastic/mesh.pb.h +++ b/src/mesh/generated/meshtastic/mesh.pb.h @@ -509,6 +509,26 @@ typedef enum _meshtastic_MeshPacket_Delayed { meshtastic_MeshPacket_Delayed_DELAYED_DIRECT = 2 } meshtastic_MeshPacket_Delayed; +/* Enum to identify which transport mechanism this packet arrived over */ +typedef enum _meshtastic_MeshPacket_TransportMechanism { + /* The default case is that the node generated a packet itself */ + meshtastic_MeshPacket_TransportMechanism_TRANSPORT_INTERNAL = 0, + /* Arrived via the primary LoRa radio */ + meshtastic_MeshPacket_TransportMechanism_TRANSPORT_LORA = 1, + /* Arrived via a secondary LoRa radio */ + meshtastic_MeshPacket_TransportMechanism_TRANSPORT_LORA_ALT1 = 2, + /* Arrived via a tertiary LoRa radio */ + meshtastic_MeshPacket_TransportMechanism_TRANSPORT_LORA_ALT2 = 3, + /* Arrived via a quaternary LoRa radio */ + meshtastic_MeshPacket_TransportMechanism_TRANSPORT_LORA_ALT3 = 4, + /* Arrived via an MQTT connection */ + meshtastic_MeshPacket_TransportMechanism_TRANSPORT_MQTT = 5, + /* Arrived via Multicast UDP */ + meshtastic_MeshPacket_TransportMechanism_TRANSPORT_MULTICAST_UDP = 6, + /* Arrived via API connection */ + meshtastic_MeshPacket_TransportMechanism_TRANSPORT_API = 7 +} meshtastic_MeshPacket_TransportMechanism; + /* Log levels, chosen to match python logging conventions. */ typedef enum _meshtastic_LogRecord_Level { /* Log levels, chosen to match python logging conventions. */ @@ -863,6 +883,8 @@ typedef struct _meshtastic_MeshPacket { Timestamp after which this packet may be sent. Set by the firmware internally, clients are not supposed to set this. */ uint32_t tx_after; + /* Indicates which transport mechanism this packet arrived over */ + meshtastic_MeshPacket_TransportMechanism transport_mechanism; } meshtastic_MeshPacket; /* The bluetooth to device link: @@ -1268,6 +1290,10 @@ extern "C" { #define _meshtastic_MeshPacket_Delayed_MAX meshtastic_MeshPacket_Delayed_DELAYED_DIRECT #define _meshtastic_MeshPacket_Delayed_ARRAYSIZE ((meshtastic_MeshPacket_Delayed)(meshtastic_MeshPacket_Delayed_DELAYED_DIRECT+1)) +#define _meshtastic_MeshPacket_TransportMechanism_MIN meshtastic_MeshPacket_TransportMechanism_TRANSPORT_INTERNAL +#define _meshtastic_MeshPacket_TransportMechanism_MAX meshtastic_MeshPacket_TransportMechanism_TRANSPORT_API +#define _meshtastic_MeshPacket_TransportMechanism_ARRAYSIZE ((meshtastic_MeshPacket_TransportMechanism)(meshtastic_MeshPacket_TransportMechanism_TRANSPORT_API+1)) + #define _meshtastic_LogRecord_Level_MIN meshtastic_LogRecord_Level_UNSET #define _meshtastic_LogRecord_Level_MAX meshtastic_LogRecord_Level_CRITICAL #define _meshtastic_LogRecord_Level_ARRAYSIZE ((meshtastic_LogRecord_Level)(meshtastic_LogRecord_Level_CRITICAL+1)) @@ -1288,6 +1314,7 @@ extern "C" { #define meshtastic_MeshPacket_priority_ENUMTYPE meshtastic_MeshPacket_Priority #define meshtastic_MeshPacket_delayed_ENUMTYPE meshtastic_MeshPacket_Delayed +#define meshtastic_MeshPacket_transport_mechanism_ENUMTYPE meshtastic_MeshPacket_TransportMechanism #define meshtastic_MyNodeInfo_firmware_edition_ENUMTYPE meshtastic_FirmwareEdition @@ -1327,7 +1354,7 @@ extern "C" { #define meshtastic_KeyVerification_init_default {0, {0, {0}}, {0, {0}}} #define meshtastic_Waypoint_init_default {0, false, 0, false, 0, 0, 0, "", "", 0} #define meshtastic_MqttClientProxyMessage_init_default {"", 0, {{0, {0}}}, 0} -#define meshtastic_MeshPacket_init_default {0, 0, 0, 0, {meshtastic_Data_init_default}, 0, 0, 0, 0, 0, _meshtastic_MeshPacket_Priority_MIN, 0, _meshtastic_MeshPacket_Delayed_MIN, 0, 0, {0, {0}}, 0, 0, 0, 0} +#define meshtastic_MeshPacket_init_default {0, 0, 0, 0, {meshtastic_Data_init_default}, 0, 0, 0, 0, 0, _meshtastic_MeshPacket_Priority_MIN, 0, _meshtastic_MeshPacket_Delayed_MIN, 0, 0, {0, {0}}, 0, 0, 0, 0, _meshtastic_MeshPacket_TransportMechanism_MIN} #define meshtastic_NodeInfo_init_default {0, false, meshtastic_User_init_default, false, meshtastic_Position_init_default, 0, 0, false, meshtastic_DeviceMetrics_init_default, 0, 0, false, 0, 0, 0, 0} #define meshtastic_MyNodeInfo_init_default {0, 0, 0, {0, {0}}, "", _meshtastic_FirmwareEdition_MIN, 0} #define meshtastic_LogRecord_init_default {"", 0, "", _meshtastic_LogRecord_Level_MIN} @@ -1358,7 +1385,7 @@ extern "C" { #define meshtastic_KeyVerification_init_zero {0, {0, {0}}, {0, {0}}} #define meshtastic_Waypoint_init_zero {0, false, 0, false, 0, 0, 0, "", "", 0} #define meshtastic_MqttClientProxyMessage_init_zero {"", 0, {{0, {0}}}, 0} -#define meshtastic_MeshPacket_init_zero {0, 0, 0, 0, {meshtastic_Data_init_zero}, 0, 0, 0, 0, 0, _meshtastic_MeshPacket_Priority_MIN, 0, _meshtastic_MeshPacket_Delayed_MIN, 0, 0, {0, {0}}, 0, 0, 0, 0} +#define meshtastic_MeshPacket_init_zero {0, 0, 0, 0, {meshtastic_Data_init_zero}, 0, 0, 0, 0, 0, _meshtastic_MeshPacket_Priority_MIN, 0, _meshtastic_MeshPacket_Delayed_MIN, 0, 0, {0, {0}}, 0, 0, 0, 0, _meshtastic_MeshPacket_TransportMechanism_MIN} #define meshtastic_NodeInfo_init_zero {0, false, meshtastic_User_init_zero, false, meshtastic_Position_init_zero, 0, 0, false, meshtastic_DeviceMetrics_init_zero, 0, 0, false, 0, 0, 0, 0} #define meshtastic_MyNodeInfo_init_zero {0, 0, 0, {0, {0}}, "", _meshtastic_FirmwareEdition_MIN, 0} #define meshtastic_LogRecord_init_zero {"", 0, "", _meshtastic_LogRecord_Level_MIN} @@ -1466,6 +1493,7 @@ extern "C" { #define meshtastic_MeshPacket_next_hop_tag 18 #define meshtastic_MeshPacket_relay_node_tag 19 #define meshtastic_MeshPacket_tx_after_tag 20 +#define meshtastic_MeshPacket_transport_mechanism_tag 21 #define meshtastic_NodeInfo_num_tag 1 #define meshtastic_NodeInfo_user_tag 2 #define meshtastic_NodeInfo_position_tag 3 @@ -1689,7 +1717,8 @@ X(a, STATIC, SINGULAR, BYTES, public_key, 16) \ X(a, STATIC, SINGULAR, BOOL, pki_encrypted, 17) \ X(a, STATIC, SINGULAR, UINT32, next_hop, 18) \ X(a, STATIC, SINGULAR, UINT32, relay_node, 19) \ -X(a, STATIC, SINGULAR, UINT32, tx_after, 20) +X(a, STATIC, SINGULAR, UINT32, tx_after, 20) \ +X(a, STATIC, SINGULAR, UENUM, transport_mechanism, 21) #define meshtastic_MeshPacket_CALLBACK NULL #define meshtastic_MeshPacket_DEFAULT NULL #define meshtastic_MeshPacket_payload_variant_decoded_MSGTYPE meshtastic_Data @@ -2001,7 +2030,7 @@ extern const pb_msgdesc_t meshtastic_ChunkedPayloadResponse_msg; #define meshtastic_KeyVerification_size 79 #define meshtastic_LogRecord_size 426 #define meshtastic_LowEntropyKey_size 0 -#define meshtastic_MeshPacket_size 378 +#define meshtastic_MeshPacket_size 381 #define meshtastic_MqttClientProxyMessage_size 501 #define meshtastic_MyNodeInfo_size 83 #define meshtastic_NeighborInfo_size 258 From f6857f1bcbb481bb53da17d9be3bc00fcc5f7a14 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sat, 9 Aug 2025 10:17:08 -0500 Subject: [PATCH 10/11] Heartbeat has a nonce now --- src/mesh/api/PacketAPI.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesh/api/PacketAPI.cpp b/src/mesh/api/PacketAPI.cpp index 4f0fbaf97..1d6df855f 100644 --- a/src/mesh/api/PacketAPI.cpp +++ b/src/mesh/api/PacketAPI.cpp @@ -70,7 +70,7 @@ bool PacketAPI::receivePacket(void) break; } case meshtastic_ToRadio_heartbeat_tag: - if (mr->heartbeat.dummy_field == 1) { + if (mr->heartbeat.nonce == 1) { if (nodeInfoModule) { LOG_INFO("Broadcasting nodeinfo ping"); nodeInfoModule->sendOurNodeInfo(NODENUM_BROADCAST, true, 0, true); From 7505fe7a7cc4009109f0cb2e0f575de3a1b7649b Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sat, 9 Aug 2025 10:38:09 -0500 Subject: [PATCH 11/11] Update device-ui deps --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index a5a23e56f..62bbf8a24 100644 --- a/platformio.ini +++ b/platformio.ini @@ -110,7 +110,7 @@ lib_deps = [device-ui_base] lib_deps = # renovate: datasource=git-refs depName=meshtastic/device-ui packageName=https://github.com/meshtastic/device-ui gitBranch=master - https://github.com/meshtastic/device-ui/archive/d044c01e87583867011991a96f926e4e929d8a93.zip + https://github.com/meshtastic/device-ui/archive/0cd108ff783539e41ef38258ba2784ab3b1bdc97.zip ; Common libs for environmental measurements in telemetry module [environmental_base]