Wiznet makers

lawrence

Published May 31, 2026 ©

152 UCC

9 WCC

33 VAR

0 Contests

0 Followers

0 Following

Original Link

v2x2map

V2X2MAP is an open-source receiver and live map for ITS-G5 / V2X traffic — the 5.9 GHz IEEE 802.11p messages that cars and roadside infrastructure broadcast to

COMPONENTS
PROJECT DESCRIPTION

V2X2MAP — A $20 ESP32-C5 V2X Receiver That Leans on the W5500 for Its Network Backhaul

 

What is V2X / ITS-G5, and why capture it?

Modern vehicles and roadside units (RSUs) talk to each other over a dedicated 5.9 GHz band using IEEE 802.11p, the physical layer underneath the European ITS-G5 / C-ITS family of standards. The traffic is made up of standardized safety messages:

  • CAM (Cooperative Awareness) — "I'm here, heading this way at X km/h"
  • DENM (Decentralised Environmental Notification) — "hazard ahead"
  • SPATEM (Signal Phase and Timing) — traffic-light phase + countdown
  • MAPEM — intersection geometry

These messages are broadcast in the clear, which means a receiver can listen passively and reconstruct a live picture of nearby traffic infrastructure. V2X2MAP does exactly that with hardware that costs about the price of a few coffees.

The project in one diagram

+---------------+     5.9 GHz 802.11p      +------------+
|  Vehicles &   |   CAM / DENM / SPATEM    |  ESP32-C5  |
|  RSUs         |  ----------------------> |  sniffer   |
+---------------+                          +-----+------+
                                                |
                      +-------------------------+--------------------------+
                      |                  |                  |              |
                 USB / BLE          W5500 Ethernet      SD card        (events)
                      |                  |                  |
                      v                  v                  v
               Android app        MQTT broker          PCAP file
               (local map)   (OpenTrafficMap / your own)  (Wireshark)

A single captured frame is fanned out to several destinations at once. The local path (USB serial or BLE) feeds an Android app that draws the messages on a map; the network path publishes the raw frames over MQTT; and an optional SD-card path records standard .pcap files you can open directly in Wireshark.

How the data is collected: promiscuous mode

A network MAC normally drops any frame that isn't addressed to it. Promiscuous mode disables that hardware filter, so every frame on the medium is handed up to software regardless of its destination address. That is the whole trick behind any sniffer: V2X frames are not addressed to your board, so without promiscuous mode you would see nothing.

V2X2MAP enables promiscuous capture on two interfaces:

  1. Wi-Fi (the primary path). The firmware puts the ESP32-C5 radio into promiscuous mode and flips the PHY into 802.11p mode, then registers a receive callback for every captured frame.
  2. Ethernet (optional). The same firmware can also put the Ethernet controller into promiscuous mode to capture wired frames — useful when V2X data arrives over a wired link from an ITS station.

Each captured frame is timestamped, queued, and processed by a single worker task that distributes it to the PCAP writer, the MQTT publisher, and the USB/BLE streamers.

Where the W5500 comes in — and why it's essential, not optional

This is the part most interesting to the WIZnet community. At first glance you might ask: the ESP32-C5 already has Wi-Fi — why bolt on a wired Ethernet chip at all?

The answer is a hard radio constraint. Once the firmware switches the PHY into 802.11p mode for sniffing, the radio can no longer act as a normal 2.4 GHz Wi-Fi station — ordinary scanning and association break. The single radio is now fully committed to listening for V2X. So if you want the node to reach the internet (to upload what it captures), you need a second, independent network interface.

That is exactly the role the WIZnet W5500 plays here. It is wired to the ESP32-C5 over SPI and brought up as a standard Ethernet interface, giving the node a wired uplink that is completely independent of the busy radio. With it, the device becomes a self-contained, mains-powered node: plug in power and an Ethernet cable, and it captures V2X traffic and forwards it 24/7 — no phone, no Wi-Fi, no babysitting.

In this design the W5500 actually wears two hats:

  • Network backhaul (the main job). The W5500 obtains an IP (DHCP or a static address configured in NVS) and carries the MQTT stream out to the broker. The firmware brings it up through the ESP-IDF Ethernet driver and runs the lwIP stack on top, which is what gives the node DHCP, DNS, and MQTT-over-TLS.
  • A second capture source (optional). Because the same firmware supports Ethernet promiscuous capture, the W5500 can double as a wired sniffing input for setups where V2X messages are delivered over cable.

