Radio link
On this page
Receive live data from the car over the XBee radios, and view it in mur-voir or Marple.
The car can also send live data over a pair of Digi XBee XR 900 radios, one on the car and one plugged into a laptop at the track. The laptop runs the base station, which decodes the data and saves it. This link doesn’t need internet access or the tailnet.
The radio link is slow, at 9600 baud with a budget of about 500 bytes per second. The default selection is the shakedown set:
| Data | Rate |
|---|---|
| Motor rpm, front wheel speed | 3 Hz |
| Pedal status | 2 Hz |
| Inverter state and faults, ECU and TTCS status, node heartbeats, rear GPS position and velocity | 1 Hz |
| Selected BMS values | 0.5 Hz |
When the link can’t keep up, the car sends the latest values less often instead of queueing old ones. None of this affects what the Pi records.
Set up the radios
Section titled “Set up the radios”Set up both radios in Digi’s XCTU:
- Give both radios the same RF and network settings.
- Set API mode,
AP=1orAP=2. - Set the baud rate to match
baudunder[radio]inconfig/telem.toml, which is 9600 by default. - Save the settings and close XCTU’s serial consoles, so the port is free.
- Write down each radio’s 16-digit address, which is its SH and SL values together.
On the car, XBEE_DESTINATION in /etc/telem.env is the base station radio’s address. See Telemetry Pi.
To send more data, raise the baud rate in both XCTU and config/telem.toml before you add messages or raise rates. Keep max_payload within the radio’s NP limit.
Run the base station
Section titled “Run the base station”You need uv and access to Wireless-telem.
git clone --recurse-submodules https://github.com/Melbourne-University-Motorsports/Wireless-telemcd Wireless-telemuv syncPlug in the base station radio and find its port. On a Mac it’s /dev/cu.usbserial-..., on Linux /dev/serial/by-id/..., and on Windows COM....
ls /dev/cu.usbserial-*uv run base-station --port /dev/cu.usbserial-XXXX --source CAR_RADIO_ADDRESS--source is the car radio’s address. The base station prints nothing while it runs. It writes every sample to logs/live.jsonl and an MF4 to logs/live_run_<time>_<run id>.mf4.
To check packets are arriving with no gaps, run this in a second terminal. It prints a dot per packet and a GAP line when packets go missing.
tail -n 0 -f logs/live.jsonl | jq --unbuffered -r .sequence | awk '{ if (NR>1 && $1!=p+1) print "\nGAP", p, "->", $1, "missing", $1-p-1; else printf "."; fflush(); p=$1 }'Press Ctrl-C to stop the base station. It prints its counters:
| Counter | Meaning |
|---|---|
foreign_radio | Packets from another radio. --source is wrong. |
invalid_packets | The car and base station run different versions. Update both. |
decode_errors | A CAN frame doesn’t match its DBC. |
| No counters | No radio traffic arrived at all. |
View it in mur-voir
Section titled “View it in mur-voir”mur-voir can follow the base station’s logs/live.jsonl through a small bridge. From a mur-voir checkout, run:
npm run radio-bridge -- --input /absolute/path/to/Wireless-telem/logs/live.jsonl --port 1885Then open File → Connect in mur-voir and enter:
| Setting | Value |
|---|---|
| Source | MQTT direct (debug) |
| Address | ws://127.0.0.1:1885 |
| Topic filter | mur/signal/# |
| Mapping | JSON per signal |
| Username and password | Empty |
| CAN timestamp | Unchecked |
The bridge only sends new packets, so connect before the car starts sending. It has no history. To share it with other laptops on the pit network, add --host 0.0.0.0 and connect them to ws://<base station IP>:1885. The bridge has no password or encryption, so only do this on a network you trust.
Stream to Marple
Section titled “Stream to Marple”The base station can also upload live data to Marple.
-
Create a realtime stream in Marple. Set its name as
streamunder[marple]inconfig/telem.toml. The default isvehicle-live. -
Install the Marple extra with
uv sync --all-packages --all-extras. -
Start the base station with your Marple token and
--marple:Terminal window export MARPLE_API_TOKEN='your-token'uv run base-station --port /dev/cu.usbserial-XXXX --source CAR_RADIO_ADDRESS --marple
The base station makes a Marple dataset for each run on the car. If Marple fails, reception carries on and logs/live.jsonl keeps the data, but nothing uploads it later.
Test without the car
Section titled “Test without the car”You can run the whole radio path on one laptop, with simulated CAN traffic and no radios. Run each command in its own terminal, starting with the base station:
# Terminal 1: receive the simulated radio trafficuv run base-station --udp-port 15001 --output logs/live.jsonl
# Terminal 2: record simulated CAN and send the live selectionuv run telem --simulate-port 15000 --radio-udp 15001 --no-bms
# Terminal 3: make traffic for both CAN busesuv run can-simulator --udp-port 15000To test the real radios with simulated CAN, plug both into the laptop:
# Terminal 1: --source is the car radio's addressuv run base-station --port /dev/cu.usbserial-BASE --source CAR_RADIO_ADDRESS
# Terminal 2: --destination is the base station radio's addressuv run telem --simulate-port 15000 --port /dev/cu.usbserial-CAR --destination BASE_RADIO_ADDRESS --no-bms
# Terminal 3uv run can-simulatorStop telem with Ctrl-C so it finishes its log. Add --duration 30 to end a test after 30 seconds.
More detail
Section titled “More detail”- Wireless-telem README: the radio settings, Marple and tests.
- Radio bridge README: bridge options and how it maps signals.