Improved language changes to content

This commit is contained in:
scottp committed 2026-10-26 12:31:41 +11:00
1 parent 83aa6ebd8f
commit 010704fc40
5 files changed
+98 -102

No files matched your search

+24 -28
View File
@@ -1,9 +1,10 @@
# Cloudloop and a RockBLOCK 9704, from the box to a message
How to get a RockBLOCK 9704 from its box to a message seen on the
internet, from a computer over its USB-C port: the account, the token,
topics, provisioning, and the order to test things in. `rb9704` is the
command line in `python/` (`python/README.md` has every verb).
A RockBLOCK 9704 comes out of the box with an activation card and no
Cloudloop account behind it. This is how to get from there to a message
seen on the internet, from a computer over the modem's USB-C port.
`rb9704` is the command line in `python/` (`python/README.md` has every
verb).
Written 2026-10-09 from Ground Control's and Cloudloop's documentation
and the library's source. `rb9704 info` and the free JSPR verbs have run
@@ -71,7 +72,8 @@ serves a project.
### 3. The API token
The API is how the tool reads messages and sends MT, and how the shore
side will. A token is asked for, not made:
side will. Ground Control issues the token; there is no page to generate
one:
1. Email <help@groundcontrol.com> for a Cloudloop **platform API token**
for the account. Ask for one that can send MT: `DoSendImtMessage` needs
@@ -139,9 +141,9 @@ rb9704 --log provision.jsonl provision
```
This asks the modem for its signal and its provisioning every 30 s and
stops when topics appear, printing them. It talks JSPR directly, because
the library only asks for provisioning when it is about to send, and
asking this way costs nothing.
stops when topics appear, printing them. It sends the JSPR requests itself,
because the library only asks for provisioning when it is about to send,
and asking this way costs nothing.
## The order to test in
@@ -155,7 +157,7 @@ money; the tool asks before each one, and `--yes` skips the question.
`rb9704 ports`. The 9704 is the FT234XD, listed first.
3. **Identity, indoors.** `rb9704 info` gives hardware and
firmware versions, serial, IMEI, ICCID, whether the SIM is present and
talking, and the board temperature. Record the IMEI and ICCID against
connected, and the board temperature. Record the IMEI and ICCID against
the Thing in Cloudloop.
4. **Signal, outdoors.** `rb9704 signal --watch 600` reads
the bars (0 to 5) every 5 s for ten minutes and ends with how often
@@ -197,30 +199,24 @@ version, SIM, operational state). In order of likelihood:
a front-panel port), or the supercapacitor is still charging.
- **Something odd.** `rb9704 jspr --setup 'GET hwInfo {}'
'GET simStatus {}'` shows the modem's own answers; a 4xx code names
the problem (`409` unauthorized, `410` SIM not configured, `418` not
the problem (`409` unauthorised, `410` SIM not configured, `418` not
provisioned).
## What has run
On 2026-10-25, a RockBLOCK 9704 (firmware v1.5.14) on the header pins of
an M5Stamp-C3 running the shell sample, under open sky, driven over WiFi
by `rb9704 send` in the Zephyr shell (`boards/stamp_c3.md`):
On 2026-10-25 a RockBLOCK 9704 (firmware v1.5.14) on the header pins of
an M5Stamp-C3, running the shell sample under open sky, was found already
provisioned with topics 244 (RAW) and 313 to 317, the Cloudloop colours,
and sent two messages on topic 244 that arrived in Cloudloop whole. The
library only asks the modem for its provisioning when it is about to
send, so the first send is when the module, and `rb9704 status`, learn
the topics. The board, its pins and the overnight run are in
`boards/stamp_c3.md`.
- **Provisioning.** Already done when first asked: topics 244 (RAW) and
313 to 317, the Cloudloop colours. The library only asks the modem
when it is about to send, so the first send is when the module, and
`rb9704 status`, learn the topics.
- **MO.** Two messages on topic 244, `Stamp-C3 says hi` (16 bytes) and
`Stamp-C3 P_EN low` (17 bytes). Each was with the network 6 to 10 s
after the modem took it, with 3 to 4 bars, and each arrived in
Cloudloop whole.
- **How Cloudloop shows a message.** The same bytes twice: the message
data in Base64 (`U3RhbXAtQzMgUF9FTiBsb3c`, the padding `=` left off)
and the payload in hex (`5374616D702D433320505F454E206C6F77`). The
CRC the library adds on the way out is checked and gone.
The modem then stayed begun overnight, about 11 h 54 min, still
provisioned and answering in the morning.
Cloudloop shows a message's bytes twice: the message data in Base64
(`U3RhbXAtQzMgUF9FTiBsb3c`, the padding `=` left off) and the payload in
hex (`5374616D702D433320505F454E206C6F77`). The CRC the library adds on
the way out is checked and gone.
Not yet: MT, a session, and this command line's own `provision` and
`send` against a real modem.
+2 -2
View File
@@ -328,7 +328,7 @@ Source: `src/jspr_command.c:269-281`, parse `src/jspr.c:934-1007`.
- The `messageProvisioning` callback (Python: `set_message_provisioning_callback`)
fires only here, after the GET (`src/rockblock_9704.c:1181-1187`).
### 2.12 PUT serviceConfig (resync), with its state dance
### 2.12 PUT serviceConfig (resync), and the state changes around it
`rbResyncServiceConfig()` (`src/rockblock_9704.c:1064-1120`):
@@ -721,7 +721,7 @@ Everything else is ignored.
solicited `200` first, then `299`s.
2. **A line with no 3-digit code in 200..500** makes the code scan run off
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.
negative length cast to `size_t` (`src/jspr.c:89-113`). The result is 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
+15 -22
View File
@@ -1,7 +1,7 @@
# Testing
One fake modem, three places to run the code against it, and a few free
checks against a real modem.
The tests run one fake modem against the code in three places, and a few
free checks against a real modem.
| Level | What runs | Against | Needs |
| --- | --- | --- | --- |
@@ -55,11 +55,11 @@ Every option has an environment variable as well: `RB9704_ZEPHYR_EXE`,
On native_sim the modem UART is a `zephyr,native-tty-uart` node
(`samples/shell/boards/native_sim.overlay`); the tests give it the fake's
pty with `-modem_uart_port=`. The same option takes a real modem's
`/dev/ttyUSB0`, which is how host Zephyr talks to real hardware.
`/dev/ttyUSB0`, which is how host Zephyr reaches real hardware.
## The rig: two boards, one wire
No USB-serial adapter to hand? Two boards with a UART wired between them
Without a USB-serial adapter, two boards with a UART wired between them
will do: one runs the sample, the other runs `tests/rig/bridge`, which
copies bytes between that UART and its own USB serial port, where the
fake answers.
@@ -84,8 +84,8 @@ toggle RTS on its USB port, or press reset, before the tests.
## Out of doors: the shell over WiFi
A real modem needs the sky, and the sky is rarely where the USB cable
reaches. `samples/shell/overlay-wifi.conf` puts the same shell on telnet,
A real modem needs a view of the sky, which is usually further than a
USB cable goes. `samples/shell/overlay-wifi.conf` puts the same shell on telnet,
on any ESP32 board, so the board needs only power:
```sh
@@ -126,8 +126,8 @@ and the WiFi commands.
The board overlays for the M5Stamp-C3, ESP32-S3-DevKitC, ESP32 DevKitC
and NUCLEO-U575ZI-Q wire all three control lines, so `rb9704 begin`
starts the modem through I_EN and waits for I_BTD to say it has booted,
and `rb9704 power off` waits for I_BTD to say it has shut down.
starts the modem through I_EN and waits for I_BTD to go high, and
`rb9704 power off` waits for I_BTD to go low.
| 9704 header | M5Stamp-C3 | ESP32-S3-DevKitC | ESP32 DevKitC | NUCLEO-U575ZI-Q |
| --- | --- | --- | --- | --- |
@@ -135,7 +135,7 @@ and `rb9704 power off` waits for I_BTD to say it has shut down.
| 13, TXD (board RX) | GPIO5 | GPIO18 | GPIO16 | PD9 |
| 3, I_EN | GPIO6 | GPIO4 | GPIO25 | PF14 (D4) |
| 7, I_BTD | GPIO7 | GPIO5 | GPIO26 | PF13 (D7) |
| 6, P̅_E̅N̅, active low, optional | GPIO10 | GPIO6 | GPIO27 | PF15 (D2) |
| 6, P_EN, active low, optional | GPIO10 | GPIO6 | GPIO27 | PF15 (D2) |
| 1, 4 or 10, GND | GND | GND | GND | GND |
The modem's supply goes to V_IN+ and V_IN- (pins 15 and 16), 4.0 to
@@ -167,18 +167,11 @@ binding 1.0.2:
| a real 9704 (firmware v1.5.14), binding and native_sim, free checks | 2 | all pass |
On 2026-10-25, the M5Stamp-C3 (ESP32-C3, RISC-V) with the shell over
WiFi, and a real 9704 on its header pins, TX and RX only, powered from
the Stamp's 5V: `begin`, `info` and `signal` all answer, nothing dropped
(`boards/stamp_c3.md`).
Later the same day, under open sky with P_EN unconnected: provisioned
with topics 244 and 313 to 317, and one message, 16 bytes on topic 244,
sent from the Stamp's shell over telnet and received in Cloudloop. The
first message through a real modem and satellite.
Then the reworked control pins outside, P_EN wired and active low: a
second message, 17 bytes on topic 244, received in Cloudloop, and the
modem left running overnight, up and answering for about 11 h 54 min with
no drop and no reboot of the Stamp.
WiFi and a real 9704 on its header pins, under open sky: `begin`, `info`
and `signal` answer, the modem was provisioned, two messages on topic
244 were received in Cloudloop, and the modem stayed up overnight with
all three control lines wired. Those were the first messages through a
real modem and a satellite. `boards/stamp_c3.md` has the pins, the runs
and the P_EN fault found on the way.
Not yet: an MT message down to the board.
+11 -10
View File
@@ -18,7 +18,7 @@ The overlay is `samples/shell/boards/stamp_c3.overlay`, with
| GPIO5, `uart1` RX | 13, TXD | |
| GPIO6 | 3, I_EN | starts and stops the modem |
| GPIO7 | 7, I_BTD | high once booted, low once shut down; waited on both ways |
| GPIO10 | 6, P̅_E̅N̅ | the supercapacitor charge enable, **active low**; optional |
| GPIO10 | 6, P_EN | the supercapacitor charge enable, **active low**; optional |
| GND | 1, 4 or 10, GND | signal ground |
| | 15, V_IN+ and 16, V_IN- | 4.0 to 5.3 V, 500 mA: see Power |
| GPIO2 | | the RGB LED, an SK6812, on the board |
@@ -32,9 +32,9 @@ GPIO18 and GPIO19 (USB).
The 9704's header UART and its USB-C port are the same serial lines. With
USB-C plugged in, the 9704's FTDI chip is powered and drives the modem's
RX, and a board on the header cannot talk over it: the modem answers
nobody, the computer on USB included. Its TX still reaches the header, so
a board can listen alongside USB, but not send.
RX, and a board on the header cannot drive the line, so the modem gets
no request from either side, the computer on USB included. Its TX still
reaches the header, so a board can receive alongside USB, but not send.
So the 9704 is powered from the header with its USB-C unplugged, on
V_IN+ (pin 15) and V_IN- (pin 16): 4.0 to 5.3 V, and the board limits
@@ -54,9 +54,10 @@ that is not there:
No edit needed: `-DEXTRA_DTC_OVERLAY_FILE=no-control-pins.overlay`
takes all three out at build time (below).
- I_EN: `rb9704 power off` and `begin` over telnet restart a modem that
has hung, with nobody walking out to it. The one most worth wiring.
- I_BTD as well: start-up and shutdown wait for the modem to say it has
followed I_EN, as Ground Control's page asks, not a fixed 4 s
has hung, with nobody walking out to it. It is the line most worth
wiring.
- I_BTD as well: start-up and shutdown wait for I_BTD to follow I_EN,
as Ground Control's page asks, not a fixed 4 s
(`boot-delay-ms`). Moving I_EN back before I_BTD has followed "may
result in damage to the 9704 module".
- P_EN adds nothing for a modem on V_IN+: left open, the board's
@@ -164,8 +165,8 @@ Nothing on the button costs airtime. The LED runs at 24 of 255
flash.
2. With the modem wired: a short press goes white, then red, yellow or
green with the signal.
3. Over telnet: `rb9704 spy on`, `rb9704 info`, `rb9704 signal`. All
free.
3. Over telnet: `rb9704 spy on`, `rb9704 info`, `rb9704 signal`. None
of the three costs airtime.
A fake modem (`rb9704-fake`) on a USB-serial adapter in the modem's place
has no I_BTD: tie GPIO7 to 3.3 V for those runs.
@@ -181,7 +182,7 @@ has no I_BTD: tie GPIO7 to 3.3 V for those runs.
| under open sky: the constellation visible and 3 to 5 bars within seconds of `begin` | works (2026-10-25) |
| staying up while active | failed with P_EN driven the wrong way: see below; with P_EN unconnected, up and answering throughout (2026-10-25) |
| provisioning, and a message sent | works (2026-10-25): provisioned with 244 and 313 to 317, and "Stamp-C3 says hi", 16 bytes on topic 244, sent in 10 s with 3 to 4 bars and received in Cloudloop |
| the reworked control pins outside: I_EN and I_BTD in Ground Control's sequence, P_EN wired and `GPIO_ACTIVE_LOW` | works (2026-10-25): "Stamp-C3 P_EN low", 17 bytes on topic 244, sent in 6 s and received in Cloudloop; left out overnight, the modem was up and answering for about 11 h 54 min with no drop and the Stamp did not reboot, where P_EN the wrong way stopped it within 5 minutes every time |
| the reworked control pins outside: I_EN and I_BTD in Ground Control's sequence, P_EN wired and `GPIO_ACTIVE_LOW` | works (2026-10-25): "Stamp-C3 P_EN low", 17 bytes on topic 244, sent in 6 s and received in Cloudloop, and the modem up overnight; see below |
| an MT message down to the board | not yet |
| the LED and button | the button's short press works; the busy colour reads orange, not white, at this brightness |