From 74b3dc34e4e230193fa6e5bab9fd88fbce5d574b Mon Sep 17 00:00:00 2001 From: todd-herbert Date: Fri, 18 Apr 2025 10:11:42 +1200 Subject: [PATCH 01/17] Fix crash when clearing NRF52 BLE bonds (#6609) * Fix crash before clearing BLE bonds * Prevent clients re-pairing BLE during factory reset Clients seem able to re-pair BLE after clearing bonds during factory reset, even after advertising disabled. This seems to primarily occur on Android devices, which seem to more actively maintain the BLE connection. As a workaround, `NRF52Bluetooth::shutdown` swaps the BLE pairing callback to one which actively rejects new connections. --------- Co-authored-by: Ben Meadors --- src/mesh/NodeDB.cpp | 1 - src/platform/nrf52/NRF52Bluetooth.cpp | 40 +++++++++++++++++++-------- src/platform/nrf52/NRF52Bluetooth.h | 3 ++ 3 files changed, 32 insertions(+), 12 deletions(-) diff --git a/src/mesh/NodeDB.cpp b/src/mesh/NodeDB.cpp index 90a90e89f..67f0da600 100644 --- a/src/mesh/NodeDB.cpp +++ b/src/mesh/NodeDB.cpp @@ -450,7 +450,6 @@ bool NodeDB::factoryReset(bool eraseBleBonds) nvs_flash_erase(); #endif #ifdef ARCH_NRF52 - Bluefruit.begin(); LOG_INFO("Clear bluetooth bonds!"); bond_print_list(BLE_GAP_ROLE_PERIPH); bond_print_list(BLE_GAP_ROLE_CENTRAL); diff --git a/src/platform/nrf52/NRF52Bluetooth.cpp b/src/platform/nrf52/NRF52Bluetooth.cpp index 87d8adfa9..4f6fe7c6b 100644 --- a/src/platform/nrf52/NRF52Bluetooth.cpp +++ b/src/platform/nrf52/NRF52Bluetooth.cpp @@ -210,17 +210,8 @@ void NRF52Bluetooth::shutdown() { // Shutdown bluetooth for minimum power draw LOG_INFO("Disable NRF52 bluetooth"); - uint8_t connection_num = Bluefruit.connected(); - if (connection_num) { - for (uint8_t i = 0; i < connection_num; i++) { - LOG_INFO("NRF52 bluetooth disconnecting handle %d", i); - Bluefruit.disconnect(i); - } - // Wait for disconnection - while (Bluefruit.connected()) - yield(); - LOG_INFO("All bluetooth connections ended"); - } + Bluefruit.Security.setPairPasskeyCallback(NRF52Bluetooth::onUnwantedPairing); // Actively refuse (during factory reset) + disconnect(); Bluefruit.Advertising.stop(); } void NRF52Bluetooth::startDisabled() @@ -372,6 +363,33 @@ bool NRF52Bluetooth::onPairingPasskey(uint16_t conn_handle, uint8_t const passke LOG_INFO("BLE passkey pair: match_request=%i", match_request); return true; } + +// Actively refuse new BLE pairings +// After clearing bonds (at factory reset), clients seem initially able to attempt to re-pair, even with advertising disabled. +// On NRF52Bluetooth::shutdown, we change the pairing callback to this method, to aggressively refuse any connection attempts. +bool NRF52Bluetooth::onUnwantedPairing(uint16_t conn_handle, uint8_t const passkey[6], bool match_request) +{ + NRF52Bluetooth::disconnect(); + return false; +} + +// Disconnect any BLE connections +void NRF52Bluetooth::disconnect() +{ + uint8_t connection_num = Bluefruit.connected(); + if (connection_num) { + // Close all connections. We're only expecting one. + for (uint8_t i = 0; i < connection_num; i++) + Bluefruit.disconnect(i); + + // Wait for disconnection + while (Bluefruit.connected()) + yield(); + + LOG_INFO("Ended BLE connection"); + } +} + void NRF52Bluetooth::onPairingCompleted(uint16_t conn_handle, uint8_t auth_status) { if (auth_status == BLE_GAP_SEC_STATUS_SUCCESS) { diff --git a/src/platform/nrf52/NRF52Bluetooth.h b/src/platform/nrf52/NRF52Bluetooth.h index 2229163f8..630ab05bc 100644 --- a/src/platform/nrf52/NRF52Bluetooth.h +++ b/src/platform/nrf52/NRF52Bluetooth.h @@ -19,4 +19,7 @@ class NRF52Bluetooth : BluetoothApi static void onConnectionSecured(uint16_t conn_handle); static bool onPairingPasskey(uint16_t conn_handle, uint8_t const passkey[6], bool match_request); static void onPairingCompleted(uint16_t conn_handle, uint8_t auth_status); + + static bool onUnwantedPairing(uint16_t conn_handle, uint8_t const passkey[6], bool match_request); + static void disconnect(); }; \ No newline at end of file From 9da141aa8c062bfb3664214d0945fb95b6a44e8a Mon Sep 17 00:00:00 2001 From: Austin Date: Fri, 18 Apr 2025 08:27:38 -0400 Subject: [PATCH 02/17] Add TFT docker builds (for CI) (#6614) --- .github/workflows/docker_build.yml | 7 +++++++ .github/workflows/main_matrix.yml | 26 ++++++++++++++++++++++---- Dockerfile | 13 ++++++++----- alpine.Dockerfile | 6 ++++-- bin/build-native.sh | 7 ++++--- 5 files changed, 45 insertions(+), 14 deletions(-) diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index eec0785c0..cde7fd274 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -26,6 +26,11 @@ on: required: false type: boolean default: false + pio_env: + description: PlatformIO environment to build + required: false + type: string + default: native outputs: digest: description: Digest of built image @@ -90,3 +95,5 @@ jobs: push: ${{ inputs.push }} tags: ${{ steps.meta.outputs.tags }} # Tag is only meant to be consumed by the "manifest" job platforms: ${{ inputs.platform }} + build-args: | + PIO_ENV=${{ inputs.pio_env }} diff --git a/.github/workflows/main_matrix.yml b/.github/workflows/main_matrix.yml index 5b11926f2..0889ce22e 100644 --- a/.github/workflows/main_matrix.yml +++ b/.github/workflows/main_matrix.yml @@ -145,7 +145,7 @@ jobs: test-native: uses: ./.github/workflows/test_native.yml - docker-debian-amd64: + docker-deb-amd64: uses: ./.github/workflows/docker_build.yml with: distro: debian @@ -153,7 +153,16 @@ jobs: runs-on: ubuntu-24.04 push: false - docker-alpine-amd64: + docker-deb-amd64-tft: + uses: ./.github/workflows/docker_build.yml + with: + distro: debian + platform: linux/amd64 + runs-on: ubuntu-24.04 + push: false + pio_env: native-tft + + docker-alp-amd64: uses: ./.github/workflows/docker_build.yml with: distro: alpine @@ -161,7 +170,16 @@ jobs: runs-on: ubuntu-24.04 push: false - docker-debian-arm64: + docker-alp-amd64-tft: + uses: ./.github/workflows/docker_build.yml + with: + distro: alpine + platform: linux/amd64 + runs-on: ubuntu-24.04 + push: false + pio_env: native-tft + + docker-deb-arm64: uses: ./.github/workflows/docker_build.yml with: distro: debian @@ -169,7 +187,7 @@ jobs: runs-on: ubuntu-24.04-arm push: false - docker-debian-armv7: + docker-deb-armv7: uses: ./.github/workflows/docker_build.yml with: distro: debian diff --git a/Dockerfile b/Dockerfile index 55580c579..be192f216 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,9 +1,9 @@ # trunk-ignore-all(terrascan/AC_DOCKER_0002): Known terrascan issue # trunk-ignore-all(trivy/DS002): We must run as root for this container -# trunk-ignore-all(checkov/CKV_DOCKER_8): We must run as root for this container # trunk-ignore-all(hadolint/DL3002): We must run as root for this container # trunk-ignore-all(hadolint/DL3008): Do not pin apt package versions # trunk-ignore-all(hadolint/DL3013): Do not pin pip package versions +ARG PIO_ENV=native FROM python:3.13-bookworm AS builder ENV DEBIAN_FRONTEND=noninteractive @@ -12,9 +12,10 @@ ENV TZ=Etc/UTC # Install Dependencies ENV PIP_ROOT_USER_ACTION=ignore RUN apt-get update && apt-get install --no-install-recommends -y \ - curl wget g++ zip git ca-certificates \ + curl wget g++ zip git ca-certificates pkg-config \ libgpiod-dev libyaml-cpp-dev libbluetooth-dev libi2c-dev libuv1-dev \ - libusb-1.0-0-dev libulfius-dev liborcania-dev libssl-dev pkg-config \ + libusb-1.0-0-dev libulfius-dev liborcania-dev libssl-dev \ + libx11-dev libinput-dev libxkbcommon-x11-dev \ && apt-get clean && rm -rf /var/lib/apt/lists/* \ && pip install --no-cache-dir -U platformio \ && mkdir /tmp/firmware @@ -24,7 +25,7 @@ WORKDIR /tmp/firmware COPY . /tmp/firmware # Build -RUN bash ./bin/build-native.sh && \ +RUN bash ./bin/build-native.sh "$PIO_ENV" && \ cp "/tmp/firmware/release/meshtasticd_linux_$(uname -m)" "/tmp/firmware/release/meshtasticd" # Fetch web assets @@ -44,7 +45,9 @@ ENV TZ=Etc/UTC USER root RUN apt-get update && apt-get --no-install-recommends -y install \ - libc-bin libc6 libgpiod2 libyaml-cpp0.7 libi2c0 libuv1 libusb-1.0-0-dev liborcania2.3 libulfius2.7 libssl3 \ + libc-bin libc6 libgpiod2 libyaml-cpp0.7 libi2c0 libuv1 libusb-1.0-0-dev \ + liborcania2.3 libulfius2.7 libssl3 \ + libx11-6 libinput10 libxkbcommon-x11-0 \ && apt-get clean && rm -rf /var/lib/apt/lists/* \ && mkdir -p /var/lib/meshtasticd \ && mkdir -p /etc/meshtasticd/config.d \ diff --git a/alpine.Dockerfile b/alpine.Dockerfile index 17afc2964..f85c147da 100644 --- a/alpine.Dockerfile +++ b/alpine.Dockerfile @@ -1,8 +1,8 @@ # trunk-ignore-all(trivy/DS002): We must run as root for this container -# trunk-ignore-all(checkov/CKV_DOCKER_8): We must run as root for this container # trunk-ignore-all(hadolint/DL3002): We must run as root for this container # trunk-ignore-all(hadolint/DL3018): Do not pin apk package versions # trunk-ignore-all(hadolint/DL3013): Do not pin pip package versions +ARG PIO_ENV=native FROM python:3.13-alpine3.21 AS builder @@ -10,6 +10,7 @@ ENV PIP_ROOT_USER_ACTION=ignore RUN apk --no-cache add \ bash g++ libstdc++-dev linux-headers zip git ca-certificates libgpiod-dev yaml-cpp-dev bluez-dev \ libusb-dev i2c-tools-dev libuv-dev openssl-dev pkgconf argp-standalone \ + libx11-dev libinput-dev libxkbcommon-dev \ && rm -rf /var/cache/apk/* \ && pip install --no-cache-dir -U platformio \ && mkdir /tmp/firmware @@ -21,7 +22,7 @@ COPY . /tmp/firmware # Add `argp` for musl ENV PLATFORMIO_BUILD_FLAGS="-Os -ffunction-sections -fdata-sections -Wl,--gc-sections -largp" -RUN bash ./bin/build-native.sh && \ +RUN bash ./bin/build-native.sh "$PIO_ENV" && \ cp "/tmp/firmware/release/meshtasticd_linux_$(uname -m)" "/tmp/firmware/release/meshtasticd" # ##### PRODUCTION BUILD ############# @@ -33,6 +34,7 @@ USER root RUN apk --no-cache add \ libstdc++ libgpiod yaml-cpp libusb i2c-tools libuv \ + libx11 libinput libxkbcommon \ && rm -rf /var/cache/apk/* \ && mkdir -p /var/lib/meshtasticd \ && mkdir -p /etc/meshtasticd/config.d \ diff --git a/bin/build-native.sh b/bin/build-native.sh index c6b1434dd..51379ad76 100755 --- a/bin/build-native.sh +++ b/bin/build-native.sh @@ -15,6 +15,7 @@ platformioFailed() { VERSION=$(bin/buildinfo.py long) SHORT_VERSION=$(bin/buildinfo.py short) +PIO_ENV=${1:-native} OUTDIR=release/ @@ -24,7 +25,7 @@ mkdir -p $OUTDIR/ rm -r $OUTDIR/* || true # Important to pull latest version of libs into all device flavors, otherwise some devices might be stale -pio pkg update --environment native || platformioFailed -pio run --environment native || platformioFailed -cp .pio/build/native/program "$OUTDIR/meshtasticd_linux_$(uname -m)" +pio pkg update --environment "$PIO_ENV" || platformioFailed +pio run --environment "$PIO_ENV" || platformioFailed +cp ".pio/build/$PIO_ENV/program" "$OUTDIR/meshtasticd_linux_$(uname -m)" cp bin/native-install.* $OUTDIR From 64a1cd3f99ca39f08f302b0cecd6b6aa0fdf4231 Mon Sep 17 00:00:00 2001 From: Austin Date: Fri, 18 Apr 2025 10:29:39 -0400 Subject: [PATCH 03/17] Docker is fun (#6623) --- Dockerfile | 2 +- alpine.Dockerfile | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index be192f216..6c1b83653 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,9 +3,9 @@ # trunk-ignore-all(hadolint/DL3002): We must run as root for this container # trunk-ignore-all(hadolint/DL3008): Do not pin apt package versions # trunk-ignore-all(hadolint/DL3013): Do not pin pip package versions -ARG PIO_ENV=native FROM python:3.13-bookworm AS builder +ARG PIO_ENV=native ENV DEBIAN_FRONTEND=noninteractive ENV TZ=Etc/UTC diff --git a/alpine.Dockerfile b/alpine.Dockerfile index f85c147da..f4a95095d 100644 --- a/alpine.Dockerfile +++ b/alpine.Dockerfile @@ -2,11 +2,11 @@ # trunk-ignore-all(hadolint/DL3002): We must run as root for this container # trunk-ignore-all(hadolint/DL3018): Do not pin apk package versions # trunk-ignore-all(hadolint/DL3013): Do not pin pip package versions -ARG PIO_ENV=native FROM python:3.13-alpine3.21 AS builder - +ARG PIO_ENV=native ENV PIP_ROOT_USER_ACTION=ignore + RUN apk --no-cache add \ bash g++ libstdc++-dev linux-headers zip git ca-certificates libgpiod-dev yaml-cpp-dev bluez-dev \ libusb-dev i2c-tools-dev libuv-dev openssl-dev pkgconf argp-standalone \ From 5ab1db01420210896082eb4fcc2be741a23b1d70 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 18 Apr 2025 09:36:23 -0500 Subject: [PATCH 04/17] chore(deps): update meshtastic-device-ui digest to 65eb74f (#6624) 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 85505d63a..f0756cb89 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/da8fb5eaac7874c31508fad5252999ec82c02498.zip + https://github.com/meshtastic/device-ui/archive/65eb74fadf373e3ceec0bddb95a7cb978e2acd81.zip ; Common libs for environmental measurements in telemetry module ; (not included in native / portduino) From c6e5ec055f9bb44b823d0895eea053726fe07e3d Mon Sep 17 00:00:00 2001 From: Austin Date: Fri, 18 Apr 2025 20:48:32 -0400 Subject: [PATCH 05/17] RPM: Build native-tft target (#6613) --- meshtasticd.spec.rpkg | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/meshtasticd.spec.rpkg b/meshtasticd.spec.rpkg index 4d6c9d6f5..2d777bc76 100644 --- a/meshtasticd.spec.rpkg +++ b/meshtasticd.spec.rpkg @@ -42,6 +42,10 @@ BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(liborcania) BuildRequires: pkgconfig(libyder) BuildRequires: pkgconfig(libulfius) +# TFT components: +BuildRequires: pkgconfig(x11) +BuildRequires: pkgconfig(libinput) +BuildRequires: pkgconfig(xkbcommon-x11) %description Meshtastic daemon for controlling Meshtastic devices. Meshtastic is an off-grid @@ -55,12 +59,12 @@ tar -xf %{SOURCE1} -C web gzip -dr web %build -# Use the “native” environment from platformio to build a Linux binary -platformio run -e native +# Use the “native-tft” environment from platformio to build a Linux binary +platformio run -e native-tft %install mkdir -p %{buildroot}%{_sbindir} -install -m 0755 .pio/build/native/program %{buildroot}%{_sbindir}/meshtasticd +install -m 0755 .pio/build/native-tft/program %{buildroot}%{_sbindir}/meshtasticd mkdir -p %{buildroot}%{_sysconfdir}/meshtasticd install -m 0644 bin/config-dist.yaml %{buildroot}%{_sysconfdir}/meshtasticd/config.yaml From d26b50b78c28cf9cfaf2002fce0946b0fb14d36d Mon Sep 17 00:00:00 2001 From: Austin Date: Sat, 19 Apr 2025 00:29:59 -0400 Subject: [PATCH 06/17] docker alpine: Add available.d config templates (#6631) --- alpine.Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/alpine.Dockerfile b/alpine.Dockerfile index f4a95095d..350129040 100644 --- a/alpine.Dockerfile +++ b/alpine.Dockerfile @@ -39,7 +39,11 @@ RUN apk --no-cache add \ && mkdir -p /var/lib/meshtasticd \ && mkdir -p /etc/meshtasticd/config.d \ && mkdir -p /etc/meshtasticd/ssl + +# Fetch compiled binary from the builder COPY --from=builder /tmp/firmware/release/meshtasticd /usr/sbin/ +# Copy config templates +COPY ./bin/config.d /etc/meshtasticd/available.d WORKDIR /var/lib/meshtasticd VOLUME /var/lib/meshtasticd From 916afb5098d320cacb324e81d0f663a57696ba12 Mon Sep 17 00:00:00 2001 From: Austin Date: Sat, 19 Apr 2025 10:56:41 -0400 Subject: [PATCH 07/17] appdata.xml: Add date to all releases (#6632) --- bin/org.meshtastic.meshtasticd.metainfo.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/org.meshtastic.meshtasticd.metainfo.xml b/bin/org.meshtastic.meshtasticd.metainfo.xml index cb921fcb3..32e6eb077 100644 --- a/bin/org.meshtastic.meshtasticd.metainfo.xml +++ b/bin/org.meshtastic.meshtasticd.metainfo.xml @@ -1,4 +1,4 @@ - + org.meshtastic.meshtasticd @@ -87,13 +87,13 @@ - + https://github.com/meshtastic/firmware/releases?q=tag%3Av2.6.6 - + https://github.com/meshtastic/firmware/releases?q=tag%3Av2.6.5 - + https://github.com/meshtastic/firmware/releases?q=tag%3Av2.6.4 From a30f431b6a89261ef02ed115bd78f51cb0294299 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sat, 19 Apr 2025 18:49:05 +0200 Subject: [PATCH 08/17] Update Kongduino-Adafruit_nRFCrypto digest to 5f838d2 (#6634) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- arch/nrf52/nrf52840.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/nrf52/nrf52840.ini b/arch/nrf52/nrf52840.ini index fb5ba9960..f0a4ab6c0 100644 --- a/arch/nrf52/nrf52840.ini +++ b/arch/nrf52/nrf52840.ini @@ -7,7 +7,7 @@ lib_deps = ${nrf52_base.lib_deps} ${environmental_base.lib_deps} # renovate: datasource=git-refs depName=Kongduino-Adafruit_nRFCrypto packageName=https://github.com/Kongduino/Adafruit_nRFCrypto gitBranch=master - https://github.com/Kongduino/Adafruit_nRFCrypto/archive/e31a8825ea3300b163a0a3c1ddd5de34e10e1371.zip + https://github.com/Kongduino/Adafruit_nRFCrypto/archive/5f838d2709461a2c981f642917aa50254a25c14c.zip ; Common NRF52 debugging settings follow. See the Meshtastic developer docs for how to connect SWD debugging probes to your board. 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 09/17] 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 10/17] 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 11/17] 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 12/17] 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 13/17] 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 14/17] 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 15/17] 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 16/17] 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 17/17] 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);