The 9704's USB-C goes through an FTDI chip to the modem's UART, on the
same lines as the header. With the cable plugged in, that chip drives
the modem's RX: a board on the header hears the modem but cannot reach
it, and the computer on USB gets no answer either. Unplug the USB-C and
power the 9704 from the header. The README says so beside the overlay
example, and docs/CLOUDLOOP.md lists it under "When begin fails".
The M5Stamp-C3 is the first microcontroller to run against a real 9704:
TX and RX only, the modem powered from the Stamp's 5 V pin. begin, info
and signal all answer, with nothing dropped. docs/boards/stamp_c3.md
has the power section and what has run.
no-control-pins.overlay takes P_EN, I_EN and I_BTD out of any board's
overlay at build time, for a modem on four wires. The modem node is
labelled rb9704 in every overlay so it can.
The module, the sample and the Python tools are 0.2.0.
overlay-wifi.conf puts the shell on telnet on any ESP32. At boot it joins
the network stored in flash with `wifi cred add`, and rejoins it after a
drop, for a board out under the sky with no USB.
The M5Stamp-C3 (ESP32-C3, RISC-V) has an overlay: the modem on uart1,
GPIO4 and GPIO5, with P_EN, I_EN and I_BTD on GPIO10, 6 and 7. Its RGB
LED, driven by spi2 on GPIO2, shows the modem's state, and its button
begins, asks for the signal and ends. docs/boards/stamp_c3.md has the
pins, the WiFi commands and the LED's colours. So far it has run WiFi
and telnet, not yet the modem.
The ESP32-S3-DevKitC, ESP32 DevKitC and NUCLEO-U575ZI-Q overlays now
wire the three control lines as well; the table is in docs/TESTING.md.
The README gives the Gitea home and the GitHub mirror, and the boards
as a table of CPU and what each has run.
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.
CONFIG_RB9704_POWER's default read a DT_COMPAT_ variable nothing defined,
so it was never y on its own and the pins went undriven; define it.
A request that ended in -ETIMEDOUT of its own accord, a begin whose
modem never signalled booted, looked to the caller like one it had
abandoned, so neither side gave the slot back and every later call got
-EAGAIN. submit() now reports abandonment apart from the result.
On that boot timeout the supply and enable pins are dropped again, so the
next attempt starts from off. The CLI's messages named paths from the
tree it was carried over from.
Checked on native_sim: the suite against the fake, and begin twice with
the pins on the GPIO emulator, where the second begin now times out
instead of returning EAGAIN.
The README says who wrote it and the two projects it was built for, WII6
and OGLAS, with their sites; credits Ground Control for the modem and
the library that does the protocol work; and gives the licence with
contact details, where to report issues and what helps in a report, and
that it is not a Ground Control product. The licence, every source file
and the Python package's metadata carry the copyright and email; the
package lists its homepage, repository, issues and changelog.
The two boards OGLAST2's satellite bench was built for: the T3-S3 with
the modem on uart0 (GPIO43 and 44), the original ESP32 DevKitC on uart2
(GPIO17 and 16). Both build; neither has run here.
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.
rb9704 drives a 9704 on USB and the Cloudloop account behind it, moved
from WII6's host/rockblock with its project names taken out. rb9704-fake
speaks JSPR on a pty or a serial port: everything the library asks, MO in
segments with the CRC checked, MT, signal, provisioning, refusals and
failures on command.
The tests run against the fake at every level: the fake itself, the
command line, Ground Control's Python binding, the shell sample on
native_sim, and the sample on a board (test_zephyr.py, one suite through
two consoles). test_real.py makes free checks against a real modem.
samples/shell is `rb9704` on the shell with callbacks that print what
arrives, a CRC-32 and the start of each message from the network. Board
overlays for native_sim (the modem a host serial port, a pty or a real
9704 on USB), NUCLEO-U575ZI-Q, XIAO ESP32S3 and ESP32-S3-DevKitC.
tests/rig/bridge copies bytes between a board's USB serial port and a
UART, so two boards wired together stand in for a USB-serial adapter: one
runs the sample, the other bridges its modem UART to the host, where the
fake modem answers. Overlays for a Nucleo and a XIAO, either way round.
Ground Control's RockBLOCK 9704 library is pinned untouched in west.yml
and compiled here for any board with a UART: a serial port on the bus of
the rock7,rockblock-9704 devicetree node, the library's timing calls on
the kernel, and one worker thread that owns every call into it, since the
library has no locking and shares static buffers.
The worker sleeps until a request or a byte from the modem arrives.
Requests (begin, end, power, send, info, signal) wait as long as the
caller says; a send with K_NO_WAIT queues and reports through mo_done.
Callbacks for a sent message, a received one, the signal and the
provisioning; a status snapshot that never touches the modem.
The library asks for provisioning once and keeps a miss for good; the
worker clears its cache before a send whose topic is missing and after
the modem refuses one, so a modem provisioned later is seen.
The serial port and worker began in the OGLAS satellite bench and were
carried through WII6's lib/wii6-sat.