A nice detail worth calling out for makers: this project drives the W5500 as a plain SPI MAC+PHY under lwIP, i.e. with the hardwired TCP/IP offload (TOE) bypassed. That choice trades a little CPU for maximum flexibility — a full software stack (TLS, DHCP, DNS, arbitrary socket count) plus the ability to put the interface into promiscuous mode, which the hardwired stack alone wouldn't allow. For a fleet of always-on uploader nodes this is a sensible balance, and it's a good reminder that the W5500 is just as happy serving as a clean, reliable 10/100 MAC+PHY as it is doing full hardwired TCP/IP.

Quick W5500 facts

The W5500 is a hardwired TCP/IP Ethernet controller integrating a 10/100 MAC and PHY, an internal 32 KB TX/RX buffer, and 8 independent hardware sockets, driven over SPI at up to 80 MHz. Even when you skip the hardwired stack (as here) and run it in MACRAW mode under your own software stack, you still get a complete, low-pin-count wired-Ethernet front end for any MCU.

How the collected data is used: the OpenTrafficMap ecosystem

The network path doesn't just dump data into a file. V2X2MAP publishes raw captured frames over MQTT to a broker under a per-node topic (its/<node-id>/packet), and the default broker is the central server of the OpenTrafficMap project (mqtts://cits1.opentrafficmap.org, TLS-secured). You can of course point it at your own broker instead.

OpenTrafficMap is the upstream project this firmware is forked from — an open, community effort (based in Graz, Austria) that aggregates messages from many distributed receivers and renders them as a live web map at opentrafficmap.org. On that map you can see detected traffic lights, RSUs, intersection geometry, DENM hazards, and moving objects (vehicles, buses, trams) in real time. Click a traffic light and the server even shows per-lane signal groups with predicted phase timing (likely / earliest / latest switch times) derived from the accumulated SPATEM data.

The same MQTT connection is bidirectional: nodes also publish status, node info, and statistics, and subscribe to a command topic so the server can manage the receiver fleet remotely. In other words, the W5500-backed Ethernet link is what makes both the data upload and the remote management of each node possible.

Building one

Hardware

  • Waveshare ESP32-C5-WIFI6-KIT dev board (the C5 supports 5.9 GHz 802.11p out of the box)
  • A WIZnet W5500 Ethernet module (an ENC28J60 variant is also supported, but the W5500 is the recommended path)
  • An Android phone for the optional live-map app

The firmware runs this SPI link at 16 MHz by default.

A real-world gotcha worth knowing. The ESP32-C5-WIFI6-KIT ships with a 100 nF capacitor on GPIO6, which prevents SPI from working on that pin. The fix is to desolder the zero-ohm resistor next to the 5V pin (labeled R39 in the board schematic), or to remap the SPI clock to a different pin in sdkconfig. This is the kind of hardware footnote that saves a maker an evening of debugging.

Firmware (ESP-IDF)

# choose the Ethernet controller variant cp sdkconfig.proto-w5500 sdkconfig     # for the WIZnet W5500 # or:  cp sdkconfig.proto-enc28j60 sdkconfig  idf.py build
idf.py -p COMx -b 921600 flash

On Windows there is also a one-click installer that detects the board, flashes the firmware, and pre-fills the Node-ID from the chip's MAC — handy if you'd rather not set up the full toolchain.

Credits & links

V2X2MAP stands on the shoulders of the OpenTrafficMap team. The original ESP32-C5 C-ITS receiver firmware and the central map server are their work; the firmware is released under the MIT License.

  • Upstream firmware (OpenTrafficMap, Codeberg): https://codeberg.org/opentrafficmap/its-g5-receiver-firmware
  • Upstream hardware (OpenTrafficMap, Codeberg): https://codeberg.org/opentrafficmap/its-g5-receiver
  • Live map: https://opentrafficmap.org
  • V2X2MAP fork by Peter Holzhauser (pit711) — adds the Waveshare ESP32-C5-WIFI6-KIT port, BLE streaming, the Android app, and the Windows installer: https://github.com/pit711/v2x2map
Documents
Comments Write