From b5fc1f893073d79bbe6cd10c10614f35eb8eaeb9 Mon Sep 17 00:00:00 2001 From: Jean-Pierre Martineau Date: Wed, 14 Oct 2026 02:59:46 -0400 Subject: [PATCH] The docs name both Cardputer Zero models and warn against hot-swapping a Cap MeshTerm runs the same on the Cardputer Zero (C154) and the Cardputer Zero Lite (C155): the Lite only leaves out a camera, motion sensors, and the microSD card, none of which MeshTerm uses. The device manual, the README, the manuals index, and the About page now say that both models are supported, and the manual says that the Lite needs a card with M5Stack's system first. M5Stack does not support hot-swapping a Cap on the Cardputer Zero, the Cap LoRa-1262 included, and says that it may cause the device to malfunction. The manual now puts that caution before its steps for the Cap, with M5Stack's other caution (the antenna goes on before the power), and the steps turn the handheld off first. It also says that MeshTerm switching the header off when it quits does not make a Cap safe to remove. The About page says the same in its own voice, and gains a section on the Cardputer Zero next to the uConsole and the PicoCalc. The README shows the Cardputer Zero's start screen (the store's capture, three times its size) under the PicoCalc photo, and its quick start shows the emulator command. The pip commands with the spi extra install from GitHub, because mesh-term is not on PyPI yet. The platform comment and CLAUDE.md no longer say that the hardware is not in hand: only a flag selects the platform because the device-tree model is the CM0's generic string. Co-Authored-By: Claude Opus 5.5 (1M context) --- CLAUDE.md | 9 ++++++--- README.md | 10 +++++++++- docs/README.md | 2 +- docs/devices/README.md | 2 +- docs/devices/cardputer-zero.md | 29 +++++++++++++++++++++++----- docs/devices/uconsole.md | 4 ++-- docs/screenshots/cardputer-zero.png | Bin 0 -> 6070 bytes meshterm/assets/pages/about.md | 10 +++++++++- meshterm/platforms.py | 12 ++++++++---- 9 files changed, 60 insertions(+), 18 deletions(-) create mode 100644 docs/screenshots/cardputer-zero.png diff --git a/CLAUDE.md b/CLAUDE.md index e04c792..1d6ad14 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -743,9 +743,12 @@ derived sweep that runs **every** registered command twice, once plain and once One codebase, three flavours: **regular** (desktop/ssh, 72 cols, truecolor, emoji), **picocalc-lyra** (the PicoCalc's 53×26/53×40 framebuffer console, 16 palette slots, a -512-glyph font, no emoji), and **cardputer-zero** (M5Stack's Cardputer Zero, 53×14 in 6×12 -cells on a 320×170 panel MeshTerm paints itself, truecolor, no emoji — hardware not -yet in hand, so it is chosen by flag only). +512-glyph font, no emoji), and **cardputer-zero** (M5Stack's Cardputer Zero, both the +standard model and the Lite, 53×14 in 6×12 cells on a 320×170 panel MeshTerm paints +itself, truecolor, no emoji — chosen by flag only: its device-tree model is the CM0's +generic string, so MeshTerm's own console passes the flag). Never hot-swap a Cap on it, +the LoRa one included: M5Stack says it may make the device malfunction, so the docs say +to power off first. A frozen `Platform` spec (`meshterm/platforms.py`) resolves once at boot; consumers bind at platform-switch time via `platforms.on_platform` — never branch on the platform per frame, and never `from meshterm.platforms import PLATFORM`. diff --git a/README.md b/README.md index 6752509..eb60995 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,10 @@ https://github.com/user-attachments/assets/f91a6695-14d5-4ae0-8fdc-e65492d0955d

MeshTerm on the PicoCalc, a console that is 53 columns wide, with a radio installed inside it

-

The dashboard, the map, a trace, the paths of a message, and the whole app on a PicoCalc.

+

+ MeshTerm on the display of a Cardputer Zero: the wordmark, then the list of devices, with the Cap LoRa-1262 at the top +

+

The dashboard, the map, a trace, the paths of a message, the whole app on a PicoCalc, and the start screen on a Cardputer Zero.

