Commit Graph
3 Commits
Author SHA1 Message Date
scottp 0cda7335d6 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.
2026-10-25 22:21:17 +11:00
scottp f97fcab74b Cancel the message in flight, and the small things from the review
rb9704_cancel() and `rb9704 cancel` ask the modem to abandon the MO in
flight; the modem's final status reaches mo_done as -ECANCELED. The
library's async path has no timeout, so this is how an application
frees a modem that has gone quiet mid-send. The status snapshot carries
the in-flight message's id and start time for the application to decide
with.

rb9704_begin zeroes moQueuedMessages: rbBegin empties the queue but not
the count, and a count above zero makes every later send queue without
transmitting.

The fake modem's mo-hold and mo-release stand in for a modem that has
taken a message and said nothing more; a test drives cancel through it.

Also: the shell's send buffer is a shell line, not a fourth message
buffer; the bridge's TX-disable race has a comment; the CLI turns a
Cloudloop error (a bad token's 200 reply included), an unopenable port
and a one-word jspr line into one line and exit 1; conftest reads
request.node; pyproject uses the current license spelling.
2026-10-21 22:43:05 +11:00
scottp beb22fb70c Docs: the README, JSPR, Cloudloop, testing
README says what the module adds to Ground Control's library and what it
works around, and how to use it. JSPR.md is the protocol as the library
speaks it, from its source, with its surprises. CLOUDLOOP.md is account
to first message, from WII6's IRIDIUM.md. TESTING.md is the levels, the
rig, and what has passed: Python, native_sim, an ESP32-S3 and an STM32U5
against the fake, and free checks against a real 9704.
2026-10-09 12:48:16 +11:00