V2X FlexStack(R) Documentation
V2X FlexStack(R) is a dual-language open-source implementation of the European Telecommunications Standards Institute (ETSI) Cooperative Intelligent Transport Systems (C-ITS) Release 2 protocol stack.
Its objective is to facilitate and accelerate the development, testing, and real-world deployment of V2X applications across connected vehicles, Vulnerable Road Users (VRUs), and roadside infrastructure.
Dual-Language Architecture
V2X FlexStack provides two first-class implementations sharing identical wire protocol formats and architectural standards:
Research, Rapid Prototyping & Simulation
Execution: Reactive, callback-driven, non-blocking event loops
Codecs:
asn1tools(APER/UPER)Target: Algorithm experimentation, vehicle-to-cloud testing, laboratory simulations
Package:
pip install v2xflexstack
Performance, Embedded Hardware & In-Vehicle OBUs
Execution: Multi-threaded Actor model with
mpscchannelsCodecs:
rasnahead-of-time compiled codecsTarget: Cohda MK6 OBUs, Raspberry Pi RSUs, embedded aarch64 targets
Crate:
rustflexstack = "0.4.0"
Supported ETSI C-ITS Release 2 Suite
Facilities Layer: * Cooperative Awareness (CA) Basic Service (ETSI TS 103 900 V2.3.1) * Decentralized Environmental Notification (DEN) Service (ETSI TS 103 831 V2.3.1) * Vulnerable Road User (VRU) Awareness Service (ETSI TS 103 300-3) * Local Dynamic Map (LDM) (ETSI EN 302 895)
Transport Layer: Basic Transport Protocol BTP-A & BTP-B (ETSI EN 302 636-5-1)
Network Layer: GeoNetworking, all packet types, forwarding and Location Service (ETSI TS 103 836-4-1 V2.2.1)
Security & Trust: ETSI TS 103 097 V2.2.1 signing and verification, TS 102 941 V2.2.1 PKI client, TS 103 601
Congestion Control: Decentralized Congestion Control (DCC) Adaptive & Reactive (ETSI TS 102 687)
Unit tests of both implementations are traced to 380 of the 399 ETSI conformance test purposes: see Supported ETSI C-ITS Standards.
* Access Layer: Raw Ethernet (0x8947), IEEE 802.11p (ITS-G5), and Qualcomm C-V2X (3GPP PC5 Mode 4)
Research Paper Citation
V2X FlexStack is presented in the research paper (currently under evaluation):
J. Marias-i-Parella, D. Ulied, M. Codina, A. Pons, F. Vázquez-Gallego, and J. Casademont, “V2X FlexStack: A Flexible Open Source ETSI C-ITS Protocol Stack Implementation”, 2025. Available at SSRN: https://ssrn.com/abstract=7116984 (DOI: 10.2139/ssrn.7116984). See Academic Citation for BibTeX.
Research Projects & Funding Acknowledgements
The development of V2X FlexStack has been supported by several research and innovation projects:
CARAMEL (Grant Agreement No. 833611) – Funded under the Horizon 2020 programme, focusing on cybersecurity for connected and autonomous vehicles.
PLEDGER (Grant Agreement No. 871536) – A Horizon 2020 project aimed at edge computing solutions to improve performance and security.
CODECO (Grant Agreement No. 101092696) – A Horizon Europe initiative addressing cooperative and connected mobility.
PoDIUM (Grant Agreement No. 101069547) – Funded under the Horizon 2021 programme, this project focuses on accelerating the implementation of connected, cooperative and automated mobility technology.
CERTAIN (Grant Agreement No. 101203230) – Funded under the Horizon Europe call HORIZON-CL5-2024-D6-01-02 and focusing on harmonised safety validation, human-centric interaction, lifecycle assurance, trustworthy AI and connected V2X validation.
SPRINGTIME (PID2023-146378NB-I00) – Funded by the Spanish government (MCIU/AEI/10.13039/501100011033/FEDER/UE), this project focuses in techniques to get IP-based interconnection on multiple environments.
ONOFRE-3 (PID2020-112675RB-C43) – Funded by the Spanish government (MCIN/AEI/10.13039/501100011033), this project focuses on the adaptation of network and compute resources from the cloud to the far-edge.
SAVE-V2X (Grant Agreement No. ACE05322000044) – Focused on V2X communication for vulnerable road user safety, and funded by ACCIÓ.
See Research Projects & Grants for detailed grant descriptions and scopes.
Table of Contents
1. Overview & Architecture
2. Python (v2xflexstack)
- Python Quickstart (v2xflexstack)
- Python Concurrency & Architecture
- Python Link Layer Abstraction
- Python GeoNetworking (GN) Protocol
- Python Basic Transport Protocol (BTP)
- Python Security Subsystem
- Cooperative Awareness (CA) Basic Service
- Decentralized Environmental Notification (DEN) Service
- Vulnerable Road User (VRU) Awareness Service
- Local Dynamic Map
- Python Location & Time Utilities
- Python API Reference
3. Rust (rustflexstack)
- Rust Quickstart (rustflexstack)
- Rust Actor Architecture & Concurrency
- Rust Link Layer Drivers
- Rust GeoNetworking (GN) Router
- Rust Basic Transport Protocol (BTP)
- Rust Security Subsystem
- Rust Cooperative Awareness (CAM)
- Rust Decentralized Environmental (DENM)
- Rust VRU Awareness (VAM)
- Rust Local Dynamic Map (LDM)
- Cross-Compilation for Embedded Linux
- Embedded Qualcomm C-V2X (Cohda MK6 Deployment)
- Rust API Reference
4. Tutorials & Hardware Deployment
5. About & Community