--- @@ -198,6 +201,7 @@ mesh. You can look at the app before you buy anything. ### On the Cardputer Zero Install MeshTerm from M5Stack's app store on the handheld. Its share code is `MTRM`. +MeshTerm works on both models, the Cardputer Zero and the Cardputer Zero Lite. [MeshTerm on the Cardputer Zero](docs/devices/cardputer-zero.md) has the details. ### Coming @@ -248,6 +252,10 @@ meshterm --mock # custom console font, and an F-key hint lane. Preview it anywhere, or inspect it: meshterm --mock --platform picocalc-lyra meshterm specimen + +# On a Cardputer Zero, MeshTerm draws its 53×14 display itself. See that display in a +# window of its own (download its font once with `meshterm emulate --fetch-fonts`): +meshterm emulate cardputer-zero --mock ``` MeshTerm has its own manuals for handhelds. **[MeshTerm on the diff --git a/docs/README.md b/docs/README.md index f8fb768..7064c4d 100644 --- a/docs/README.md +++ b/docs/README.md @@ -37,7 +37,7 @@ MeshCore companion on USB, Bluetooth, or Wi-Fi does not need them. | **[MeshTerm on hardware](devices/README.md)** | Start here. It says which of the manuals below is the correct one for you, and what the scripts on the device do. | | [MeshTerm on the PicoCalc](devices/picocalc-lyra.md) | How to change a stock ClockworkPi PicoCalc into a Linux handheld that has a LoRa radio soldered inside: the shopping list, the change to a Luckfox Lyra core, Calculinux, and the radio. | | [MeshTerm on the uConsole](devices/uconsole.md) | A uConsole (CM4 or CM5) with the hackergadgets AIO LoRa board. Its SX1262 is on the computer's own SPI bus. MeshTerm can control it directly with `--spi`. Or a small bridge can make it a companion for a node that is always on. | -| [MeshTerm on the Cardputer Zero](devices/cardputer-zero.md) | M5Stack's Linux Cardputer: how to install MeshTerm from the app store, use the Cap LoRa-1262 radio, and try the layout in the desktop emulator. | +| [MeshTerm on the Cardputer Zero](devices/cardputer-zero.md) | M5Stack's Linux Cardputer, the standard model or the Lite: how to install MeshTerm from the app store, use the Cap LoRa-1262 radio, and try the layout in the desktop emulator. | ## Reading the code diff --git a/docs/devices/README.md b/docs/devices/README.md index aedbea8..a3ba764 100644 --- a/docs/devices/README.md +++ b/docs/devices/README.md @@ -15,7 +15,7 @@ has its own manual with numbered steps. This page tells you which manual is your | a ClockworkPi **PicoCalc**, stock or already running Calculinux on a Luckfox Lyra, and I want MeshTerm on its own display | **[MeshTerm on the PicoCalc](picocalc-lyra.md)**: from the shopping list to a working machine | | …and I want a **radio** inside it | the same manual, [Phase 3](picocalc-lyra.md#phase-3-add-the-radio): a XIAO nRF52840 + Wio-SX1262 soldered to the UART of the Lyra | | a ClockworkPi **uConsole** with the hackergadgets AIO board (an SX1262 on the SPI bus of the host) | **[MeshTerm on the uConsole](uconsole.md)**: MeshTerm drives the radio directly with `--spi`. A bridge service can also present the radio as a companion, if you want it always on | -| an M5Stack **Cardputer Zero**, the one with a Raspberry Pi inside (not the ESP32 Cardputer or the Cardputer-Adv) | **[MeshTerm on the Cardputer Zero](cardputer-zero.md)**: install MeshTerm from M5Stack's app store. MeshTerm drives the Cap LoRa-1262 directly, or it uses a companion | +| an M5Stack **Cardputer Zero** or **Cardputer Zero Lite**, the models with a Raspberry Pi inside (not the ESP32 Cardputer or the Cardputer-Adv) | **[MeshTerm on the Cardputer Zero](cardputer-zero.md)**: install MeshTerm from M5Stack's app store. MeshTerm drives the Cap LoRa-1262 directly, or it uses a companion | | a MeshCore companion on USB, Bluetooth, or Wi-Fi | nothing here. Read the [README](../../README.md). If the companion does not connect, read [When a companion does not connect](../guide/connecting.md) | The handhelds have nothing in common except MeshTerm. Each manual runs scripts on the diff --git a/docs/devices/cardputer-zero.md b/docs/devices/cardputer-zero.md index d69dc4b..f32c7a7 100644 --- a/docs/devices/cardputer-zero.md +++ b/docs/devices/cardputer-zero.md @@ -7,7 +7,8 @@ this page applies to them. MeshTerm is an app in M5Stack's app store for the Cardputer Zero. It starts from the launcher of the handheld and draws on its display. It can drive M5Stack's Cap LoRa-1262 -radio directly, or it can use a MeshCore companion. +radio directly, or it can use a MeshCore companion. MeshTerm supports both models of the +handheld: the Cardputer Zero and the Cardputer Zero Lite. - [The device](#the-device) - [What works](#what-works) @@ -21,11 +22,18 @@ radio directly, or it can use a MeshCore companion. | | | | --- | --- | +| Models | Cardputer Zero (C154) and Cardputer Zero Lite (C155). MeshTerm supports both | | Computer | Raspberry Pi Compute Module 0: four 1 GHz cores, 512 MB of memory | | Screen | 1.9 inches, 320×170 pixels | | Keyboard | 46 keys, with Shift, Fn and Sym layers | | System | Raspberry Pi OS "Trixie", with M5Stack's own app launcher | +The two models have the same computer, display, keyboard, battery, and expansion header. +The Cardputer Zero also has a camera, motion sensors, and a 32 GB microSD card. MeshTerm +uses none of these three parts, thus it works in the same way on both models. The Lite +comes without a microSD card. It needs a card with M5Stack's system on it before it can +start (refer to [M5Stack's documentation](https://docs.m5stack.com/en/CardputerZero)). + MeshTerm draws the display in 53 columns by 14 rows. The width is the same as on the PicoCalc, but the height is approximately half. Thus many screens have a more compact layout here. @@ -177,8 +185,18 @@ The Cardputer Zero has no LoRa radio built in. You can add one in three ways: ### The Cap LoRa-1262 -1. Push the Cap onto the expansion header at the back. -2. Start MeshTerm. +**CAUTION:** Turn off the Cardputer Zero before you install or remove a Cap, also the Cap +LoRa-1262. M5Stack does not support hot swapping of a Cap on the Cardputer Zero. In +M5Stack's words, "hot-swapping may cause the device to malfunction" (refer to +[M5Stack's documentation](https://docs.m5stack.com/en/CardputerZero)). + +**CAUTION:** Install the antenna on the Cap before you turn on the Cardputer Zero. M5Stack +says that power without the antenna can permanently damage the radio. + +1. Turn off the Cardputer Zero. +2. Install the antenna on the Cap. +3. Push the Cap onto the expansion header at the back. +4. Turn on the Cardputer Zero, and start MeshTerm. The device screen lists the Cap as **Cap LoRa-1262**. `meshterm --spi` also reaches it from the command line. @@ -189,7 +207,7 @@ radio library. The package from the store has it. If you install MeshTerm with p install the library next to it: ```bash -pip install 'mesh-term[spi]' +pip install 'mesh-term[spi] @ git+https://github.com/jpmartineau/MeshTerm' ``` When MeshTerm connects, it does three things that the Cardputer Zero needs before the @@ -202,7 +220,8 @@ radio answers: - It switches on the antenna path of the Cap. When MeshTerm quits, it switches the power of the header off. Thus the Cap does not drain -the battery while nothing uses it. +the battery while nothing uses it. But this does not make it safe to remove the Cap. Turn +off the Cardputer Zero first. A new node starts with the US/Canada settings of MeshCore (910.525 MHz). In other regions, change the settings on **Device config** before you send anything. MeshTerm keeps the key, diff --git a/docs/devices/uconsole.md b/docs/devices/uconsole.md index 39756cb..736903e 100644 --- a/docs/devices/uconsole.md +++ b/docs/devices/uconsole.md @@ -138,7 +138,7 @@ the route that agrees with how you installed MeshTerm. (refer to [Step 3](#step-3-install-meshterm)): ```bash - pip install 'mesh-term[spi]' + pip install 'mesh-term[spi] @ git+https://github.com/jpmartineau/MeshTerm' ``` - **Do you run the one-file Linux ARM64 build?** It is a single frozen binary, and it @@ -181,7 +181,7 @@ pipx inject mesh-term 'openhop-core[hardware]' Or use `pip`, which adds the radio library as its own extra in one line: ```bash -pip install 'mesh-term[spi]' +pip install 'mesh-term[spi] @ git+https://github.com/jpmartineau/MeshTerm' ``` --- diff --git a/docs/screenshots/cardputer-zero.png b/docs/screenshots/cardputer-zero.png new file mode 100644 index 0000000000000000000000000000000000000000..42b99b47d101b11ce72f8bd4b611e5d91a44fd78 GIT binary patch literal 6070 zcmb_gc{r5q+kT{MQK>BNkR>S*QWCONCR&iPkDaj&+0u(FWr@c6GPDpzCB`~otfNq5 zUV|)Uou4$s*tg0y-!oH&-nZXze8+cu^T%_{@jUl)-`9Oz=XqY|b4Oj()#BoSZ~y?n zbx~XM8UQfA0sy9Uwr${@e%Op60PqD~)I4kOXYb@dCU!vEpLK@XQz>GTdB-oblqB-< z*i0n?Yk2;e4KkW5CMM!p@|CW?JbR8K97wN-0-T&&mp`(X7bG@h=Ovis8{rmKGKT{S zW1s5fFBuP{o3Vq7(0^yDR?}OBE7g1XpfIJvlY8om(L-$9esU_7oMM-iUi$^kp1B1M z*3Mu8G`4X8z+NW+h}U2SLbgKy;85E+aFT!A0sxUaEC9e>vIqDvN@4bRTd^9xI*4K{ zOtN}g!=j}sE4QCZE3yfh$$$T?Xe)tD9so4iSpmSlZ*Od4N?e*SWi4{KVWw(cnMY1g z3KF{~fvE5#%1pu_xHCcNKK9}Fm6!uN;TZrz`7&6|+A0OmvF z5?G^uCuK`^{t*el{xeGJ%e&8MM5U`m-ih=aWXVuPM)1ohBaLOvKl9U52M&whAubpv zD;#deCyXp}@vC_r>+#t+=eb<9x#qBlTTnuadwe6saCe6K{(AgW(n?U!1?SDk{vFhz zwx7kI{rOQJM#jKg{Jy-qro2{sYApLE7rl;t%$;C^O<|1W)dJTS7KXmR990#x>EJc> zscDWJ`UBlQSAfW&s*S&BZxepJ!LN=G-Zdrf(jut@kNfgU64v=DWo@ugc z?e%7z?JsENl5XZ6&(f@y6#UH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