DENM over-the-air receive on the ESP32-C5 path
The firmware forwarded CAM only: gn_unwrap_cam accepted single-hop broadcast (HT=5) and BTP port 2001, so every DENM was dropped before it reached the phone. Real OBUs disseminate DENM by GeoBroadcast (HT=4), whose 44-byte extended header also carries the hazard's relevance area - materially more useful on a map than the sender's own position, since a sender may be relaying for someone else. Firmware - gn_unwrap_cam -> gn_unwrap_its: accepts GeoBroadcast alongside TSB/SHB, and BTP ports 2001 and 2002, extracting the GeoBroadcast destination area. Both extended-header lengths were measured against live air capture rather than read off a spec table. Secured packets (Basic Header NextHeader=2) are rejected rather than misparsed. - SERIAL_MSG_CAM_RX (0x02) superseded by SERIAL_MSG_V2X_RX (0x04): a 14-byte prefix carrying BTP port, RSSI and the destination area. Adding MAPEM later needs a decoder on the phone but no protocol change. 0x02 stays reserved so the numbering is not silently reused. - Promiscuous RX capture buffer 400 -> 800 bytes. A real GeoBroadcast DENM is around 500 bytes on air and was being truncated mid-payload, which no amount of correct unwrapping downstream could have recovered from. - geonet_wrap_shb, both firmwares: the SHB extended header is 28 bytes, not 24. The Source Position Vector is followed by a 4-byte reserved field; without it a standards-strict receiver reads the CAM payload's first two bytes as the BTP destination port. App - DenmUperCodec: UPER decoder for the ManagementContainer and the SituationContainer's eventType. ValidityDuration is 17 bits, not 16, and ManagementContainer, SituationContainer and CauseCode each carry their own extension bit - a single wrong bit made a real frame read causeCode 47 instead of 94. - DenmEvent gains actionID (originatingStationID + sequenceNumber), stationType, termination, detectionTime, relevance radius and RSSI. Dedup keys on actionID where available, so a termination lands on the event it ends instead of creating a second pin. - denmEvents merges the MQTT and over-the-air sources and drops terminated events. The V2X list view now shows hazards above the CAM stations; it previously took no DENM parameter at all, so hazards reached the map but never the list. - DenmParser: the Use Case API sends causeCode as a string enum, so reading it as an Int always yielded null. Testing - DenmAirReceiveTest covers the V2X_RX prefix and the decoder using real frames from a live capture as fixtures. Expected values were cross-checked against the ETSI ASN.1 modules via asn1tools, which agreed on all 1885 decodable DENMs across the capture set, every field including detectionTime. - Verified on hardware: a CiT One HLN-SV DENM decodes as cause 94/0 with a 1000 m relevance radius at 1 Hz alongside CAM, with no decode failures and no unexpected BTP ports. Also replaces em dashes with hyphens throughout the user-facing strings, including the German translation.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<resources>
|
||||
<!-- App -->
|
||||
<string name="app_name">MicrOBU</string>
|
||||
<string name="app_subtitle">V2X Companion — Phase 02</string>
|
||||
<string name="app_subtitle">V2X Companion - Phase 02</string>
|
||||
|
||||
<!-- Language names (always shown in their own language) -->
|
||||
<string name="lang_english">English</string>
|
||||
@@ -27,7 +27,7 @@
|
||||
<string name="dash_connected">Connected</string>
|
||||
<string name="dash_mqtt_connected">MQTT connected</string>
|
||||
<string name="dash_mqtt_connecting">Connecting to broker…</string>
|
||||
<string name="dash_mqtt_error">Broker unreachable — check V2X settings</string>
|
||||
<string name="dash_mqtt_error">Broker unreachable - check V2X settings</string>
|
||||
<string name="dash_recording">Recording</string>
|
||||
<string name="dash_samples">samples</string>
|
||||
<string name="dash_start_driving_session">Start Driving Session</string>
|
||||
@@ -64,12 +64,12 @@
|
||||
<string name="conn_bluetooth_phase3">Bluetooth</string>
|
||||
<string name="conn_bluetooth_phase3_desc">Bluetooth connection is planned for Phase 03 and is not yet implemented.</string>
|
||||
<string name="conn_esp32_title">ESP32-C5 (USB Serial)</string>
|
||||
<string name="conn_esp32_phase3_desc">USB-serial connection to the ESP32-C5 is scaffolded for Phase 03 but not yet functional — it needs the ESP32 firmware protocol translated to Kotlin first.</string>
|
||||
<string name="conn_esp32_state_disconnected">Not connected — plug the ESP32-C5 into the native USB-C port and tap Connect.</string>
|
||||
<string name="conn_esp32_phase3_desc">USB-serial connection to the ESP32-C5 is scaffolded for Phase 03 but not yet functional - it needs the ESP32 firmware protocol translated to Kotlin first.</string>
|
||||
<string name="conn_esp32_state_disconnected">Not connected - plug the ESP32-C5 into the native USB-C port and tap Connect.</string>
|
||||
<string name="conn_esp32_state_device_attached">Device detected, opening…</string>
|
||||
<string name="conn_esp32_state_permission_requested">Waiting for USB permission…</string>
|
||||
<string name="conn_esp32_state_connected">Connected</string>
|
||||
<string name="conn_esp32_state_error">Connection error — check the cable and native USB-C port, then try again.</string>
|
||||
<string name="conn_esp32_state_error">Connection error - check the cable and native USB-C port, then try again.</string>
|
||||
<string name="conn_esp32_connect">Connect to ESP32-C5</string>
|
||||
<string name="conn_scan">Scan for Devices</string>
|
||||
<string name="conn_scanning">Scanning…</string>
|
||||
@@ -127,7 +127,7 @@
|
||||
<string name="gnss_open_maps_sub">Opens in your preferred maps application</string>
|
||||
<string name="gnss_view_inapp">View in App</string>
|
||||
<string name="gnss_view_inapp_sub">Show current location on an in-app map</string>
|
||||
<string name="gnss_no_fix">No GPS fix yet — move to an open area</string>
|
||||
<string name="gnss_no_fix">No GPS fix yet - move to an open area</string>
|
||||
<string name="map_title">Location Map</string>
|
||||
<string name="map_location_label">Current Location</string>
|
||||
<string name="v2x_map_remote_count">%1$d tracked remote road user(s)</string>
|
||||
@@ -161,17 +161,17 @@
|
||||
<string name="settings_developer">Developer</string>
|
||||
<string name="settings_dev_mode">Developer mode</string>
|
||||
<string name="settings_wifi">Wi-Fi OBU connection</string>
|
||||
<string name="settings_wifi_val">Dev mode only — not implemented</string>
|
||||
<string name="settings_wifi_val">Dev mode only - not implemented</string>
|
||||
<string name="settings_about">About</string>
|
||||
<string name="settings_app_version">App version</string>
|
||||
<string name="settings_app_version_val">0.5.0 (Phase 03 — ESP32-C5 serial link + phone-built CAM)</string>
|
||||
<string name="settings_app_version_val">0.5.0 (Phase 03 - ESP32-C5 serial link + phone-built CAM)</string>
|
||||
<string name="settings_connection">Connection</string>
|
||||
<string name="settings_usb_auto_detect">Auto-detect OBU via USB-C</string>
|
||||
<string name="settings_usb_manual_ip">Manual OBU IP</string>
|
||||
<string name="settings_obu_hardware">OBU Hardware</string>
|
||||
<string name="settings_obu_hardware_cit_one">CiT One</string>
|
||||
<string name="settings_obu_hardware_esp32">ESP32-C5</string>
|
||||
<string name="settings_obu_hardware_esp32_note">ESP32-C5 acts as a "dumb" transceiver: CAM is built and encoded on the phone, sent to the ESP32 over USB serial, and broadcast over ITS-G5. No MQTT broker or DENM use-case engine on this path — see the V2X Monitor screen\'s CAM Pinger for a manual test tool.</string>
|
||||
<string name="settings_obu_hardware_esp32_note">ESP32-C5 acts as a "dumb" transceiver: CAM is built and encoded on the phone, sent to the ESP32 over USB serial, and broadcast over ITS-G5. No MQTT broker or DENM use-case engine on this path - see the V2X Monitor screen\'s CAM Pinger for a manual test tool.</string>
|
||||
<string name="settings_usb_transport">Active transport</string>
|
||||
<string name="settings_transport_usbc">USB-C</string>
|
||||
<string name="settings_transport_wifi">Wi-Fi</string>
|
||||
@@ -188,32 +188,39 @@
|
||||
<string name="mqtt_no_topics_hint">Connect to the OBU and wait for V2X traffic</string>
|
||||
<string name="mqtt_no_messages">No messages on this topic yet</string>
|
||||
|
||||
<!-- DENM TX — manual antenna/RSU-range test tool only, not use-case-driven -->
|
||||
<!-- DENM TX - manual antenna/RSU-range test tool only, not use-case-driven -->
|
||||
<string name="mqtt_last_tx">Last transmitted payload:</string>
|
||||
<string name="mqtt_denm_tx_title">DENM Transmission (Manual Test)</string>
|
||||
<string name="mqtt_send_denm">Send Test DENM</string>
|
||||
<string name="mqtt_stop_denm">Stop DENM</string>
|
||||
<string name="mqtt_denm_use_case_desc">Aftermarket Stationary Vehicle (causeCode 94)</string>
|
||||
<string name="mqtt_denm_not_connected">Connect to the OBU to enable DENM triggering</string>
|
||||
<string name="mqtt_denm_active">DENM active — OBU broadcasting via ITS-G5</string>
|
||||
<string name="mqtt_denm_hint">Manual antenna/RSU range test — publishes uca-denmctrl (retained) to v2x-uca/input/denmtrg. Not triggered by detected events or use case alerts.</string>
|
||||
<string name="mqtt_denm_active">DENM active - OBU broadcasting via ITS-G5</string>
|
||||
<string name="mqtt_denm_hint">Manual antenna/RSU range test - publishes uca-denmctrl (retained) to v2x-uca/input/denmtrg. Not triggered by detected events or use case alerts.</string>
|
||||
<string name="mqtt_denm_show">Show last TX</string>
|
||||
<string name="mqtt_denm_hide">Hide</string>
|
||||
|
||||
<!-- CAM Pinger — ESP32-C5-only manual bench test, equivalent to the DENM TX card above -->
|
||||
<!-- CAM Pinger - ESP32-C5-only manual bench test, equivalent to the DENM TX card above -->
|
||||
<string name="mqtt_cam_pinger_title">CAM Pinger (Manual Test)</string>
|
||||
<string name="mqtt_cam_pinger_desc">1 Hz CAM ping built from live GNSS and IMU data — verifies the serial link and ESP32 radio path without needing a trip recording.</string>
|
||||
<string name="mqtt_cam_pinger_no_fix">Waiting for GNSS fix — nothing transmitted yet</string>
|
||||
<string name="mqtt_cam_pinger_desc">1 Hz CAM ping built from live GNSS and IMU data - verifies the serial link and ESP32 radio path without needing a trip recording.</string>
|
||||
<string name="mqtt_cam_pinger_no_fix">Waiting for GNSS fix - nothing transmitted yet</string>
|
||||
|
||||
<!-- Received-CAM list (ESP32-C5 path) -->
|
||||
<string name="v2x_cam_rx_count">%1$d station(s) in range — latest CAM per station</string>
|
||||
<string name="v2x_cam_rx_count">%1$d station(s) in range - latest CAM per station</string>
|
||||
<string name="v2x_cam_rx_none">No CAMs received</string>
|
||||
<string name="v2x_cam_rx_none_hint">Decoded CAMs from nearby stations appear here as they arrive over the serial link.</string>
|
||||
<string name="v2x_cam_rx_station">Station %1$d · %2$s</string>
|
||||
<string name="v2x_cam_rx_kinematics">%1$.1f km/h · heading %2$.0f°</string>
|
||||
<string name="v2x_cam_rx_distance">%1$.0f m</string>
|
||||
<string name="v2x_cam_rx_distance_unknown">— m</string>
|
||||
<string name="v2x_cam_rx_distance_unknown">- m</string>
|
||||
<string name="v2x_cam_rx_rssi">%1$d dBm</string>
|
||||
<string name="v2x_cam_rx_none_stations">No CAMs received</string>
|
||||
|
||||
<!-- Received-DENM list (ESP32-C5 path) -->
|
||||
<string name="v2x_denm_rx_count">%1$d active hazard(s) - latest DENM per event</string>
|
||||
<string name="v2x_denm_rx_hazard">%1$s · station %2$d</string>
|
||||
<string name="v2x_denm_rx_cause_code">cause %1$d/%2$d</string>
|
||||
<string name="v2x_denm_rx_radius">%1$d m radius</string>
|
||||
|
||||
<!-- DENM map pins -->
|
||||
<string name="v2x_map_denm_labeled">Hazard: cause %1$d/%2$d (station %3$d)</string>
|
||||
@@ -228,9 +235,9 @@
|
||||
<string name="station_type_rsu">Roadside unit</string>
|
||||
<string name="station_type_other">Type %1$d</string>
|
||||
<string name="mqtt_cam_pinger_not_connected">Connect the ESP32-C5 to enable the CAM pinger</string>
|
||||
<string name="mqtt_cam_pinger_active">Pinging — 1 CAM/s over the serial link</string>
|
||||
<string name="mqtt_cam_pinger_active">Pinging - 1 CAM/s over the serial link</string>
|
||||
<string name="mqtt_cam_pinger_sent_count">Sent: %1$d</string>
|
||||
<string name="mqtt_cam_pinger_send_failures">Write failures: %1$d consecutive — CAMs are not reaching the ESP32</string>
|
||||
<string name="mqtt_cam_pinger_send_failures">Write failures: %1$d consecutive - CAMs are not reaching the ESP32</string>
|
||||
<string name="mqtt_cam_pinger_fw_counters">ESP32: tx fail %1$d · oversize %2$d · crc err %3$d</string>
|
||||
<string name="mqtt_start_pinger">Start Pinger</string>
|
||||
<string name="mqtt_stop_pinger">Stop Pinger</string>
|
||||
@@ -241,16 +248,16 @@
|
||||
<string name="mqtt_usecase_none_active">No active use case alerts</string>
|
||||
<string name="mqtt_usecase_detail">Station %1$d · %2$.0f m · closing %3$.1f m/s · TTC %4$.1f s · %5$s</string>
|
||||
|
||||
<!-- Human-readable use-case narratives (Section 10.4 — not just raw JSON) -->
|
||||
<string name="usecase_narrative_ima_b">Crossing vehicle ahead — %1$.0f s to conflict</string>
|
||||
<string name="usecase_narrative_ima_s">Stopped vehicle may pull out — %1$.0f s</string>
|
||||
<string name="usecase_narrative_rtw_b">Car turning right toward you — %1$.0f s</string>
|
||||
<string name="usecase_narrative_ltw_b">Car turning left toward you — %1$.0f s</string>
|
||||
<string name="usecase_narrative_smva_bcw_b">Fast-closing vehicle nearby — %1$.0f s</string>
|
||||
<!-- Human-readable use-case narratives (Section 10.4 - not just raw JSON) -->
|
||||
<string name="usecase_narrative_ima_b">Crossing vehicle ahead - %1$.0f s to conflict</string>
|
||||
<string name="usecase_narrative_ima_s">Stopped vehicle may pull out - %1$.0f s</string>
|
||||
<string name="usecase_narrative_rtw_b">Car turning right toward you - %1$.0f s</string>
|
||||
<string name="usecase_narrative_ltw_b">Car turning left toward you - %1$.0f s</string>
|
||||
<string name="usecase_narrative_smva_bcw_b">Fast-closing vehicle nearby - %1$.0f s</string>
|
||||
|
||||
<!-- Settings > Use Case Alerts -->
|
||||
<string name="settings_usecase_alerts">Use Case Alerts</string>
|
||||
<string name="settings_usecase_alerts_desc">Per-use-case enable/disable for the CAM-based Use Case Alert panel on the V2X Monitor screen. All use cases are CAM-only — none of them trigger a DENM.</string>
|
||||
<string name="settings_usecase_alerts_desc">Per-use-case enable/disable for the CAM-based Use Case Alert panel on the V2X Monitor screen. All use cases are CAM-only - none of them trigger a DENM.</string>
|
||||
<string name="settings_usecase_alert_levels_title">Alert level thresholds (read-only)</string>
|
||||
<string name="settings_usecase_level_warning">Warning</string>
|
||||
<string name="settings_usecase_level_awareness">Awareness</string>
|
||||
@@ -264,12 +271,12 @@
|
||||
<string name="dash_transport_bt">BT</string>
|
||||
|
||||
<!-- OBU stationType warning -->
|
||||
<string name="dash_station_type_warning">⚠ OBU stationType ≠ 2 (cyclist) — VRU detection may be impaired at equipped intersections</string>
|
||||
<string name="dash_station_type_warning">⚠ OBU stationType ≠ 2 (cyclist) - VRU detection may be impaired at equipped intersections</string>
|
||||
|
||||
<string name="settings_platform">Platform</string>
|
||||
<string name="settings_platform_val">Android / Kotlin / Jetpack Compose</string>
|
||||
<string name="settings_project">Project</string>
|
||||
<string name="settings_project_val">MicrOBU — HAW Hamburg & consider it GmbH</string>
|
||||
<string name="settings_project_val">MicrOBU - HAW Hamburg & consider it GmbH</string>
|
||||
|
||||
<!-- Phase A: Trip Recording (bottom nav) -->
|
||||
<string name="nav_trips">Trips</string>
|
||||
|
||||
Reference in New Issue
Block a user