From 6b145c38e646eef08e52196d31b7cac0f80f434b Mon Sep 17 00:00:00 2001 From: Elektr0Vodka <211697683+Elektr0Vodka@users.noreply.github.com> Date: Fri, 16 Oct 2026 14:53:47 +0200 Subject: [PATCH 1/2] fix(companion): build on non-ESP32 platforms The backup import used the ESP32 PSRAM allocator (heap_caps_*) and 'ota status' read HTTP OTA progress globals that only ESP32Board.cpp defines. Both broke every nRF52 companion build. Use the default ArduinoJson allocator and report 'ota: idle' outside ESP32. --- examples/companion_radio/MyMesh.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/examples/companion_radio/MyMesh.cpp b/examples/companion_radio/MyMesh.cpp index 1f21772e..4d6d69e9 100644 --- a/examples/companion_radio/MyMesh.cpp +++ b/examples/companion_radio/MyMesh.cpp @@ -832,6 +832,7 @@ bool MyMesh::handleMeshcomodCommand(const char* text, int text_len) { } if (strncasecmp(p, "status", 6) == 0 && (p[6] == '\0' || p[6] == ' ' || p[6] == '\t')) { char line[96]; +#ifdef ESP32 // the progress globals live in ESP32Board.cpp; no HTTP OTA elsewhere if (g_meshcore_http_ota_display_active) { if (g_meshcore_http_ota_display_pct == 0xFF) { snprintf(line, sizeof(line), "ota: active\n%s", g_meshcore_http_ota_display_line[0] ? g_meshcore_http_ota_display_line : "working"); @@ -839,7 +840,9 @@ bool MyMesh::handleMeshcomodCommand(const char* text, int text_len) { snprintf(line, sizeof(line), "ota: %u%%\n%s", (unsigned)g_meshcore_http_ota_display_pct, g_meshcore_http_ota_display_line[0] ? g_meshcore_http_ota_display_line : "working"); } - } else { + } else +#endif + { snprintf(line, sizeof(line), "ota: idle"); } pushMeshcomodReply(line); @@ -1599,6 +1602,7 @@ bool MyMesh::uiImportBackup(Stream& in, uint8_t sections, (void)replace_channels; if (out_channels) *out_channels = 0; if (out_contacts) *out_contacts = 0; +#if defined(ESP32) // PSRAM-backed doc so a big backup (60 KB+) doesn't exhaust internal RAM. struct PsAlloc : ArduinoJson::Allocator { void* allocate(size_t n) override { void* p = heap_caps_malloc(n, MALLOC_CAP_SPIRAM); return p ? p : malloc(n); } @@ -1606,6 +1610,9 @@ bool MyMesh::uiImportBackup(Stream& in, uint8_t sections, void* reallocate(void* p, size_t n) override { void* q = heap_caps_realloc(p, n, MALLOC_CAP_SPIRAM); return q ? q : realloc(p, n); } } alloc; JsonDocument doc(&alloc); +#else + JsonDocument doc; // no heap_caps / PSRAM outside ESP32 (nRF52): default heap allocator +#endif if (deserializeJson(doc, in)) return false; JsonObjectConst root = doc.as(); if (root.isNull()) return false; From a32ebcf84b648366f064409c858763499f3b35fc Mon Sep 17 00:00:00 2001 From: Elektr0Vodka <211697683+Elektr0Vodka@users.noreply.github.com> Date: Fri, 16 Oct 2026 14:53:47 +0200 Subject: [PATCH 2/2] feat(build): release Wio Tracker L1 BLE and USB companions Add WioTrackerL1_companion_radio_ble and _usb to the meshcomod release list so CI builds and publishes them (.uf2 and DFU .zip). This covers the Wio Tracker L1 Pro, which is the same nRF52840 board. Without Wi-Fi these are single-transport: no TCP, SNMP or manifest OTA. The CAD toggle and receive filter are included. The BLE env also joins the PR build check so ESP32-only companion code is caught before merge. --- .github/workflows/pr-build-check.yml | 2 ++ README.md | 5 ++++- build.sh | 5 +++++ changelog_ev.md | 9 +++++++++ docs/CI_RELEASES.md | 2 +- 5 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-build-check.yml b/.github/workflows/pr-build-check.yml index c1cc4a53..7644fa4a 100644 --- a/.github/workflows/pr-build-check.yml +++ b/.github/workflows/pr-build-check.yml @@ -29,6 +29,8 @@ jobs: - Heltec_v3_companion_radio_usb_tcp - heltec_v4_companion_radio_usb_tcp - heltec_v4_tft_companion_radio_usb_tcp_touch + # nRF52840, catches fork companion code that only builds on ESP32 + - WioTrackerL1_companion_radio_ble steps: - name: Clone Repo diff --git a/README.md b/README.md index b68c44f8..71f0f347 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ This is the **Elektr0Vodka fork** of [ALLFATHER-BV/meshcomod](https://github.com | [Receive filter](docs/companion_receive_filter.md) | `filter` CLI that drops junk group text (malformed, too old, relayed by a blocked repeater) and hides channel text by sender or content. Off by default. | Builds, not tested on hardware. | | [SNMP agent](docs/companion_snmp.md) | Read-only SNMPv2c on UDP 161, same OID layout as the Dutch-MeshCore observer. Off by default (`set snmp on`). Not in the touch build. | Builds, not tested on hardware. | | [Manifest OTA](docs/companion_manifest_ota.md) | `ota check` and `ota update` against the DutchMeshCore OTA server. Never downgrades, refuses a partition layout change. | Builds, not tested on hardware. | -| Extra boards | `usb_tcp` builds for V4 R8, V4 R8 TFT, V4 TFT (no touch), Wireless Stick Lite V3 and Wireless Tracker. | Builds, not tested on hardware. | +| Extra boards | `usb_tcp` builds for V4 R8, V4 R8 TFT, V4 TFT (no touch), Wireless Stick Lite V3 and Wireless Tracker. BLE and USB builds for the Seeed Wio Tracker L1 / L1 Pro. | Builds, not tested on hardware. | | CI | One runner per board, cached toolchains, pre-releases for test builds. | In use. | A build with the receive filter reports it in `ver`, e.g. `v1.18.0.1--dmc-filter (Build: ...)`. @@ -63,9 +63,12 @@ Otherwise this is the same codebase as MeshCore; upstream meshcomod syncs from M | **Heltec WiFi LoRa 32 V4 TFT** | ESP32-S3 | 240×320 TFT (button UI, no touch) | `heltec_v4_tft_companion_radio_usb_tcp` | Build only, new in fork | | **Heltec Wireless Stick Lite V3** | ESP32-S3 | none | `Heltec_WSL3_companion_radio_usb_tcp` | Build only, new in fork | | **Heltec Wireless Tracker** | ESP32-S3 | 160×80 TFT, GPS | `Heltec_Wireless_Tracker_companion_radio_usb_tcp` | Build only, new in fork | +| **Seeed Wio Tracker L1 / L1 Pro** | nRF52840 | 128×64 OLED, GPS | `WioTrackerL1_companion_radio_ble`, `WioTrackerL1_companion_radio_usb` | Build only, new in fork | The SNMP, receive filter and manifest OTA features are not hardware tested on any board yet, including V4 and V3. +The **Wio Tracker L1** has no Wi-Fi (nRF52840), so it gets the stock single-transport companions: one image for BLE, one for USB, not both at once. TCP, WebSocket, SNMP and manifest OTA are not available on it. The CAD toggle and receive filter are included. Flash the `.uf2` by double-tapping reset and copying it to the USB drive that appears; the `.zip` is the DFU package for OTA over BLE. + **Env-name casing matters when building:** V4 uses lowercase `heltec_v4_…`; V3 uses a capital H `Heltec_v3_…`. Use the exact name (see [Build it yourself](#hard--build-it-yourself)). > **Touch UI builds** (Heltec V4 TFT with the touchscreen, LilyGo T-Deck) are built and released from **[wadamesh](https://github.com/ALLFATHER-BV/wadamesh)**, not here. diff --git a/build.sh b/build.sh index 30e23ea8..80c90c16 100755 --- a/build.sh +++ b/build.sh @@ -334,6 +334,11 @@ MESHCOMOD_COMPANION_ENVS=( # as reported-not-observed. "ThinkNode_M7_companion_radio_ble" # ThinkNode M7 — BLE companion "ThinkNode_M7_companion_radio_ethernet" # ThinkNode M7 — PoE/Ethernet companion + # Seeed Wio Tracker L1 / L1 Pro (nRF52840 + SX1262, SH1106 OLED). The nRF52840 has + # no Wi-Fi, so there is no TCP, SNMP or manifest OTA here: these are the stock + # single-transport companions (one of BLE or USB). build_firmware emits .uf2 + .zip. + "WioTrackerL1_companion_radio_ble" # Wio Tracker L1 (Pro), BLE companion + "WioTrackerL1_companion_radio_usb" # Wio Tracker L1 (Pro), USB companion ) # True if $1 is one of the boards we publish, so build_firmware knows to emit a merged image # regardless of how the env happens to be named. diff --git a/changelog_ev.md b/changelog_ev.md index 77a02607..3d51743a 100644 --- a/changelog_ev.md +++ b/changelog_ev.md @@ -14,6 +14,14 @@ Newest first. Each entry names the PR that landed it. ## Unreleased +### Added + +- **Seeed Wio Tracker L1 / L1 Pro companions**: the existing upstream `WioTrackerL1_companion_radio_ble` and `WioTrackerL1_companion_radio_usb` envs are now in the release list, so the fork builds and releases them (`.uf2` + DFU `.zip`). The nRF52840 has no Wi-Fi, so these are single-transport (BLE or USB) with no TCP, SNMP or manifest OTA. The CAD toggle and receive filter build in. Builds, not tested on hardware. + +### CI and build + +- **PR build check covers nRF52**: `WioTrackerL1_companion_radio_ble` joins the PR matrix so fork companion code that only builds on ESP32 is caught. + ### Docs - **Fork changelog** (#11): this file, `changelog_ev.md`. @@ -22,6 +30,7 @@ Newest first. Each entry names the PR that landed it. ### Fixed +- **Companion builds on nRF52**: two pieces of upstream meshcomod companion code assumed ESP32 and broke any non-ESP32 companion build. The backup import used the ESP32 PSRAM allocator (`heap_caps_*`); it now uses the default allocator elsewhere. `ota status` read HTTP OTA progress globals that only `ESP32Board.cpp` defines; it now reports `ota: idle` on boards without HTTP OTA. - **Docs site deploy**: the Pages workflow no longer writes upstream's `docs.meshcore.nz` CNAME into `gh-pages`, and `mkdocs.yml` points at this fork (`elektr0vodka.github.io/meshcomod`) instead of `meshcore-dev`. GitHub Pages must serve the `gh-pages` branch for the mkdocs site to show; it was serving `main` `/docs` through Jekyll. ## 2026-10-16 diff --git a/docs/CI_RELEASES.md b/docs/CI_RELEASES.md index f11dfcfa..c629658c 100644 --- a/docs/CI_RELEASES.md +++ b/docs/CI_RELEASES.md @@ -13,7 +13,7 @@ releases on that track (keeping the newest 5). | Track | Tag prefix | Example tag | Workflow | Builds | |-------|-----------|-------------|----------|--------| -| Companion | `companion-` | `companion-v1.16.0.1` | build-companion-firmwares | the envs in `MESHCOMOD_COMPANION_ENVS` in `build.sh` (V4, V3, Wireless Paper, Xiao, V4 R8, V4 R8 TFT, V4 TFT, Wireless Stick Lite V3 and Wireless Tracker `_usb_tcp`, ThinkNode M7 BLE and Ethernet) | +| Companion | `companion-` | `companion-v1.16.0.1` | build-companion-firmwares | the envs in `MESHCOMOD_COMPANION_ENVS` in `build.sh` (V4, V3, Wireless Paper, Xiao, V4 R8, V4 R8 TFT, V4 TFT, Wireless Stick Lite V3 and Wireless Tracker `_usb_tcp`, ThinkNode M7 BLE and Ethernet, Wio Tracker L1 BLE and USB) | | Room server | `room-server-` | `room-server-v1.16.0.1` | build-room-server-firmwares | `*_room_server` | | Repeater | — | (manual `workflow_dispatch`) | build-repeater-firmwares | `*_repeater_tcp` |