Firmware for our ESP32-C5 based C-ITS receiver
  • C 99.3%
  • CMake 0.7%
Find a file
Michael Ehrenreich 5ba2a0303b Update readme
2026-04-29 17:57:11 +02:00
esp-idf@12f36a021f De-struct sniffer; make writing pcap optional; don't delete queue and semaphore when stopping sniffer; add .gitignore; use same queue/task for MQTT and pcap writing; update sdkconfig for new esp-idf; add used esp-idf version as submodule 2026-03-17 19:59:27 +01:00
main Update led_indicator component to fix compilation 2026-04-21 15:21:07 +02:00
.gitignore De-struct sniffer; make writing pcap optional; don't delete queue and semaphore when stopping sniffer; add .gitignore; use same queue/task for MQTT and pcap writing; update sdkconfig for new esp-idf; add used esp-idf version as submodule 2026-03-17 19:59:27 +01:00
.gitmodules De-struct sniffer; make writing pcap optional; don't delete queue and semaphore when stopping sniffer; add .gitignore; use same queue/task for MQTT and pcap writing; update sdkconfig for new esp-idf; add used esp-idf version as submodule 2026-03-17 19:59:27 +01:00
CMakeLists.txt Pull most of sdcard stuff out into sdcard.c; Common SPI init; Enable PSRAM; Start separating SD card stuff from SNIFFER_PCAP_DESTINATION_SD 2026-03-15 03:31:36 +01:00
partitions_8M.csv Add otadata partition 2026-03-16 10:55:01 +01:00
README.md Update readme 2026-04-29 17:57:11 +02:00
sdkconfig Update led_indicator component to fix compilation 2026-04-21 15:21:07 +02:00
sdkconfig.proto-enc28j60 Update led_indicator component to fix compilation 2026-04-21 15:21:07 +02:00
sdkconfig.proto-w5500 Update led_indicator component to fix compilation 2026-04-21 15:21:07 +02:00

ITS-G5 Receiver Firmware

Flashing a pre-compiled firmware

If you can't or don't want to build the firmware yourself, you can download the latest versions of the firmware, bootloader, and partition table .bin files, and then flash them with a command like the following:

esptool --chip esp32c5 -p /dev/ttyACM0 -b 921600 --before=default-reset --after=hard-reset write-flash --flash-mode dio --flash-freq 80m --flash-size 8MB 0x2000 bootloader_0.1.0.bin 0x8000 partition-table_8M_0.1.0.bin 0x20000 its-g5-receiver-firmware_i5r-r1_0.3.0.bin

This still requires the esp-idf for the esptool command. Make sure to replace the device name of the serial port with the one where the ESP is connected.

Cloning

git clone https://codeberg.org/opentrafficmap/its-g5-receiver-firmware.git
cd its-g5-receiver-firmware
git submodule update --init --recursive

ESP32-C5 Devboard

We recommend using our custom hardware, which can be found in this repo. However, you can also use a ESP32-C5-WIFI6-KIT devboard.

If you are using our custom hardware, you can skip this section.

If you are using the devboard, make the following connections from the Ethernet module (left) to the ESP32 devboard (right):

MOSI <-> GPIO7
MISO <-> GPIO2
SCLK <-> GPIO6
CS   <-> GPIO4
INT  <-> GPIO9

The ESP32-C5-WIFI6-KIT has a 100 nF capacitor on GPIO6, which will prevent the SPI communication from working. This can be solved by de-soldering the zero-ohm resistor to the right of the 5V pin (named R39 in the schematics). Alternatively, you can edit the sdkconfig to use a different pin.

Copy the correct sdkconfig file over the default one:

# For W5500
cp sdkconfig.proto-w5500 sdkconfig
# or alternatively, for ENC28J60:
cp sdkconfig.proto-enc28j60 sdkconfig

If you make any changes to the hardware/sdkconfig, make sure to set HW_VARIANT to custom in the sdkconfig, otherwise you may receive incompatible OTA updates if you connect to the official MQTT server.

Building

The install.sh script needs to be run once to install the ESP32 toolchain files:

esp-idf/install.sh

To enter the ESP-IDF environment, you need to source the export.sh script once per shell:

. esp-idf/export.sh

Afterwards, you can build the project:

idf.py build

To flash the firmware and monitor the output, you can use the following command:

idf.py -p /dev/ttyACM0 -b 921600 flash monitor -b 115200