MeshTerm drives the older Cap LoRa868 as well as the Cap LoRa-1262

A user on a Cardputer Zero could not connect his Cap. MeshTerm stopped
at "nothing answers at 0x43 on /dev/i2c-1". His Cap is the Cap LoRa868,
which M5Stack made before the Cap LoRa-1262. The two boards carry the
same SX1262 on the same pins of the same header, and the same GNSS at
the same speed. The newer board adds an antenna switch, and the chip at
0x43 that turns the switch on. The older board has no switch, so it has
no such chip. MeshTerm asked for one on every Cardputer Zero.

A wiring now says whether its expander is required. pi4io_required is
true by default, so every other board keeps the rule that an expander
which does not answer is an absent board. The Cap sets it to false.

An absent expander is then the other revision of the board, and the
node must prove that before it accepts it. After the radio starts, the
node reads the version register of the chip and requires the name of an
SX126x. A bus with nothing on it reads as all ones or all zeros, and
the library can start on such a bus, so a Cap that is absent or badly
seated still reports that no radio answered.

The read of the expander also tells its failures apart now. Only the
errors that mean "nobody is at this address" count as absent. A bus
error or a refused read is a failure of its own, and never becomes the
older board quietly.

The two boards come from M5Stack's own pages, and from two other
Cardputer Zero applications that drive both. The pins, the TCXO, and
DIO2 are the same everywhere, and they agree with the wiring MeshTerm
already had.

One thing is open. The device screen names the row "Cap LoRa-1262"
before anything is connected, because nothing can know which Cap is
attached until the node runs.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Jean-Pierre MartineauandClaude Opus 5 committed 2026-11-23 00:01:19 -05:00
1 parent bf79f9975c
commit 338b5678de
6 files changed
+258 -13

No files matched your search

+40
View File
@@ -180,6 +180,7 @@ The Cardputer Zero has no LoRa radio built in. You can add one in three ways:
| Radio | Status |
| --- | --- |
| **Cap LoRa-1262** add-on board from M5Stack | Works, with no setup. MeshTerm runs the mesh node itself while it is open, as it does on a uConsole. |
| **Cap LoRa868**, the earlier add-on board | Works, with no setup. It is the same radio with no antenna switch (refer to [The older Cap LoRa868](#the-older-cap-lora868)). |
| A MeshCore companion on USB | Expected to work as on any Linux computer. |
| A MeshCore companion over Bluetooth | Expected to work as on any Linux computer. |
@@ -227,6 +228,45 @@ A new node starts with the US/Canada settings of MeshCore (910.525 MHz). In othe
change the settings on **Device config** before you send anything. MeshTerm keeps the key,
the contacts, and the channels of the node in `~/.meshterm/radio/spidev0.1/`.
#### The older Cap LoRa868
M5Stack made an earlier LoRa Cap, the **Cap LoRa868**. MeshTerm works with it as well,
and you do nothing to make it work.
The two Caps are almost the same board. Each one has an SX1262 radio and a GNSS
receiver, on the same pins of the same 14-pin header. The newer Cap LoRa-1262 adds an
antenna switch, and a small chip at I2C address `0x43` that turns that switch on. The
older Cap has no antenna switch, so it has no such chip.
MeshTerm finds out which Cap you have each time it connects:
1. It powers the header.
2. It looks for the switch chip at `0x43`, for one second.
3. If the chip answers, the Cap is a Cap LoRa-1262, and MeshTerm turns the antenna
switch on.
4. If nothing answers, MeshTerm starts the radio and asks the radio what it is. An
SX1262 that gives its name is the older Cap, and MeshTerm continues.
Step 4 is the reason why a Cap that is absent, or that is not pushed fully onto the
header, is still reported as absent. Only a radio that answers for itself is accepted.
#### If MeshTerm says that it cannot find the radio
Two messages are possible, and they mean different things.
**"Nothing answers at 0x43 on /dev/i2c-1"** comes from a profile of your own that
requires the switch chip. MeshTerm's own wiring for the Cap does not require it. Set
`pi4io_required = false` in your profile, or remove the `pi4io_bus` line from it (refer
to [Board wiring](uconsole.md#board-wiring)).
**"No SX126x answered on the SPI bus"** means that no radio answered. Turn the Cardputer
Zero off, push the Cap fully onto the header at the back, and check that no row of pins
is left over at either end. Then turn it on again. Never add or remove a Cap while the
device is on.
The node writes what it did to `~/.meshterm/radio/spidev0.1/node.log`. That file names
the wiring it used and the answer it got from the bus. Send it with a problem report.
#### The Cap's GPS
The Cap also has a GPS. MeshTerm can use it to keep the position of your node current. The
+1
View File
@@ -318,6 +318,7 @@ en_pins = [27] # the AIO v2 needs this
| `en_pins` | `[]` | The power-enable lines that go high before MeshTerm touches the chip. The **AIO v2 needs `[27]`.** |
| `leds` | `[]` | Switches that the device tree of the board shows as LEDs (under `/sys/class/leds/`). Write each one as `"name=brightness"`. MeshTerm sets them before it touches the chip. It puts them back as they were when it releases the radio. The Cardputer Zero powers its expansion header in this way. Its Cap needs no profile, but this is what you would write: `["ext_5v_out=1", "ext_usb_gpio_fun=0"]`. |
| `pi4io_bus`, `pi4io_address`, `pi4io_high` | `-1`, `0x43`, `[]` | A PI4IOE5V6408 I/O expander that switches the antenna path of the radio. These are its I2C bus (`-1` for none), its address, and the pins that go high. |
| `pi4io_required` | `true` | Whether the radio works only with that expander. `false` says that the board has two revisions, one with the expander and one without it. An expander that does not answer is then the revision without it, and MeshTerm continues after the radio itself answers. The Cap of the Cardputer Zero is set this way. |
| `use_dio2_rf`, `use_dio3_tcxo` | `true`, `true` | If DIO2 drives the RF switch, and if DIO3 drives a TCXO (both are on for the AIO). |
| `is_waveshare` | `false` | The wiring quirks of the Waveshare HAT, which the radio library knows. |
| `python` | `""` (empty) | An interpreter to run the node under. Use it when the interpreter that MeshTerm finds is not the one that you want. If it is empty, MeshTerm looks for one. |