0
0
Fork 0
  • Rust 99.2%
  • Shell 0.8%
Find a file
2026-07-27 12:41:51 +02:00
.cargo setup rust project using esp-generate 2026-04-25 16:47:41 +02:00
docs proto/PositionState: Add time for geonetworking 2026-07-27 12:41:51 +02:00
src main: Add UART I/O helpers 2026-07-27 11:03:24 +02:00
.clippy.toml radio: Enable TX of non-QoS frames 2026-07-19 17:16:06 +02:00
.gitignore setup rust project using esp-generate 2026-04-25 16:47:41 +02:00
build.rs build: Add "io" module for BLE/ UART messages 2026-07-22 15:39:33 +02:00
Cargo.lock Enable V2X transmission, add optional stand-alone CAM transmission 2026-07-24 12:12:11 +02:00
Cargo.toml main: Add UART I/O helpers 2026-07-27 11:03:24 +02:00
feat-permut.sh cam_tx: Fill path history 2026-07-26 21:24:24 +02:00
Readme.md Enable V2X transmission, add optional stand-alone CAM transmission 2026-07-24 12:12:11 +02:00
rust-toolchain.toml setup rust project using esp-generate 2026-04-25 16:47:41 +02:00
rustfmt.toml chore: Add rustfmt config 2026-05-11 22:22:39 +02:00

ESP32-C5 C-ITS Companion/ Visualizer

Displays different C-ITS receive-only use cases for cheap.

Hardware Requirements

The code is currently tailored to:

  • Seeed XIAO ESP32-C5 (8MB PSRAM)
  • Seeed XIAO L67K (connected on GPIO12 (RX), GPIO11 (TX), GPIO1 (wakeup) and GPIO25 (reset))
    only available with gnss feature (which is included in spat feature)
  • Some ST7789 172*320px screen (connected on GPIO8 (SCL/ SCK), GPIO10 (SDA/ MOSI), GPIO7 (reset), GPIO23 (DC), GPIO24 (CS), TODO GPIO0 (BL))
    only available with screen feature (which is included in spat feature)

Features

GNSS

Enable L67K GNSS module and in main application logic/ state.

SPAT

Takes the current position and heading from the GNSS receiver and displays the signal phases of the upcoming intersection. The upcoming intersection is selected when the own position is "inside" some ingress approach of the intersection. The display will show the current phase and remaining time for all signal groups of the bike-able lanes in the approach.

DENM

TODO: Not implemented yet!

Shall "publish" the most relevant information of a DENMs via BLE

CAM

Just prints a line for each received CAM.

CAM-TX

Generates and transmits a CAM when a GNSS update was received. Depends on the gnss feature.

Usage

Toolchain Installation

Install the toolchain, targe and tools like this:

rustup toolchain install nightly --component rust-src
rustup target add riscv32imac-unknown-none-elf

# cargo install esp-generate --locked
# cargo install esp-config --features=tui --locked
cargo install espflash --locked

(Project was setup using esp-generate with the options --chip esp32c5 -o esp32c5-wroom-1-psram -o alloc -o log -o unstable-hal -o wifi -o esp-backtrace -o embassy.)

To use the proper rustfmt features, enable the nightly toolchain:

rustup component add --toolchain nightly rustfmt

Build and Flash

In default configuration only signal phases (SPAT) data is displayed for the upcoming intersection. Additional features are available through feature flags:

  • esp: Run on ESP (required as feature flag to enable unit tests on host)
  • std: Run on system with std library
  • spat: Enable signal phase (and intersection map) data
  • spat_debug: Enable additional debug information for the SPAT/ GLOSA use case
  • denm: Enable DENMs
  • cam: Enable CAMs
  • cam_tx: Enable CAM generation and transmission

Officially supported feature combinations are:

  • esp,spat,gnss,screen (default features)
  • esp,spat,gnss,screen,cam_tx
  • esp,spat,gnss,screen,cam_tx,cam,denm
  • To be implemented: No GNSS and screen when BLE/ UART interface is implemented

Connect your ESP32-C5 and run:

# default configuration
cargo run --release

# for e.g. also enable DENM feature
cargo run --release -F denm

Run Unit Tests on Host

The unit tests in this project are meant to be run on the host:

cargo test --target host-tuple --bin test --no-default-features -F std,spat