Its-g5: Difference between revisions

From RevSpace

No edit summary
(One intermediate revision by the same user not shown)
Line 24: Line 24:
You need credentials to access that data, it is not clear if it is feasible to hobbyist to access it.
You need credentials to access that data, it is not clear if it is feasible to hobbyist to access it.
Interesting project: https://github.com/idkmanLool9/Verkeerslicht
Interesting project: https://github.com/idkmanLool9/Verkeerslicht
== Design ==
The plan is:
* Use an esp32-c5 for sniffing 802.11p frames only
* Use an esp32-c3 (as an inexpensive jellybean part) for receiving sniffed frames from the esp32-c5, connect to WiFi and upload packets over MQTT
* The interface beteween the two boards is *serial*, this is simpler than SPI as used in other projects:
** Only three wires required: GND, +5V and serial DATA
** No need to desolder capacitors on SPI wires of the esp32-c5
** A serial interface is more universal, e.g. can be connected to an arbitrary linux SBC
** On the esp32-c5 use the same wires as the existing USB-UART bridge, so you can also receive packets over USB-serial
* Run a simple web server on the esp-c3:
** Configuration of MQTT credentials: host, port, user, pass, base topic
** Keeps a keystore for mqtts (if needed)
** Perhaps show some nice stats: connection status, packet rate, last packet, packets per type
** Perhaps run a very basic parser for e.g. CAM messages


== Hardware ==
== Hardware ==
Line 64: Line 79:


=== opentraffic map interface ===
=== opentraffic map interface ===
See https://github.com/MPW1412/openwrt-otm-bridge#wire-format-mimics-the-esp32-c5-firmware for the wire format.
See https://github.com/MPW1412/openwrt-otm-bridge#wire-format-mimics-the-esp32-c5-firmware for the mqtt wire format.

Revision as of 10:54, 22 June 2026

Project ITS-G5
Investigating ITS-G5 signals
Status In progress
Contact bertrik
Last Update 2026-06-22

Introduction

wireshark analysis

This page is about investigating reception and processing of so-called C-ITS or ITS-G5 signals (802.11p) as used in the Netherlands, see also https://en.wikipedia.org/wiki/Vehicle-to-everything These signals are exchanged between passenger cars, emergency vehicles, traffic lights and other traffic-related equipment.

An ESP32-C5 development board is capable of receiving WiFi in the 5 GHz band and can receive/sniff these kinds of packets from live traffic.

Stuff to investigate:

In the Netherlands, SPAT/MAPem messages from traffic lights are not transferred over wifi-p, but over UDAP. You need credentials to access that data, it is not clear if it is feasible to hobbyist to access it. Interesting project: https://github.com/idkmanLool9/Verkeerslicht

Design

The plan is:

  • Use an esp32-c5 for sniffing 802.11p frames only
  • Use an esp32-c3 (as an inexpensive jellybean part) for receiving sniffed frames from the esp32-c5, connect to WiFi and upload packets over MQTT
  • The interface beteween the two boards is *serial*, this is simpler than SPI as used in other projects:
    • Only three wires required: GND, +5V and serial DATA
    • No need to desolder capacitors on SPI wires of the esp32-c5
    • A serial interface is more universal, e.g. can be connected to an arbitrary linux SBC
    • On the esp32-c5 use the same wires as the existing USB-UART bridge, so you can also receive packets over USB-serial
  • Run a simple web server on the esp-c3:
    • Configuration of MQTT credentials: host, port, user, pass, base topic
    • Keeps a keystore for mqtts (if needed)
    • Perhaps show some nice stats: connection status, packet rate, last packet, packets per type
    • Perhaps run a very basic parser for e.g. CAM messages

Hardware

esp32-c5

I got this board, and it worked for me:

It has an onboard antenna. There are also other boards with an antenna connection, which allows using an external antenna. This may be better, I don't know yet.

Connect your USB-C cable to the "UART" port. It is connected to an actual USB-UART converter chip and always shows up, regardless of whether the ESP32 is in reset or not.

Software

See https://github.com/bertrik/its-g5-receiver

Compiling the firmware

Needs python.

Preparation:

  • If you didn't have a python venv, create it:
 python -m venv .venv
  • Activate the venv:
 bash source .venv/bin/activate
  • Install platformio into the venv:
 python pip install platformio

Compile and upload:

 pio run -t upload

Watch packets come in:

 pio device monitor

Packets are logged as a 'hexdump'.

The can be converted for wireshark, for example:

 text2pcap -l 105 message.txt message.pcap

Then viewed in wireshark:

 wireshark message.pcap

opentraffic map interface

See https://github.com/MPW1412/openwrt-otm-bridge#wire-format-mimics-the-esp32-c5-firmware for the mqtt wire format.