Update the notes for the new firmware and name Niklas Dathe

README, docs/06, TODO and the architecture diagram describe the microbu-firmware
based obu-firmware and station-link revision 2, add the hardware checks for the
new image, and credit Niklas Dathe as the author of the station firmware and its
interface specification. Ignore LaTeX build output next to station-link.tex.
This commit is contained in:
Ashin Walpola
2026-11-11 00:13:58 +01:00
parent 4ce1aaf250
commit fd006192e7
5 changed files with 94 additions and 69 deletions
+19 -6
View File
@@ -5,6 +5,19 @@ Engineering to-do list. The reviewer-facing open items live in
## Waiting on hardware
### obu-firmware on Niklas Dathe's microbu-firmware (added 2026-11-10)
Flashed on the XIAO at COM6 (the board that held an Arduino sketch; backup in
`firmware-backups/COM6-arduino-first4MB-2026-11-10.bin`). Seen on the bench: boots, advertises BLE
as `micrOBU-894A`, answers STATUS (131 octets), STATION_CONFIGURE starts the radio. Not yet seen,
because nothing was transmitting nearby and no phone ran the updated app:
- [ ] A beacon on air (simulated car on COM8/COM5 or the bench RSU): `py -3.11 tools/station_status_watch.py COM6 30 --configure --rx` prints V2X_RX lines (port 2001, signed=0) and `radio rx` counts up.
- [ ] Unsigned CAM from the phone (Sign outgoing messages off) is heard by a second ESP32-C5 receiver (`obu-firmware/test/pcap_gn_tally.py` on its capture).
- [ ] Signed CAM with the demo chain: tickets=1 and `signed` counts up in STATUS, `obu-firmware/test/verify_signed_pcap.py` accepts the capture.
- [ ] BLE: pairing with passkey 123456, bond survives a reconnect (80 KB NVS), TX while connected (TX BLE guard).
- [ ] Battery: with a cell on the BAT pads, `battery` in STATUS matches a multimeter; the shutdown rule is untested on hardware.
### MAPEM decoder and traffic lights per lane (added 2026-10-28)
`MapemUperCodec` decodes every recorded MAPEM (17 from the 2026-03-18 drive + the bench RSU's)
@@ -98,7 +111,7 @@ Settings > Developer > V2X data logger. 110 unit tests pass. ESP32-C5 path check
### Signed-TX firmware (vanetza-idf port), VAM and BLE: first on-air checks (added 2026-09-23)
obu-firmware is now a port of the colleague's `microbu-esp32c5` station (vanetza-idf, TS 103 097
obu-firmware is now a port of Niklas Dathe's `microbu-esp32c5` station (vanetza-idf, TS 103 097
signing, station-link protocol, BLE GATT), built with **ESP-IDF 6.0.2**. See `obu-firmware/NOTES.md`.
The previous firmware is backed up in `firmware-backups/` (restore command in its README.txt).
The app speaks the new protocol over USB or BLE and still falls back to the old frames against the
@@ -106,14 +119,14 @@ old firmware.
Done without hardware: IDF 6.0.2 build clean (39 % app partition free); host suite (`make` in
`obu-firmware/test/host`) passes unchanged; app unit tests 103/103, including the VAM encoder
against asn1tools, the station-link codec against the colleague's Python `messages.py`, and the VAM
against asn1tools, the station-link codec against Niklas Dathe's Python `messages.py`, and the VAM
generation rules. Flashed to **COM3** 2026-09-23 (hash verified); boot log: IDF v6.0.2,
`BLE advertising started as 'micrOBU-4AFA'`, station task ready. The radio stays off until the app
configures the station. New app build installed on the Pixel 9 Pro (adb, `install -r`).
First phone session (user, 2026-09-23): BLE works and CAMs go out. Three faults, fixed and
reflashed/reinstalled the same day:
1. No RX until the CAM pinger ran, with ~177 RX-queue drops: the colleague's `Station::tick()`
1. No RX until the CAM pinger ran, with ~177 RX-queue drops: Niklas Dathe's `Station::tick()`
returned before draining the radio until the first PoTi had set the clock. Now drained always.
2. "refused a request: time_regression": the loops re-send the latest fix every tick; a stale fix
timestamp read as the clock going back > 1 s, and each time the board rebuilt its stack.
@@ -124,7 +137,7 @@ reflashed/reinstalled the same day:
Second session (user, 2026-09-23): USB, RX and signing work; BLE still prompted every time and
never connected; time_regression every ~8 s. Found and fixed, reflashed (full flash, NVS erased):
4. The board never stored a bond: NVS (24 KB, the colleague's 4 MB-board layout) was full, mostly
4. The board never stored a bond: NVS (24 KB, Niklas Dathe's 4 MB-board layout) was full, mostly
Wi-Fi settings the previous firmware left behind, and NimBLE's bond write failed. NVS is now
80 KB (app moved to 0x20000) and was erased; boot logs `N bonded phone(s) in NVS`.
5. The station loop waited `pdMS_TO_TICKS(5)` = 0 ticks at 100 Hz, so it spun on the single core
@@ -160,13 +173,13 @@ resets the board, the phone is on the other port.
- [x] **Unsigned toggle.** Signing off: the same capture shows next header 1 (common header), as
the previous firmware sent. The card's `signed` count stops rising.
Confirmed 2026-09-23: unsigned pinger CAMs show on V2X2MAP as unsigned.
- [x] **Signed VAM on V2X2MAP.** Since 2026-09-23 17:16 the COM10 bridge is the colleague's
- [x] **Signed VAM on V2X2MAP.** Since 2026-09-23 17:16 the COM10 bridge is Niklas Dathe's
v2x2map-0.3.0 from source with a new `verify.py` and `--trust demo-chain.vcr` (launcher:
`micrOBU_workspace/v2x-obu-esp32c5/start-v2x2map-signed.bat`, replacing its-g5-bridge.exe).
Signed CAMs from the pinger already show "signature verified" live. Switch to VAM with signing
on: the VAM must be decoded (cyclist, position) and show "signature verified" too.
Confirmed by the user 2026-09-23: signed VAMs decode and verify.
- [x] **VAM.** Transmit VAM: BTP port 2018, psid 638; with `tools/wireshark/psid-vru.lua` from the colleague's microbu-esp32c5 repository
- [x] **VAM.** Transmit VAM: BTP port 2018, psid 638; with `tools/wireshark/psid-vru.lua` from Niklas Dathe's microbu-esp32c5 repository
Wireshark decodes the VAM (stationType cyclist, bicyclist profile in every ~2 s VAM). Rate:
≥1 per 5 s standing still, about one per GNSS fix while riding.
Covered by the V2X2MAP check above (decoded VAM, psid 638); Wireshark not needed.