The modem's UART heard from boot, and the Stamp-C3 under the sky

The module turned the modem UART's receive interrupt off whenever the
library was closed. With the power pins wired, the modem sends about
500 bytes of boot lines as it comes up, to nobody; on the M5Stamp-C3
they overflowed the UART's 128-byte FIFO, after which begin heard only
repeated fragments of old lines and failed with -EIO, and a second
begin crashed the board in the library's line parser (docs/JSPR.md,
section 8, item 2). The interrupt is now on from boot: bytes heard while
the library is closed are thrown away, and when it opens part-way
through a line the rest of that line is too. On the Stamp, 8 of 8 power
cycles and 12 of 12 with 0 to 5 s between power on and begin, where 1 of
6 and none had worked.

The fake modem's raw and before commands write any bytes, now or just
ahead of its next reply, and test_a_boot_burst_while_closed sends a
680-byte boot burst before begin: that overflow on a board through the
rig, a check that it does no harm on native_sim.

docs/boards/stamp_c3.md records the first run under open sky: the
constellation visible and 3 to 5 bars within seconds of begin. It also
records what is open: on the Stamp's 5V the modem stopped answering 2 to
5 minutes after each begin, four times, indoors and out, most likely
its supply; not yet measured, and the tests that would settle it are
listed there. Not yet provisioned, and no message sent.
This commit is contained in:
scottp committed 2026-10-25 22:21:17 +11:00
1 parent 4f5834a467
commit 0cda7335d6
9 files changed
+169 -10

No files matched your search

+4
View File
@@ -723,6 +723,10 @@ Everything else is ignored.
the end of the line through the zeroed buffer, then `memmove` with a
negative length cast to `size_t` (`src/jspr.c:89-113`). Expect a crash.
Never send banners, prompts or blank-ish lines of 9 bytes or more.
On an M5Stamp-C3 it did crash (2026-10-25), when the UART's FIFO had
overflowed and handed over fragments of old lines. rockblock9704-zephyr
now keeps the FIFO empty from boot and gives the library no line it
opened in the middle of (`src/rb9704_serial.c`).
3. **`resultCodeIndexStart` is not reset** after a line is discarded for the
wrong target (`src/jspr.c:48,133-136`): if that line had leading junk,
the next line is read from the same offset. Do not send leading junk.
+24 -2
View File
@@ -172,5 +172,27 @@ has no I_BTD: tie GPIO7 to 3.3 V for those runs.
| WiFi, the stored network, telnet | works (2026-10-24) |
| a real 9704 on TX and RX, powered from the Stamp's 5V: `begin`, `info`, `signal` | works (2026-10-25) |
| the same with the 9704's USB-C plugged in | fails: the FTDI holds the modem's RX |
| the LED and button | built, not yet run |
| P_EN, I_EN, I_BTD | not yet wired |
| P_EN, I_EN, I_BTD: `begin` powers it up in about 2 s, `power off`, `begin` again | works (2026-10-25), 8 of 8 cycles, and 12 of 12 with up to 5 s between `power on` and `begin` |
| under open sky: the constellation visible and 3 to 5 bars within seconds of `begin` | works (2026-10-25) |
| staying up while active, on the Stamp's 5V | fails: see below |
| provisioning, and a message sent | not yet |
| the LED and button | the button's short press works; the busy colour reads orange, not white, at this brightness |
### Open: the modem stops answering after a few minutes
On 2026-10-25, powered from the Stamp's 5V, the modem stopped answering
2 to 5 minutes after each `begin`, four times: once indoors, three times
under open sky. Every request then gets `-EIO`, its signal reports stop,
and it stays silent until the control lines are cycled; left alone with
P_EN and I_EN high it was still silent after 9 minutes. Indoors the RDY
LED went off when it happened.
The likely cause is the supply: the 9704's input going below the 4.0 V
it needs while it charges, after the Stamp's USB-C, its 5V pin and the
leads. That is not yet measured. What would settle it: the voltage at
the 9704's supply pin over those minutes; the 9704 on a 5 V supply of
its own, GND joined to the Stamp's; and the 9704 on its own USB-C from a
laptop for 30 minutes, which has not been tried for longer than a few
seconds either. Whether the modem goes quiet on its serial port while it
provisions is also not known, and a test that power-cycles it on
silence would cut that short.