diff --git a/.github/workflows/build-wio-tracker-l1-firmwares.yml b/.github/workflows/build-wio-tracker-l1-firmwares.yml index b6ba1cea..225dff62 100644 --- a/.github/workflows/build-wio-tracker-l1-firmwares.yml +++ b/.github/workflows/build-wio-tracker-l1-firmwares.yml @@ -24,16 +24,21 @@ jobs: - name: Setup Build Environment uses: ./.github/actions/setup-build-environment - - name: Extract Version from Git Tag - run: echo "GIT_TAG_VERSION=${GITHUB_REF_NAME}" >> $GITHUB_ENV + - name: Resolve build version + run: | + if [ "$GITHUB_REF_TYPE" = "tag" ]; then + echo "BUILD_VERSION=${GITHUB_REF_NAME}" >> $GITHUB_ENV + else + echo "BUILD_VERSION=dev-$(git rev-parse --short HEAD)" >> $GITHUB_ENV + fi - name: Build Dual OLED Firmware env: - FIRMWARE_VERSION: ${{ env.GIT_TAG_VERSION }} + FIRMWARE_VERSION: ${{ env.BUILD_VERSION }} run: /usr/bin/env bash build.sh build-firmware WioTrackerL1_companion_dual - name: Rename OLED firmware - run: mv out/*.uf2 "out/solo-${{ env.GIT_TAG_VERSION }}-oled.uf2" 2>/dev/null || true + run: mv out/*.uf2 "out/solo-${{ env.BUILD_VERSION }}-oled.uf2" 2>/dev/null || true - name: Upload OLED Firmware uses: actions/upload-artifact@v4 @@ -51,16 +56,21 @@ jobs: - name: Setup Build Environment uses: ./.github/actions/setup-build-environment - - name: Extract Version from Git Tag - run: echo "GIT_TAG_VERSION=${GITHUB_REF_NAME}" >> $GITHUB_ENV + - name: Resolve build version + run: | + if [ "$GITHUB_REF_TYPE" = "tag" ]; then + echo "BUILD_VERSION=${GITHUB_REF_NAME}" >> $GITHUB_ENV + else + echo "BUILD_VERSION=dev-$(git rev-parse --short HEAD)" >> $GITHUB_ENV + fi - name: Build Dual E-ink Firmware env: - FIRMWARE_VERSION: ${{ env.GIT_TAG_VERSION }} + FIRMWARE_VERSION: ${{ env.BUILD_VERSION }} run: /usr/bin/env bash build.sh build-firmware WioTrackerL1Eink_companion_dual - name: Rename E-ink firmware - run: mv out/*.uf2 "out/solo-${{ env.GIT_TAG_VERSION }}-eink.uf2" 2>/dev/null || true + run: mv out/*.uf2 "out/solo-${{ env.BUILD_VERSION }}-eink.uf2" 2>/dev/null || true - name: Upload E-ink Firmware uses: actions/upload-artifact@v4 diff --git a/README.md b/README.md index 0b11d1f0..392c705d 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ -# Seeed Wio Tracker L1 - MeshCore "Solo" firmware +# Seeed Wio Tracker L1 - MeshCore "Solo" companion firmware This branch extends the official MeshCore companion radio firmware for the **Seeed Wio Tracker L1**. Provides support for both the original OLED and the e-ink variant, with additional features and UI enhancements. -Join the discussion on the offical MeshCore discord: https://discord.gg/sdhYArU2jr +Join the discussion on the official MeshCore Discord: https://discord.gg/sdhYArU2jr @@ -11,15 +11,6 @@ Join the discussion on the offical MeshCore discord: https://discord.gg/sdhYArU2 - [E-ink case](https://www.printables.com/model/1420534-seeed-wio-tracker-l1-e-ink-enclosure) - [Oled case](https://www.printables.com/model/1380791-meshpack-seeed-l1-oled) - - --- ## Feature highlights @@ -34,22 +25,32 @@ The e-ink variant targets the Wio Tracker L1 fitted with a 2.13″ GxEPD2 panel - [Settings Screen](./docs/solo_features/settings_screen/settings_screen.md) — configure display, sound, home page order, radio and system settings -- [Clock Screen](./docs/solo_features/clock_screen/clock_screen.md) — view time and date plus up to three configurable sensor values +- [Clock Screen](./docs/solo_features/clock_screen/clock_screen.md) — view time and date plus up to three configurable data fields - [Screen Lock](./docs/solo_features/screen_lock/screen_lock.md) — lock the device to prevent accidental keypresses, with a lock screen showing time and sensor data -- [Tools Screen](./docs/solo_features/tools_screen/tools_screen.md) — GPS trail recording and export, ringtone editor, auto-reply bot, and more +- [Tools Screen](./docs/solo_features/tools_screen/tools_screen.md) — GPS trail recording and export, nearby nodes, ringtone editor, auto-reply bot, auto-advert + +### E-ink Display + +The e-ink variant targets the Wio Tracker L1 fitted with a 2.13″ GxEPD2 panel (250 × 122 px). All screens have been adapted for the e-ink panel: + +- **Adaptive layout** — every screen reflows correctly in both landscape (250 × 122) and portrait (122 × 250) orientations +- **Display rotation** — configurable in Settings › Display; applied immediately and persisted across reboots +- **Joystick rotation** — independent of display rotation; useful for custom enclosures +- **Full refresh interval** — configurable in Settings › Display; reduces ghosting on long sessions +- **Clock seconds suppressed by default** — seconds are hidden to reduce per-second panel refreshes and extend display lifetime; re-enable in Settings › Display ## Firmware Variants Two firmware builds are published with each release: -| Variant | Display | File | -| --------- | ------------------------- | --------------------------------------- | -| **OLED** | SSD1306 / SH1106 128 × 64 | `WioTrackerL1_companion_dual_*.uf2` | -| **E-ink** | GxEPD2 250 × 122 | `WioTrackerL1Eink_companion_dual_*.uf2` | +| Variant | Display | File | +| --------- | ------------------------- | ------------------------- | +| **OLED** | SSD1306 / SH1106 128 × 64 | `solo--oled.uf2` | +| **E-ink** | GxEPD2 250 × 122 | `solo--eink.uf2` | -Both variants are built from a single codebase and share the same feature set. The `dual` in the filename means a single binary supports both BLE and USB serial — there are no separate BLE/USB builds. +Both variants are built from a single codebase and share the same feature set. The firmware supports both BLE and USB serial in a single binary — there are no separate BLE/USB builds. > [!IMPORTANT] > BLE connection has priority over USB serial. When a BLE connection is active, the USB protocol is suspended. When connecting to the companion app via USB, ensure to disconnect from BLE first or disable BLE directly from the device to avoid confusion. @@ -77,25 +78,59 @@ Updating to newer firmware versions usually does not require erasing flash unles ### This fork -| Document | Description | -|----------|-------------| -| [Messages Screen](./docs/solo_features/message_screen/message_screen.md) | Sending messages, context menus, reply, Notif/Melody overrides | -| [Favourites Dial](./docs/solo_features/favourites_dial/favourites_dial.md) | Pinned contacts grid, unread badges, pin/unpin | -| [Clock Screen](./docs/solo_features/clock_screen/clock_screen.md) | Clock page, date, configurable data fields | -| [Settings Screen](./docs/solo_features/settings_screen/settings_screen.md) | All settings sections with values and interactions | -| [Screen Lock](./docs/solo_features/screen_lock/screen_lock.md) | Lock/unlock sequence, lock screen, auto-lock | -| [Tools Screen](./docs/solo_features/tools_screen/tools_screen.md) | GPS trail, nearby nodes, ringtone editor, auto-reply bot, auto-advert | +| Document | Description | +| -------------------------------------------------------------------------- | --------------------------------------------------------------------- | +| [Messages Screen](./docs/solo_features/message_screen/message_screen.md) | Sending messages, context menus, reply, Notif/Melody overrides | +| [Favourites Dial](./docs/solo_features/favourites_dial/favourites_dial.md) | Pinned contacts grid, unread badges, pin/unpin | +| [Clock Screen](./docs/solo_features/clock_screen/clock_screen.md) | Clock page, date, configurable data fields | +| [Settings Screen](./docs/solo_features/settings_screen/settings_screen.md) | All settings sections with values and interactions | +| [Screen Lock](./docs/solo_features/screen_lock/screen_lock.md) | Lock/unlock sequence, lock screen, auto-lock | +| [Tools Screen](./docs/solo_features/tools_screen/tools_screen.md) | GPS trail, nearby nodes, ringtone editor, auto-reply bot, auto-advert | ### Upstream MeshCore -| Document | Description | -|----------|-------------| -| [FAQ](./docs/faq.md) | Frequently asked questions | -| [CLI Commands](./docs/cli_commands.md) | Commands for repeaters, room servers and sensors | -| [Terminal Chat CLI](./docs/terminal_chat_cli.md) | Commands for the terminal chat client | +| Document | Description | +| -------------------------------------------------- | ------------------------------------------------ | +| [FAQ](./docs/faq.md) | Frequently asked questions | +| [CLI Commands](./docs/cli_commands.md) | Commands for repeaters, room servers and sensors | +| [Terminal Chat CLI](./docs/terminal_chat_cli.md) | Commands for the terminal chat client | | [Companion Protocol](./docs/companion_protocol.md) | Serial/BLE frame protocol between device and app | -| [Packet Format](./docs/packet_format.md) | LoRa packet structure | -| [QR Codes](./docs/qr_codes.md) | Channel and contact QR code formats | +| [Packet Format](./docs/packet_format.md) | LoRa packet structure | +| [QR Codes](./docs/qr_codes.md) | Channel and contact QR code formats | + +--- + +## Screenshot Tool + +The firmware can capture the current display contents and send them over USB serial as a PNG — useful for debugging and documentation. Works with both OLED and e-ink variants. + +> [!NOTE] +> Requires firmware built with `-D ENABLE_SCREENSHOT`. Use the `_dev` environment or add the flag manually. + +**1. Build and flash with screenshot support** + +```sh +# OLED +PLATFORMIO_BUILD_FLAGS="-D ENABLE_SCREENSHOT" pio run -e WioTrackerL1_companion_dual -t upload + +# E-ink +pio run -e WioTrackerL1Eink_companion_dual_dev -t upload +``` + +**2. Disconnect from the companion app** — USB serial is not available while BLE/app is connected + +**3. Run the tool** — [uv](https://docs.astral.sh/uv/) is recommended for managing Python dependencies: + +```sh +uv run tools/screenshot.py +``` + +Options: + +- `--port PORT` — serial port (default: auto-detect) +- `--scale SCALE` — upscale factor for output image (default: 1) + +**4.** Press **S** in the interactive menu to capture. Screenshots are saved to `tools/pngs/` with a timestamp filename. --- @@ -109,49 +144,4 @@ git config merge.ours.driver true ### Contributing -Contributions are welcome! Fork the repository, make your changes, and submit a pull request. Please ensure your code adheres to the existing style and includes comments where necessary. - -#### Display Screenshot Tool - -> [!NOTE] -> The screenshot feature requires the `ENABLE_SCREENSHOT` build flag to be enabled. Add `-D ENABLE_SCREENSHOT` to your PlatformIO build flags, then recompile and flash the firmware. - -The firmware supports capturing the current display contents and transmitting -it over USB serial. This is useful for debugging, remote monitoring, or -creating documentation. - -**Important:** When the device is connected to the companion app, the USB -serial port is not available for communication. To use the screenshot tool, -ensure the device is not connected to the companion app. - -**Usage:** - -1. Build and flash firmware with `-D ENABLE_SCREENSHOT` build flag enabled - -Example for the OLED dual firmware: - -``` -PLATFORMIO_BUILD_FLAGS="-D ENABLE_SCREENSHOT" pio run -e WioTrackerL1_companion_dual -t upload -``` - -2. Connect the device to your computer via USB (ensure no companion app connection) -3. Install dependencies and run the screenshot tool. To manage python and python dependencies, use uv: https://docs.astral.sh/uv/ - - ```sh - cd tools - uv run tools/screenshot.py - ``` - - Options: - - `--port PORT` — Serial port to use (default: auto-detect) - - `--scale SCALE` — Upscale factor for the output image (1=no upscale, 2=2x, 3=3x, 4=4x, etc.; default: 1) - -4. In the tool's interactive menu, press **S** to capture a screenshot -5. The tool will save the screenshot as a PNG file in `tools/pngs/` with a timestamp-based filename - - +Contributions are welcome. Fork the repository, make your changes, and open a pull request. Please follow the existing code style and keep changes focused. diff --git a/docs/solo_features/clock_screen/clock_screen.md b/docs/solo_features/clock_screen/clock_screen.md index 185a23f3..790191d3 100644 --- a/docs/solo_features/clock_screen/clock_screen.md +++ b/docs/solo_features/clock_screen/clock_screen.md @@ -40,7 +40,7 @@ Up to three data fields are shown below the date separator. Each field displays | Humidity | Hum | % from onboard sensor | | Pressure | Pres | hPa from onboard sensor | | GPS | GPS | `lat lon` decimal degrees, or `no fix` | -| Altitude | Alt | metres from GPS | +| Altitude | Alt | metres from onboard sensor (GPS or barometric) | | Luminosity | Lux | lux from onboard sensor | | CO₂ | CO2 | ppm from onboard sensor | | Contacts | Nodes | Total contacts in the mesh | diff --git a/docs/solo_features/favourites_dial/favourites_dial.md b/docs/solo_features/favourites_dial/favourites_dial.md index 1dfd9b22..ee55a4a6 100644 --- a/docs/solo_features/favourites_dial/favourites_dial.md +++ b/docs/solo_features/favourites_dial/favourites_dial.md @@ -39,6 +39,7 @@ If a pinned contact has been removed from the contacts list, the tile shows `(go 1. Contacts marked as favourites in the upstream app (starred contacts) — listed first 2. Recent DM contacts — listed after +3. All remaining chat contacts — fallback when the first two tiers are empty (e.g. fresh install before any DMs) Select a contact to pin it to that slot. diff --git a/docs/solo_features/message_screen/message_screen.md b/docs/solo_features/message_screen/message_screen.md index 0551a772..c6c72f8a 100644 --- a/docs/solo_features/message_screen/message_screen.md +++ b/docs/solo_features/message_screen/message_screen.md @@ -61,9 +61,11 @@ Each entry in the history list shows the sender name and a compact age indicator Navigate between messages with **LEFT** (newer) and **RIGHT** (older). Long messages scroll with **UP/DOWN**. If the message is a reply addressed to someone (`@[nick]`), a **To: nick** bar is shown below the sender name and the body is displayed without the address prefix. -| OLED | E-Ink | -|:----:|:-----:| -| ![](./mes_scr_5_oled.png) |![](./mes_scr_5_eink.png) | + +| OLED | E-Ink | +| :-----------------------: | :-----------------------: | +| ![](./mes_scr_5_oled.png) | ![](./mes_scr_5_eink.png) | + **Hold Enter** in fullscreen opens the Reply option. --- @@ -71,8 +73,9 @@ If the message is a reply addressed to someone (`@[nick]`), a **To: nick** bar i ### Context menu — contact list **Hold Enter** on a contact entry opens a context menu: -| OLED | E-Ink | -|:----:|:-----:| + +| OLED | E-Ink | +| :-----------------------: | :-----------------------: | | ![](./mes_scr_6_oled.png) | ![](./mes_scr_6_eink.png) | | Item | Action | diff --git a/docs/solo_features/settings_screen/set_scr_1_eink copy.png b/docs/solo_features/settings_screen/set_scr_1_eink copy.png deleted file mode 100644 index 15c6fe58..00000000 Binary files a/docs/solo_features/settings_screen/set_scr_1_eink copy.png and /dev/null differ diff --git a/examples/companion_radio/ui-new/UITask.cpp b/examples/companion_radio/ui-new/UITask.cpp index c251afdf..8b7eb135 100644 --- a/examples/companion_radio/ui-new/UITask.cpp +++ b/examples/companion_radio/ui-new/UITask.cpp @@ -37,7 +37,7 @@ class SplashScreen : public UIScreen { UITask* _task; unsigned long dismiss_after; char _version_info[12]; - char _plus_ver[12]; + char _solo_ver[12]; public: SplashScreen(UITask* task) : _task(task) { @@ -45,13 +45,13 @@ public: strncpy(_version_info, MESHCORE_VERSION, sizeof(_version_info) - 1); _version_info[sizeof(_version_info) - 1] = '\0'; - // Plus firmware version: strip commit hash suffix (v1.11-abcdef -> v1.11) + // Solo firmware version: strip commit hash suffix (v1.15-solo.1-abcdef -> v1.15) const char *ver = FIRMWARE_VERSION; const char *dash = strchr(ver, '-'); int plen = dash ? (int)(dash - ver) : (int)strlen(ver); - if (plen >= (int)sizeof(_plus_ver)) plen = sizeof(_plus_ver) - 1; - memcpy(_plus_ver, ver, plen); - _plus_ver[plen] = '\0'; + if (plen >= (int)sizeof(_solo_ver)) plen = sizeof(_solo_ver) - 1; + memcpy(_solo_ver, ver, plen); + _solo_ver[plen] = '\0'; dismiss_after = millis() + BOOT_SCREEN_MILLIS; } @@ -79,15 +79,15 @@ public: display.drawTextCentered(display.width()/2, date_y, FIRMWARE_BUILD_DATE); #ifdef FIRMWARE_SOLO_BUILD - int plus_y = date_y + step; - display.fillRect(0, plus_y - 1, display.width(), lh + 2); + int solo_y = date_y + step; + display.fillRect(0, solo_y - 1, display.width(), lh + 2); display.setColor(DisplayDriver::DARK); - char plus_label[24]; - if (_plus_ver[0]) - snprintf(plus_label, sizeof(plus_label), "Plus %s for Wio", _plus_ver); + char solo_label[24]; + if (_solo_ver[0]) + snprintf(solo_label, sizeof(solo_label), "Solo %s for Wio", _solo_ver); else - snprintf(plus_label, sizeof(plus_label), "Plus for Wio"); - display.drawTextCentered(display.width()/2, plus_y, plus_label); + snprintf(solo_label, sizeof(solo_label), "Solo for Wio"); + display.drawTextCentered(display.width()/2, solo_y, solo_label); display.setColor(DisplayDriver::LIGHT); #endif