From 2b57ffafd78c15adc024268d6882f6cc1c57cd63 Mon Sep 17 00:00:00 2001 From: Nivek-domo <123359286+Nivek-domo@users.noreply.github.com> Date: Sun, 20 Apr 2025 10:51:01 +0200 Subject: [PATCH 01/11] Rak13800 Ethernet works on rak11310 too we can use rak13800 on rak11310 too --- src/mesh/api/ServerAPI.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesh/api/ServerAPI.h b/src/mesh/api/ServerAPI.h index fe6a733a7..111314476 100644 --- a/src/mesh/api/ServerAPI.h +++ b/src/mesh/api/ServerAPI.h @@ -43,7 +43,7 @@ template class APIServerPort : public U, private concurrency: * delegate to the worker. Once coroutines are implemented we can relax this restriction. */ T *openAPI = NULL; -#if RAK_4631 +#if defined(RAK_4631) || defined(RAK11310) // Track wait time for RAK13800 Ethernet requests int32_t waitTime = 100; #endif From 5d48d2c0a74b1a561246899e7786aa1460cf0ef1 Mon Sep 17 00:00:00 2001 From: Nivek-domo <123359286+Nivek-domo@users.noreply.github.com> Date: Sun, 20 Apr 2025 12:06:39 +0200 Subject: [PATCH 02/11] Add IP Address Frame (#6615) * Update Screen.cpp add ip on screen if has ethernet pcb like w5500 spi * Run Trunk Format and Translate Comments FR->EN --------- Co-authored-by: Tom Fifield --- src/graphics/Screen.cpp | 46 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index ad0b94efe..45706cf33 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -56,6 +56,10 @@ along with this program. If not, see . #include "mesh/wifi/WiFiAPClient.h" #endif +#if HAS_ETHERNET +#include "mesh/eth/ethClient.h" +#endif + #ifdef ARCH_ESP32 #include "esp_task_wdt.h" #include "modules/StoreForwardModule.h" @@ -232,6 +236,42 @@ static void drawOEMBootScreen(OLEDDisplay *display, OLEDDisplayUiState *state, i #endif +#if HAS_ETHERNET +static void drawEthernetFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) +{ + display->setFont(FONT_SMALL); + display->setTextAlignment(TEXT_ALIGN_LEFT); + + if (config.display.displaymode == meshtastic_Config_DisplayConfig_DisplayMode_INVERTED) { + display->fillRect(0 + x, 0 + y, x + display->getWidth(), y + FONT_HEIGHT_SMALL); + display->setColor(BLACK); + } + + display->setColor(WHITE); + + // Adjust vertical position verticale ajustée - starts higher + int16_t y_offset = y + 2; // Reduces space at top + + // Left Alignement (x + small offset) + int16_t x_offset = x + 2; + + // Display is not centered, align left + display->drawString(x_offset, y_offset, "Ethernet Config:"); + y_offset += FONT_HEIGHT_SMALL + 2; // Slightly reduced spacing + + display->drawString(x_offset, y_offset, "IP: " + Ethernet.localIP().toString()); + y_offset += FONT_HEIGHT_SMALL; + + display->drawString(x_offset, y_offset, "Mask: " + Ethernet.subnetMask().toString()); + y_offset += FONT_HEIGHT_SMALL; + + display->drawString(x_offset, y_offset, "GW: " + Ethernet.gatewayIP().toString()); + // y_offset += FONT_HEIGHT_SMALL; + + // display->drawString(x_offset, y_offset, "DNS: " + Ethernet.dnsServerIP().toString()); +} +#endif + void Screen::drawFrameText(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y, const char *message) { uint16_t x_offset = display->width() / 2; @@ -2182,6 +2222,12 @@ void Screen::setFrames(FrameFocus focus) } #endif +#if HAS_ETHERNET + if (Ethernet.hardwareStatus() != EthernetNoHardware) { + normalFrames[numframes++] = drawEthernetFrame; + } +#endif + fsi.frameCount = numframes; // Total framecount is used to apply FOCUS_PRESERVE LOG_DEBUG("Finished build frames. numframes: %d", numframes); From e03f3de185e8a67bd08e7af0c3425989e4b6e0ec Mon Sep 17 00:00:00 2001 From: Austin Date: Sun, 20 Apr 2025 10:45:58 -0400 Subject: [PATCH 03/11] Build and deploy event firmwares (#6628) --- .github/workflows/main_matrix.yml | 52 ++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 18 deletions(-) diff --git a/.github/workflows/main_matrix.yml b/.github/workflows/main_matrix.yml index 0889ce22e..b6a0a3445 100644 --- a/.github/workflows/main_matrix.yml +++ b/.github/workflows/main_matrix.yml @@ -5,14 +5,20 @@ concurrency: on: # # Triggers the workflow on push but only for the master branch push: - branches: [master, develop] + branches: + - master + - develop + - event/* paths-ignore: - "**.md" - version.properties # Note: This is different from "pull_request". Need to specify ref when doing checkouts. pull_request_target: - branches: [master, develop] + branches: + - master + - develop + - event/* paths-ignore: - "**.md" #- "**.yml" @@ -32,12 +38,12 @@ jobs: name: Checkout base - id: jsonStep run: | - if [[ "${{ github.head_ref }}" == "" ]]; then + if [[ "$GITHUB_HEAD_REF" == "" ]]; then TARGETS=$(./bin/generate_ci_matrix.py ${{matrix.arch}}) else TARGETS=$(./bin/generate_ci_matrix.py ${{matrix.arch}} quick) fi - echo "Name: ${{ github.ref_name }} Base: ${{ github.base_ref }} } Ref: ${{ github.ref }} Targets: $TARGETS" + echo "Name: $GITHUB_REF_NAME Base: $GITHUB_BASE_REF Ref: $GITHUB_REF Targets: $TARGETS" echo "${{matrix.arch}}=$(jq -cn --argjson environments "$TARGETS" '{board: $environments}')" >> $GITHUB_OUTPUT outputs: esp32: ${{ steps.jsonStep.outputs.esp32 }} @@ -195,17 +201,6 @@ jobs: runs-on: ubuntu-24.04-arm push: false - after-checks: - runs-on: ubuntu-latest - if: ${{ github.event_name != 'workflow_dispatch' }} - needs: [check] - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - ref: ${{github.event.pull_request.head.ref}} - repository: ${{github.event.pull_request.head.repo.full_name}} - gather-artifacts: permissions: contents: write @@ -350,7 +345,7 @@ jobs: merge-multiple: true path: ./output/pio-deps-native-tft - - name: Zip linux sources + - name: Zip Linux sources working-directory: output run: | zip -j -9 -r ./meshtasticd-${{ steps.version.outputs.deb }}-src.zip ./debian-src @@ -360,7 +355,9 @@ jobs: - name: Display structure of downloaded files run: ls -lR - - name: Add linux sources to release + - name: Add Linux sources to GtiHub Release + # Only run when targeting master branch with workflow_dispatch + if: ${{ github.ref_name == 'master' }} run: | gh release upload v${{ steps.version.outputs.long }} ./output/meshtasticd-${{ steps.version.outputs.deb }}-src.zip gh release upload v${{ steps.version.outputs.long }} ./output/platformio-deps-native-tft-${{ steps.version.outputs.long }}.zip @@ -418,9 +415,28 @@ jobs: - name: Display structure of downloaded files run: ls -lR - - name: Add bins and debug elfs to release + - name: Add bins and debug elfs to GitHub Release + # Only run when targeting master branch with workflow_dispatch + if: ${{ github.ref_name == 'master' }} run: | gh release upload v${{ steps.version.outputs.long }} ./firmware-${{matrix.arch}}-${{ steps.version.outputs.long }}.zip gh release upload v${{ steps.version.outputs.long }} ./debug-elfs-${{matrix.arch}}-${{ steps.version.outputs.long }}.zip env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Publish firmware to meshtastic.github.io + uses: peaceiris/actions-gh-pages@v4 + env: + # On event/* branches, use the event name as the destination prefix + DEST_PREFIX: ${{ contains(github.ref_name, 'event/') && format('{0}/', github.ref_name) || '' }} + with: + deploy_key: ${{ secrets.DIST_PAGES_DEPLOY_KEY }} + external_repository: meshtastic/meshtastic.github.io + publish_branch: master + publish_dir: ./output + destination_dir: ${{ env.DEST_PREFIX }}firmware-${{ steps.version.outputs.long }} + keep_files: true + user_name: github-actions[bot] + user_email: github-actions[bot]@users.noreply.github.com + commit_message: ${{ steps.version.outputs.long }} ${{ matrix.arch }} + enable_jekyll: true From 48dc0e014c451fed8b3979d8548a8f328a613301 Mon Sep 17 00:00:00 2001 From: Ben Meadors Date: Sun, 20 Apr 2025 09:48:07 -0500 Subject: [PATCH 04/11] Revert "Lib Update (#6510)" (#6640) This reverts commit e2f6600cb955f8de86175a87fae36f49863ba72f. --- arch/esp32/esp32.ini | 2 +- src/nimble/NimbleBluetooth.cpp | 17 ++++++++--------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/arch/esp32/esp32.ini b/arch/esp32/esp32.ini index 35f3a5a1c..5e15cb451 100644 --- a/arch/esp32/esp32.ini +++ b/arch/esp32/esp32.ini @@ -50,7 +50,7 @@ lib_deps = # renovate: datasource=git-refs depName=meshtastic-esp32_https_server packageName=https://github.com/meshtastic/esp32_https_server gitBranch=master https://github.com/meshtastic/esp32_https_server/archive/896f1771ceb5979987a0b41028bf1b4e7aad419b.zip # renovate: datasource=custom.pio depName=NimBLE-Arduino packageName=h2zero/library/NimBLE-Arduino - h2zero/NimBLE-Arduino@^2.2.3 + h2zero/NimBLE-Arduino@^1.4.3 # renovate: datasource=git-refs depName=libpax packageName=https://github.com/dbinfrago/libpax gitBranch=master https://github.com/dbinfrago/libpax/archive/3cdc0371c375676a97967547f4065607d4c53fd1.zip # renovate: datasource=custom.pio depName=XPowersLib packageName=lewisxhe/library/XPowersLib diff --git a/src/nimble/NimbleBluetooth.cpp b/src/nimble/NimbleBluetooth.cpp index 208d8ae3c..009439f25 100644 --- a/src/nimble/NimbleBluetooth.cpp +++ b/src/nimble/NimbleBluetooth.cpp @@ -49,7 +49,7 @@ static uint8_t lastToRadio[MAX_TO_FROM_RADIO_SIZE]; class NimbleBluetoothToRadioCallback : public NimBLECharacteristicCallbacks { - virtual void onWrite(NimBLECharacteristic *pCharacteristic, NimBLEConnInfo &connInfo) + virtual void onWrite(NimBLECharacteristic *pCharacteristic) { LOG_DEBUG("To Radio onwrite"); auto val = pCharacteristic->getValue(); @@ -66,7 +66,7 @@ class NimbleBluetoothToRadioCallback : public NimBLECharacteristicCallbacks class NimbleBluetoothFromRadioCallback : public NimBLECharacteristicCallbacks { - virtual void onRead(NimBLECharacteristic *pCharacteristic, NimBLEConnInfo &connInfo) + virtual void onRead(NimBLECharacteristic *pCharacteristic) { uint8_t fromRadioBytes[meshtastic_FromRadio_size]; size_t numBytes = bluetoothPhoneAPI->getFromRadio(fromRadioBytes); @@ -79,7 +79,7 @@ class NimbleBluetoothFromRadioCallback : public NimBLECharacteristicCallbacks class NimbleBluetoothServerCallback : public NimBLEServerCallbacks { - virtual uint32_t onPassKeyDisplay() + virtual uint32_t onPassKeyRequest() { uint32_t passkey = config.bluetooth.fixed_pin; @@ -125,7 +125,7 @@ class NimbleBluetoothServerCallback : public NimBLEServerCallbacks return passkey; } - virtual void onAuthenticationComplete(NimBLEConnInfo &connInfo) + virtual void onAuthenticationComplete(ble_gap_conn_desc *desc) { LOG_INFO("BLE authentication complete"); @@ -138,9 +138,9 @@ class NimbleBluetoothServerCallback : public NimBLEServerCallbacks } } - virtual void onDisconnect(NimBLEServer *pServer, NimBLEConnInfo &connInfo, int reason) + virtual void onDisconnect(NimBLEServer *pServer, ble_gap_conn_desc *desc) { - LOG_INFO("BLE disconnect. Reason %i", reason); + LOG_INFO("BLE disconnect"); bluetoothStatus->updateStatus( new meshtastic::BluetoothStatus(meshtastic::BluetoothStatus::ConnectionState::DISCONNECTED)); @@ -191,7 +191,7 @@ int NimbleBluetooth::getRssi() if (bleServer && isConnected()) { auto service = bleServer->getServiceByUUID(MESH_SERVICE_UUID); uint16_t handle = service->getHandle(); - return NimBLEDevice::getClientByHandle(handle)->getRssi(); + return NimBLEDevice::getClientByID(handle)->getRssi(); } return 0; // FIXME figure out where to source this } @@ -216,7 +216,6 @@ void NimbleBluetooth::setup() NimbleBluetoothServerCallback *serverCallbacks = new NimbleBluetoothServerCallback(); bleServer->setCallbacks(serverCallbacks, true); - bleServer->advertiseOnDisconnect(true); setupService(); startAdvertising(); } @@ -260,7 +259,7 @@ void NimbleBluetooth::setupService() BatteryCharacteristic = batteryService->createCharacteristic( // 0x2A19 is the Battery Level characteristic) (uint16_t)0x2a19, NIMBLE_PROPERTY::READ | NIMBLE_PROPERTY::NOTIFY, 1); - NimBLE2904 *batteryLevelDescriptor = (NimBLE2904 *)BatteryCharacteristic->create2904(); + NimBLE2904 *batteryLevelDescriptor = (NimBLE2904 *)BatteryCharacteristic->createDescriptor((uint16_t)0x2904); batteryLevelDescriptor->setFormat(NimBLE2904::FORMAT_UINT8); batteryLevelDescriptor->setNamespace(1); batteryLevelDescriptor->setUnit(0x27ad); From 8812eadd4444386919d985d4370756cc28aa9093 Mon Sep 17 00:00:00 2001 From: Austin Date: Sun, 20 Apr 2025 10:49:21 -0400 Subject: [PATCH 05/11] Revert "Add IP Address Frame (#6615)" (#6639) This reverts commit 5d48d2c0a74b1a561246899e7786aa1460cf0ef1. --- src/graphics/Screen.cpp | 46 ----------------------------------------- 1 file changed, 46 deletions(-) diff --git a/src/graphics/Screen.cpp b/src/graphics/Screen.cpp index 45706cf33..ad0b94efe 100644 --- a/src/graphics/Screen.cpp +++ b/src/graphics/Screen.cpp @@ -56,10 +56,6 @@ along with this program. If not, see . #include "mesh/wifi/WiFiAPClient.h" #endif -#if HAS_ETHERNET -#include "mesh/eth/ethClient.h" -#endif - #ifdef ARCH_ESP32 #include "esp_task_wdt.h" #include "modules/StoreForwardModule.h" @@ -236,42 +232,6 @@ static void drawOEMBootScreen(OLEDDisplay *display, OLEDDisplayUiState *state, i #endif -#if HAS_ETHERNET -static void drawEthernetFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y) -{ - display->setFont(FONT_SMALL); - display->setTextAlignment(TEXT_ALIGN_LEFT); - - if (config.display.displaymode == meshtastic_Config_DisplayConfig_DisplayMode_INVERTED) { - display->fillRect(0 + x, 0 + y, x + display->getWidth(), y + FONT_HEIGHT_SMALL); - display->setColor(BLACK); - } - - display->setColor(WHITE); - - // Adjust vertical position verticale ajustée - starts higher - int16_t y_offset = y + 2; // Reduces space at top - - // Left Alignement (x + small offset) - int16_t x_offset = x + 2; - - // Display is not centered, align left - display->drawString(x_offset, y_offset, "Ethernet Config:"); - y_offset += FONT_HEIGHT_SMALL + 2; // Slightly reduced spacing - - display->drawString(x_offset, y_offset, "IP: " + Ethernet.localIP().toString()); - y_offset += FONT_HEIGHT_SMALL; - - display->drawString(x_offset, y_offset, "Mask: " + Ethernet.subnetMask().toString()); - y_offset += FONT_HEIGHT_SMALL; - - display->drawString(x_offset, y_offset, "GW: " + Ethernet.gatewayIP().toString()); - // y_offset += FONT_HEIGHT_SMALL; - - // display->drawString(x_offset, y_offset, "DNS: " + Ethernet.dnsServerIP().toString()); -} -#endif - void Screen::drawFrameText(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y, const char *message) { uint16_t x_offset = display->width() / 2; @@ -2222,12 +2182,6 @@ void Screen::setFrames(FrameFocus focus) } #endif -#if HAS_ETHERNET - if (Ethernet.hardwareStatus() != EthernetNoHardware) { - normalFrames[numframes++] = drawEthernetFrame; - } -#endif - fsi.frameCount = numframes; // Total framecount is used to apply FOCUS_PRESERVE LOG_DEBUG("Finished build frames. numframes: %d", numframes); From 72dd5bd88d541eaa8b91dd02ec66a0b8ece41b29 Mon Sep 17 00:00:00 2001 From: Austin Date: Sun, 20 Apr 2025 16:31:47 -0400 Subject: [PATCH 06/11] Publish firmware all together (#6642) --- .github/workflows/main_matrix.yml | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main_matrix.yml b/.github/workflows/main_matrix.yml index b6a0a3445..a9c4cbb52 100644 --- a/.github/workflows/main_matrix.yml +++ b/.github/workflows/main_matrix.yml @@ -424,6 +424,31 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + publish-firmware: + runs-on: ubuntu-latest + if: ${{ github.event_name == 'workflow_dispatch' }} + needs: [release-firmware] + env: + targets: esp32,esp32s3,esp32c3,esp32c6,nrf52840,rp2040,stm32 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: 3.x + + - name: Get release version string + run: echo "long=$(./bin/buildinfo.py long)" >> $GITHUB_OUTPUT + id: version + + - uses: actions/download-artifact@v4 + with: + pattern: firmware-{${{ env.targets }}}-${{ steps.version.outputs.long }} + merge-multiple: true + path: ./publish + - name: Publish firmware to meshtastic.github.io uses: peaceiris/actions-gh-pages@v4 env: @@ -433,10 +458,10 @@ jobs: deploy_key: ${{ secrets.DIST_PAGES_DEPLOY_KEY }} external_repository: meshtastic/meshtastic.github.io publish_branch: master - publish_dir: ./output + publish_dir: ./publish destination_dir: ${{ env.DEST_PREFIX }}firmware-${{ steps.version.outputs.long }} keep_files: true user_name: github-actions[bot] user_email: github-actions[bot]@users.noreply.github.com - commit_message: ${{ steps.version.outputs.long }} ${{ matrix.arch }} + commit_message: ${{ steps.version.outputs.long }} enable_jekyll: true From 24e9539d40f91b8e6a0ec533fc688cfee3d0da5a Mon Sep 17 00:00:00 2001 From: Manuel <71137295+mverch67@users.noreply.github.com> Date: Tue, 22 Apr 2025 13:25:07 +0200 Subject: [PATCH 07/11] remove buzzer (#6652) --- variants/seeed-sensecap-indicator/platformio.ini | 1 - 1 file changed, 1 deletion(-) diff --git a/variants/seeed-sensecap-indicator/platformio.ini b/variants/seeed-sensecap-indicator/platformio.ini index fb51d77c3..b643288a6 100644 --- a/variants/seeed-sensecap-indicator/platformio.ini +++ b/variants/seeed-sensecap-indicator/platformio.ini @@ -49,7 +49,6 @@ build_flags = -D HAS_SCREEN=0 -D HAS_TFT=1 -D DISPLAY_SET_RESOLUTION - -D USE_PIN_BUZZER -D RAM_SIZE=4096 -D LV_LVGL_H_INCLUDE_SIMPLE -D LV_CONF_INCLUDE_SIMPLE From 70ced735d966724f665bf3442e9e261c51b12a2e Mon Sep 17 00:00:00 2001 From: todd-herbert Date: Tue, 22 Apr 2025 23:25:53 +1200 Subject: [PATCH 08/11] Correct a typing error in InkHUD display driver (#6651) * Fix LCMEN2R13EFC1 LUT A typing error when the driver was initially created. * Spelling.. --- src/graphics/niche/Drivers/EInk/LCMEN2R13EFC1.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/graphics/niche/Drivers/EInk/LCMEN2R13EFC1.cpp b/src/graphics/niche/Drivers/EInk/LCMEN2R13EFC1.cpp index c843c4694..13a3f452d 100644 --- a/src/graphics/niche/Drivers/EInk/LCMEN2R13EFC1.cpp +++ b/src/graphics/niche/Drivers/EInk/LCMEN2R13EFC1.cpp @@ -42,11 +42,10 @@ static const uint8_t LUT_FAST_BW[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // }; -// Look up table: fash refresh, pixels which change from white to black +// Look up table: fast refresh, pixels which change from white to black static const uint8_t LUT_FAST_WB[] = { - 0x01, 0x46, 0x42, 0x01, 0x01, 0x01, 0x01, // - 0x01, 0x46, 0x42, 0x01, 0x01, 0x01, 0x01, // 0x01, 0x46, 0x43, 0x02, 0x01, 0x01, 0x01, // + 0x01, 0x46, 0x42, 0x01, 0x01, 0x01, 0x01, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // @@ -55,7 +54,7 @@ static const uint8_t LUT_FAST_WB[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // }; -// Look up table: fash refresh, pixels which remain black +// Look up table: fast refresh, pixels which remain black static const uint8_t LUT_FAST_BB[] = { 0x01, 0x06, 0x03, 0x42, 0x41, 0x01, 0x01, // 0x01, 0x06, 0x02, 0x01, 0x01, 0x01, 0x01, // From b1e35cd8b36a57098184491dc3841d83ff65ec76 Mon Sep 17 00:00:00 2001 From: GUVWAF <78759985+GUVWAF@users.noreply.github.com> Date: Tue, 22 Apr 2025 21:21:29 +0200 Subject: [PATCH 09/11] Fix preamble detected IRQ flag (#6653) --- src/mesh/LR11x0Interface.cpp | 4 ++-- src/mesh/RadioLibInterface.h | 3 +++ src/mesh/SX126xInterface.cpp | 3 +-- src/mesh/SX128xInterface.cpp | 3 +-- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/mesh/LR11x0Interface.cpp b/src/mesh/LR11x0Interface.cpp index 2b060ad38..aecc8f722 100644 --- a/src/mesh/LR11x0Interface.cpp +++ b/src/mesh/LR11x0Interface.cpp @@ -247,8 +247,8 @@ template void LR11x0Interface::startReceive() lora.setPreambleLength(preambleLength); // Solve RX ack fail after direct message sent. Not sure why this is needed. // We use a 16 bit preamble so this should save some power by letting radio sit in standby mostly. - // Furthermore, we need the PREAMBLE_DETECTED and HEADER_VALID IRQ flag to detect whether we are actively receiving - int err = lora.startReceive(RADIOLIB_LR11X0_RX_TIMEOUT_INF, RADIOLIB_IRQ_RX_DEFAULT_FLAGS, RADIOLIB_IRQ_RX_DEFAULT_MASK, 0); + int err = + lora.startReceive(RADIOLIB_LR11X0_RX_TIMEOUT_INF, MESHTASTIC_RADIOLIB_IRQ_RX_FLAGS, RADIOLIB_IRQ_RX_DEFAULT_MASK, 0); assert(err == RADIOLIB_ERR_NONE); RadioLibInterface::startReceive(); diff --git a/src/mesh/RadioLibInterface.h b/src/mesh/RadioLibInterface.h index 9622bd625..2ab2679c0 100644 --- a/src/mesh/RadioLibInterface.h +++ b/src/mesh/RadioLibInterface.h @@ -16,6 +16,9 @@ #define RADIOLIB_PIN_TYPE uint32_t +// In addition to the default Rx flags, we need the PREAMBLE_DETECTED flag to detect whether we are actively receiving +#define MESHTASTIC_RADIOLIB_IRQ_RX_FLAGS (RADIOLIB_IRQ_RX_DEFAULT_FLAGS | (1 << RADIOLIB_IRQ_PREAMBLE_DETECTED)) + /** * We need to override the RadioLib ArduinoHal class to add mutex protection for SPI bus access */ diff --git a/src/mesh/SX126xInterface.cpp b/src/mesh/SX126xInterface.cpp index 6a4be023b..c867466b7 100644 --- a/src/mesh/SX126xInterface.cpp +++ b/src/mesh/SX126xInterface.cpp @@ -277,8 +277,7 @@ template void SX126xInterface::startReceive() setStandby(); // We use a 16 bit preamble so this should save some power by letting radio sit in standby mostly. - // Furthermore, we need the PREAMBLE_DETECTED and HEADER_VALID IRQ flag to detect whether we are actively receiving - int err = lora.startReceiveDutyCycleAuto(preambleLength, 8, RADIOLIB_IRQ_RX_DEFAULT_FLAGS | RADIOLIB_IRQ_PREAMBLE_DETECTED); + int err = lora.startReceiveDutyCycleAuto(preambleLength, 8, MESHTASTIC_RADIOLIB_IRQ_RX_FLAGS); if (err != RADIOLIB_ERR_NONE) LOG_ERROR("SX126X startReceiveDutyCycleAuto %s%d", radioLibErr, err); assert(err == RADIOLIB_ERR_NONE); diff --git a/src/mesh/SX128xInterface.cpp b/src/mesh/SX128xInterface.cpp index e06f274e7..23a023d3f 100644 --- a/src/mesh/SX128xInterface.cpp +++ b/src/mesh/SX128xInterface.cpp @@ -260,8 +260,7 @@ template void SX128xInterface::startReceive() #endif #endif - // We use the PREAMBLE_DETECTED and HEADER_VALID IRQ flag to detect whether we are actively receiving - int err = lora.startReceive(RADIOLIB_SX128X_RX_TIMEOUT_INF, RADIOLIB_IRQ_RX_DEFAULT_FLAGS | RADIOLIB_IRQ_PREAMBLE_DETECTED); + int err = lora.startReceive(RADIOLIB_SX128X_RX_TIMEOUT_INF, MESHTASTIC_RADIOLIB_IRQ_RX_FLAGS); if (err != RADIOLIB_ERR_NONE) LOG_ERROR("SX128X startReceive %s%d", radioLibErr, err); From 45fcd479f61a5350ead219dcba0e2610aa55da2b Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 23 Apr 2025 20:50:35 +0200 Subject: [PATCH 10/11] Update meshtastic-device-ui digest to 189ed6c (#6657) 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 f0756cb89..fe87fb3d8 100644 --- a/platformio.ini +++ b/platformio.ini @@ -108,7 +108,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/65eb74fadf373e3ceec0bddb95a7cb978e2acd81.zip + https://github.com/meshtastic/device-ui/archive/189ed6cba42c218e79142a876987f4516d0c87fd.zip ; Common libs for environmental measurements in telemetry module ; (not included in native / portduino) From 89df9d7686390aebecff349b63b9ffb2b333a69d Mon Sep 17 00:00:00 2001 From: todd-herbert Date: Fri, 25 Apr 2025 13:40:48 +1200 Subject: [PATCH 11/11] Fix WiPhone variant.h (#6664) --- variants/wiphone/variant.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/variants/wiphone/variant.h b/variants/wiphone/variant.h index cfa5667bb..70973db16 100644 --- a/variants/wiphone/variant.h +++ b/variants/wiphone/variant.h @@ -24,7 +24,7 @@ // This board has no GPS or Screen for now #undef GPS_RX_PIN #undef GPS_TX_PIN -#define NO_GPS +#define NO_GPS 1 #define HAS_GPS 0 #define NO_SCREEN #define HAS_SCREEN 0