Add a firmware README and an architecture overview to the app README
obu-firmware/README.md follows Niklas Dathe's microbu-firmware README: station diagram with the MicrOBU raw receive, unsigned transmit and battery paths, a summary block, build and flash, BLE pairing, host tests and links. The app README gets an architecture diagram and a summary block, corrects the pseudonym description for the 2026-11-10 firmware (the link has no MAC field any more) and the unit test count (130).
This commit is contained in:
@@ -6,6 +6,45 @@ The app is the HMI for the OBU hardware and, on the ESP32-C5 path, also the ITS
|
||||
|
||||
**Platform:** Android (Kotlin) / **Min SDK:** 29 (Android 10) / **Target SDK:** 36 / **Version:** 0.1.0 (`versionName`, Phase 03)
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
subgraph Phone[Android app]
|
||||
UI[Compose UI and use cases]
|
||||
Fac[ITS facilities: CAM, VAM, DENM, SPATEM and MAPEM codecs]
|
||||
Sens[GNSS, IMU, trip recording]
|
||||
Link[Esp32Link and StationLink]
|
||||
end
|
||||
Sens --> Fac
|
||||
Fac -->|BTP_DATA_REQUEST, POTI_UPDATE| Link
|
||||
Link -->|V2X_RX, CONFIRM with status| Fac
|
||||
Fac --> UI
|
||||
Link <-->|USB-C or encrypted BLE, station-link rev. 2| OBU[obu-firmware on the XIAO ESP32-C5]
|
||||
OBU <-->|BTP, GeoNetworking, signing| Air[ITS-G5 5.9 GHz]
|
||||
UI <-->|IP over USB tethering, MQTT| CiT[consider it CiT One]
|
||||
```
|
||||
|
||||
```yaml
|
||||
platform: Android
|
||||
language: Kotlin
|
||||
UI: Jetpack-Compose
|
||||
DI: Hilt
|
||||
min_sdk: 29
|
||||
target_sdk: 36
|
||||
hardware_paths:
|
||||
esp32_c5: # primary; the app is the ITS facilities layer
|
||||
firmware: obu-firmware/ # Niklas Dathe's microbu-firmware plus MicrOBU additions
|
||||
transport: [USB-C native Serial/JTAG, Bluetooth LE GATT]
|
||||
protocol: station-link revision 2 (obu-firmware/docs/station-link.pdf)
|
||||
app_builds: [CAM, VAM, decodes CAM, DENM, SPATEM, MAPEM, VAM]
|
||||
board_does: [BTP, GeoNetworking, signing, radio]
|
||||
cit_one: # consider it CiT One
|
||||
transport: IP over USB tethering, MQTT
|
||||
messages_received: V2X_RX (0x90), signed or not, up to 494 octets
|
||||
messages_sent: signed or unsigned per setting (Settings > Connection > ESP32-C5)
|
||||
credentials: throwaway demo chain in app/src/main/assets/demo-chain.vcr
|
||||
tests: 130 JVM unit tests, no emulator needed (domain/ has no Android imports)
|
||||
```
|
||||
|
||||
## Project goal
|
||||
|
||||
Demonstrate V2X communication with at least one C2C-CC bicycle safety use case working on the ESP32-C5, specifically intersection movement assist: a car approaching an intersection on a path that conflicts with the rider's.
|
||||
@@ -37,7 +76,7 @@ Both paths converge at `CamUseCaseRepository`, which normalises whatever arrived
|
||||
|
||||
**CAM-based use case detection**; correlates the rider's own state with a short per-station history of received CAMs to evaluate five C2C-CC bicycle safety use cases (IMA-B, IMA-S, RTW-B, LTW-B, SMVA/BCW-B) and raises alerts under the three-tier Info / Awareness / Warning model. None of these use cases generates a DENM.
|
||||
|
||||
**Phone-generated CAM or VAM**; on the ESP32-C5 path the app builds a CAM (EN 302 637-2) or a VAM (TS 103 300-3, cyclist profile, its generation rules included) from live GNSS and IMU, UPER-encodes it, and hands it to the board with "signed" or "unsigned" (Settings > Connection > ESP32-C5). The board adds BTP and GeoNetworking, signs it with its authorization ticket, and transmits it over ITS-G5. Each message carries a rotating pseudonym (station ID and MAC change together) and ITS time in TAI.
|
||||
**Phone-generated CAM or VAM**; on the ESP32-C5 path the app builds a CAM (EN 302 637-2) or a VAM (TS 103 300-3, cyclist profile, its generation rules included) from live GNSS and IMU, UPER-encodes it, and hands it to the board with "signed" or "unsigned" (Settings > Connection > ESP32-C5). The board adds BTP and GeoNetworking, signs it with its authorization ticket, and transmits it over ITS-G5. The CAM and VAM station ID rotates as a pseudonym. The link-layer address is the board's: derived from the authorization ticket when signed, a random MAC per configuration when unsigned (the link has no MAC field since the 2026-11-10 firmware, so the address does not rotate with the station ID). ITS time is TAI.
|
||||
|
||||
**DENM transmission**; CiT One path only. Triggers the stationary vehicle profile (`hln-sv`, causeCode 94) via the consider it Use Case API. This is a manual antenna and range test tool. It is never triggered by a detected event or a use case alert, and the control is hidden entirely on the ESP32-C5 path.
|
||||
|
||||
@@ -85,7 +124,7 @@ tools/ Bench scripts: STATUS watcher, bench-listener tally, MAPEM
|
||||
docs/ Requirements traceability, signed ITS / VAM / BLE design, architecture diagrams
|
||||
```
|
||||
|
||||
The `domain/` packages contain no Android imports. That is what makes the 132-test JVM suite possible without an emulator or instrumentation.
|
||||
The `domain/` packages contain no Android imports. That is what makes the 130-test JVM suite possible without an emulator or instrumentation.
|
||||
|
||||
## Connectivity
|
||||
|
||||
|
||||
Reference in New Issue
Block a user