modjam/notes.md
Alec Perkins 0f478bf720 Implement test/control stations, simulator, tests
Adds the modjam package: a MeshCore-backed test station service for
Pi (IDLE + RUNNING states, cuesheet-driven), a control station REPL
for the Mac, and a UDP simulator that swaps in for the radio when
SIMULATOR=true (drops cross-config packets and a configurable
fraction of test-payload datagrams to mimic real radio loss).
docker-compose runs three sim stations + control on a bridge net.
TSV log format matches the reference traces.

Pytest suite covers protocol codec, cuesheet builder, TSV logger,
config loader, and UDP radio packet routing/loss; .forgejo/workflows
runs it on push to main and on PRs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-07 21:27:41 -04:00

1.8 KiB

Review the @README.md and implement a python process for the test stations that can run on a Raspberry Pi and a process for the control station that can run on a macbook.

Also set up a simulator using docker-compose with Docker containers for each Test Station process and a control station, with a SIMULATOR=true env variable. When this is true, the process uses UDP on the Docker network between the containers to "transmit" and "listen" for packets instead of looking for a USB serial attached node device.

Reference a prototype in @reference/modjam-prototype.py and its output tsv files.

DOWNLINKING

The control node sends a RESULTS:<station>|<testname> command on the control_radio settings. This is received by all Test Stations in IDLE state but only the station addressed by the command acts on the command.

Some arbitrary time after, the control station sends a RESULTS:A|test1 command. The Control Station and Test Station A tune to the data radio settings and Test Station A enters DOWNLINKING state. Each beacons a "ready" message until they hear the other station's "ready", at which point Test Station A

Simulator using Docker containers for each Test Station process, with a SIMULATOR=true env variable. When this is true, the process uses UDP on the Docker network between the containers to "transmit" and "listen" for packets.

Commands:

  • START
  • STOP
  • RESULTS

[:]|attr1:val1,val2,…|attr2:val1,val2,…

Listens for START command from control node START|name:<testname>|f:915.1|bw:62.5,125,250,500|sf:6,7,8,9,10,11,12|cr:4,5,6,7,8|pow:10,22

RESULTS command: RESULTS:<station>\tname:<testname> RESULTS:A|name sends summary of each trial |||||||||… A|test1|915.1|500|7|8|22|100|88|84 B|test1|915.1|500|7|8|22|85|100|80 C|test1|915.1|500|7|8|22|85|100|80