How to use Vanetza on the cube:evk
Accelerate V2X development with open-source
Vanetza is an open-source implementation of the ETSI C-ITS protocol suite. With its clean and highly customizable design it enables developers and researchers around to world accessing V2X and its ETSI implementations.
Among others, it comprises the following protocols and features:
- GeoNetworking (GN)
- Basic Transport Protocol (BTP)
- Decentralized Congestion Control (DCC)
- Security
- Support for ASN.1 messages (Facilities) such as CAM and DENM
The cube:evk comes with native support for Vanetza and its socktap application. Socktap is an example application demonstrating API usage of Vanetza libraries, including support for our cube:evk.
Wireless Remote Radio Mode
To accelerate V2X and stack development we developed the wireless remote radio mode. With this mode you develop, debug and run Vanetza/socktap on your personal computer. There is no need to flash or transfer anything onto your cube:evk. Our integrated V2X module listens for requests whether from a local or remote application. The communication protocol between host and V2X module is covered in Google's Protobuf that is used in the respective link-layer implementation - both devices need to be pingable from each other only.
Configuration
Before building and running socktap you need to configure the V2X module and the WiFi once. Our v2xconfig tool on the cube:evk helps the user to select the desired radio technology, set the frequency and other respective options. Setting the radio to C-V2X and enabling it for auto-start can be done via:
cube> v2xconfig start enable cv2x
If you want to use DSRC simply enter:
cube> v2xconfig start enable dsrc
The wireless remote radio mode requires an active connection to its host. To connect the cube:evk to your local WiFi use the nmcli tool and get your ip afterwards:
cube> sudo nmcli dev wifi
connect
'<ssid>' password
'<password>'
cube> ip a
Building and Running Socktap
Build and run socktap directly on your personal computer (host), selecting cube-evk as link-layer. In order to provide the stack with GNSS data you can use our active gpsd daemon that is permanently running on the cube:evk and accessing the on-board u-blox module. The default u-blox module configuration activates sensor-fusion with the IMU using the selected station-type to improve GNSS accuracy and enabling dead reckoning. Now, its time to build and run socktap:
# build vanetza and socktap
host> mkdir build && cd build
host> cmake -DBUILD_SOCKTAP=ON -DSOCKTAP_WITH_CUBE_EVK=ON ..
# use fix (static) position data
host> ./bin/socktap -l cube-evk -p static --cube-ip
# use the u-blox module on the cube:evk for positioning data
host> ./bin/socktap -l cube-evk -p gpsd --gpsd-host
Once socktap is running, it will start sending and receiving CAMs. Since the cube:evk integrates a LTE module, we do field-tests, debugging and development from remote as well by connecting all our cube:evks into our VPN network. To build and run socktap on the cube:evk itself do:
# build vanetza and socktap
cube> mkdir build && cd build
cube> cmake -DBUILD_SOCKTAP=ON -DSOCKTAP_WITH_CUBE_EVK=ON ..
# use fix (static) position data
cube> ./bin/socktap -l cube-evk -p static
# use the u-blox module on the cube:evk for positioning data
cube> ./bin/socktap -l cube-evk -p gpsd --gpsd-host 127.0.0.1vk -p gpsd
--gpsd-host
The cube:evk is ideally suited for research, development and protopyting purposes. By supporting open-source tools and the option to develop and run applicationss remotely, we aim to accelerate V2X development. In our future article, we'll show how to build a simple collision detection V2X application using our ROS-centric framework on the cube:evk.
Happy coding!