0.3.0: provisioning and messages to Cloudloop work, and P_EN is active low
The M5Stamp-C3 under open sky, driven over WiFi from its shell, found the modem provisioned with topics 244 and 313 to 317 and sent two messages on topic 244, 16 and 17 bytes. Each was with the network 6 to 10 s after the modem took it, and both arrived in Cloudloop whole. docs/CLOUDLOOP.md, "What has run", records how Cloudloop shows one: the same bytes in Base64 and in hex. P_EN is the RockBLOCK's supercapacitor charge enable, header pin 6, and it is active low. The sample's overlays had it GPIO_ACTIVE_HIGH, so every begin switched the charger off: the modem ran down and went silent 2 to 5 minutes later, four times indoors and out. The overlays, the README and the binding now say GPIO_ACTIVE_LOW. With P_EN wired again on the new firmware the modem stayed up past every earlier drop and sent the second message. The control pins follow Ground Control's start-up and shutdown sequence. I_EN starts and stops the modem and is what makes the pins present (CONFIG_RB9704_POWER follows iridium-enable-gpios); P_EN and I_BTD are optional beside it. Shutdown drives I_EN low and waits for I_BTD to go low before anything else, as start-up waits for it to go high, so I_EN never moves back before I_BTD has followed. P_EN is driven only while the modem runs and released to an input while it is off. docs/boards/stamp_c3.md has the header's pin numbers, V_IN+ against V_BATT, and P_EN as the cause of the drops. The module, the sample and the Python tools are 0.3.0.
This commit is contained in:
1 parent
0cda7335d6
commit
a70e933b71
17 files changed
+265
-140
No files matched your search
+26
-2
@@ -7,8 +7,10 @@ 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
|
||||
against a real 9704 since; the account, provisioning and airtime steps
|
||||
have not been tried yet.
|
||||
against a real 9704 since. Provisioning and MO messages to Cloudloop work
|
||||
(2026-10-25), from the Zephyr module on an M5Stamp-C3 rather than from
|
||||
this command line; "What has run" at the end says how. MT has not been
|
||||
tried yet.
|
||||
|
||||
## What there is
|
||||
|
||||
@@ -197,3 +199,25 @@ version, SIM, operational state). In order of likelihood:
|
||||
'GET simStatus {}'` shows the modem's own answers; a 4xx code names
|
||||
the problem (`409` unauthorized, `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`):
|
||||
|
||||
- **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.
|
||||
|
||||
Not yet: MT, a session, and this command line's own `provision` and
|
||||
`send` against a real modem.
|
||||
+29
-17
@@ -126,23 +126,28 @@ 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`
|
||||
powers the modem up in order and waits for it to say it has booted.
|
||||
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.
|
||||
|
||||
| 9704 | M5Stamp-C3 | ESP32-S3-DevKitC | ESP32 DevKitC | NUCLEO-U575ZI-Q |
|
||||
| 9704 header | M5Stamp-C3 | ESP32-S3-DevKitC | ESP32 DevKitC | NUCLEO-U575ZI-Q |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| RX (board TX) | GPIO4 | GPIO17 | GPIO17 | PD8 |
|
||||
| TX (board RX) | GPIO5 | GPIO18 | GPIO16 | PD9 |
|
||||
| P_EN | GPIO10 | GPIO6 | GPIO27 | PF15 (D2) |
|
||||
| I_EN | GPIO6 | GPIO4 | GPIO25 | PF14 (D4) |
|
||||
| I_BTD | GPIO7 | GPIO5 | GPIO26 | PF13 (D7) |
|
||||
| GND | GND | GND | GND | GND |
|
||||
| 14, RXD (board TX) | GPIO4 | GPIO17 | GPIO17 | PD8 |
|
||||
| 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) |
|
||||
| 1, 4 or 10, GND | GND | GND | GND | GND |
|
||||
|
||||
The modem's supply is its own, at the voltage and peak current Ground
|
||||
Control's manual gives, not the board's 3.3 V regulator. With `booted-gpios` in the overlay,
|
||||
`rb9704 begin` waits up to 30 s for I_BTD. A fake modem on a USB-serial
|
||||
adapter in place of the 9704 has no I_BTD, so tie the board's I_BTD pin
|
||||
to 3.3 V for those runs, or build with the rig overlays, which have no
|
||||
control lines.
|
||||
The modem's supply goes to V_IN+ and V_IN- (pins 15 and 16), 4.0 to
|
||||
5.3 V at up to 500 mA, not the board's 3.3 V regulator; V_BATT (pin 12)
|
||||
is for a lithium cell, never 5 V. P_EN is the supercapacitor charge
|
||||
enable and is active low: driven high it switches the charger off, and
|
||||
the modem runs down within minutes. Leaving it unconnected is fine.
|
||||
|
||||
A fake modem on a USB-serial adapter in place of the 9704 has no I_BTD:
|
||||
build with `no-control-pins.overlay`, below, or with the rig overlays,
|
||||
which have no control lines. Tying I_BTD to 3.3 V gets `begin` going, but
|
||||
`power off` then waits 30 s for it to fall and fails.
|
||||
|
||||
For a modem on TX and RX alone, `samples/shell/no-control-pins.overlay`
|
||||
takes the three lines out of any board's overlay at build time:
|
||||
@@ -166,6 +171,13 @@ 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`).
|
||||
|
||||
Not yet: a message through a real modem and satellite, which costs
|
||||
airtime and needs the sky (`CLOUDLOOP.md`, "The order to test in"), and
|
||||
the power pins on a board that has them wired.
|
||||
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: up
|
||||
over 6 minutes, past every earlier drop, and a second message, 17 bytes
|
||||
on topic 244, received in Cloudloop.
|
||||
|
||||
Not yet: an MT message down to the board.
|
||||
+57
-47
@@ -12,23 +12,23 @@ The overlay is `samples/shell/boards/stamp_c3.overlay`, with
|
||||
|
||||
## Pins
|
||||
|
||||
| Stamp-C3 | Signal | Notes |
|
||||
| Stamp-C3 | 9704 header | Notes |
|
||||
| --- | --- | --- |
|
||||
| GPIO4 | `uart1` TX → 9704 RX | 230400 8N1 |
|
||||
| GPIO5 | `uart1` RX ← 9704 TX | |
|
||||
| GPIO10 | P_EN | the supply; without it the module drives none of the three |
|
||||
| GPIO6 | I_EN | the modem enable, 10 ms after P_EN |
|
||||
| GPIO7 | I_BTD | `rb9704 begin` waits up to 30 s for it to go high |
|
||||
| GND | GND | |
|
||||
| 5V | the 9704's supply in | the Stamp's USB-C supply, passed through |
|
||||
| GPIO2 | the RGB LED, an SK6812 | on the board |
|
||||
| GPIO4, `uart1` TX | 14, RXD | 230400 8N1 |
|
||||
| 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 |
|
||||
| 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 |
|
||||
| GPIO3 | the button | on the board |
|
||||
| GPIO20, GPIO21 | `uart0`, the console | through the USB-C bridge |
|
||||
|
||||
Kept clear: GPIO8 and GPIO9 (strapping pins, and the board's I2C) and
|
||||
GPIO18 and GPIO19 (USB).
|
||||
|
||||
## Power: the Stamp's 5V, and the 9704's USB-C unplugged
|
||||
## Power: V_IN+, and the 9704's USB-C unplugged
|
||||
|
||||
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
|
||||
@@ -36,27 +36,32 @@ 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.
|
||||
|
||||
So the 9704 is powered from the header with its USB-C unplugged. The
|
||||
Stamp's 5V pin does it: the modem draws a few hundred mA, and its
|
||||
supercapacitor charges slowly, about 40 s to the green RDY LED. Both
|
||||
boards then run from the Stamp's USB-C; on a laptop's 500 mA port a
|
||||
Stamp that resets by itself while the 9704 charges is the supply sagging,
|
||||
and a charger or a powered hub gives the margin.
|
||||
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
|
||||
itself to about 460 mA while its supercapacitor charges, about 40 s to
|
||||
the green RDY LED. A USB supply of its own is best, with its ground
|
||||
joined to the Stamp's; the Stamp's 5V pin works too, sharing the Stamp's
|
||||
USB-C. V_BATT (pin 12) is for a single lithium cell, 3.6 to 4.5 V, with
|
||||
no reverse-polarity protection and no charger on the board: never 5 V
|
||||
there. Ground Control recommends one input, not both.
|
||||
|
||||
The control lines are optional. With fewer wired, take the matching lines
|
||||
out of the overlay's `rockblock` node, or `rb9704 begin` waits on a pin
|
||||
that is not there:
|
||||
|
||||
- None: four wires, and the modem is taken to be powered. No edit
|
||||
needed: `-DEXTRA_DTC_OVERLAY_FILE=no-control-pins.overlay` takes all
|
||||
three out at build time (below).
|
||||
- P_EN only: `rb9704 power off` and `power on` over telnet restart a
|
||||
modem that has hung, with nobody walking out to it. The one most worth
|
||||
wiring.
|
||||
- I_BTD as well: a slow or failed boot is a clear timeout, not JSPR
|
||||
errors after a fixed 4 s (`boot-delay-ms`).
|
||||
- I_EN adds little here. The ESP32-C3's ROM prints at reset on GPIO21,
|
||||
the console, so nothing reaches the modem's pins before Zephyr runs.
|
||||
- None: four wires, and the modem is taken to be powered: I_EN has a
|
||||
pull-up and P_EN a pull-down, so it boots and charges when power comes.
|
||||
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
|
||||
(`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
|
||||
pull-down keeps the charger on. Wired, it must be `GPIO_ACTIVE_LOW`;
|
||||
driven high it switches the charger off.
|
||||
|
||||
## Build and flash
|
||||
|
||||
@@ -77,7 +82,7 @@ west build -b stamp_c3 samples/shell -- -DEXTRA_CONF_FILE=overlay-wifi.conf \
|
||||
-DEXTRA_DTC_OVERLAY_FILE=no-control-pins.overlay
|
||||
```
|
||||
|
||||
With no P_EN, the long press on the button ends without turning anything
|
||||
With no I_EN, the long press on the button ends without turning anything
|
||||
off, and `rb9704 power` answers `-ENOTSUP`.
|
||||
|
||||
## WiFi
|
||||
@@ -147,7 +152,7 @@ airtime: use it on a network you trust.
|
||||
| Button | |
|
||||
| --- | --- |
|
||||
| short press | not begun: `rb9704 begin`. Begun: ask for the signal |
|
||||
| 2 s or more | end, and the supply off when P_EN is wired |
|
||||
| 2 s or more | end, and the modem off when I_EN is wired |
|
||||
|
||||
Nothing on the button costs airtime. The LED runs at 24 of 255
|
||||
(`LEVEL` in `indicator.c`).
|
||||
@@ -170,29 +175,34 @@ 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) |
|
||||
| a real 9704 on TX and RX, on V_IN+ 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 |
|
||||
| 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 |
|
||||
| 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): up over 6 minutes under the sky, past every drop with P_EN the wrong way, and "Stamp-C3 P_EN low", 17 bytes on topic 244, sent in 6 s and received in Cloudloop |
|
||||
| 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 |
|
||||
|
||||
### Open: the modem stops answering after a few minutes
|
||||
### The modem stopped answering after a few minutes: P_EN
|
||||
|
||||
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.
|
||||
On 2026-10-25 the modem stopped answering 2 to 5 minutes after each
|
||||
`begin`, four times: once indoors, three times under open sky. Every
|
||||
request then got `-EIO`, its signal reports stopped, and it stayed silent
|
||||
until the control lines were cycled. Indoors the RDY LED went off.
|
||||
|
||||
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.
|
||||
The overlay had P_EN as `GPIO_ACTIVE_HIGH`. P_EN is active low (Ground
|
||||
Control's hardware page, pin 6, "Cap Charge Enable Signal (ACTIVE LOW)"),
|
||||
so every `begin` drove it high and switched the supercapacitor charger
|
||||
off: the modem ran on what the supercapacitor held until it was flat.
|
||||
The TX and RX test without control lines, where the pull-down keeps the
|
||||
charger on, did not stop. With P_EN taken off the header, the same
|
||||
firmware stayed up and sent its first message. The overlay now has
|
||||
`GPIO_ACTIVE_LOW`, and the module releases P_EN while the modem is off;
|
||||
with P_EN wired again on that firmware, the modem stayed up past every
|
||||
earlier drop and sent a second message.
|
||||
|
||||
The module also now shuts down as the page sets out: I_EN low, then wait
|
||||
for I_BTD to go low before anything else, and the same wait on the way
|
||||
up. Before, `power off` dropped the pins and returned at once.
|
||||
Reference in new issue
Block a user