Skip to content

xyzxyz0428/vam

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VAM C-ITS for PrioBike

This package is specifically designed to facilitate V2X (Vehicle-to-Everything) message communication using the Cohda Wireless SDK. The data flow process within this system is structured as follow. The stability of data transmission requires additional validation.

Alt text

Scripts Preparation

Cohda SDK

The Latest SDK containing both MK5 (DSRC), MK6C (C-V2X), MK6 (DSRC + C-V2X) and x64 software is found in Releases_SDK_and_MKx_2023->SDK. You could find official tutorials for Installing and configuring the MKx SDK in VM and Building MKx Image using SDK and adding Libraries

Share Folder

  • set the share folder path on workstation player: VM properties-> options-> sharefolder
  • make share folder visiable and available, run
vmware-hgfsclient
sudo vmhgfs-fuse .host:/ /mnt/hgfs  -o nonempty -o allow_other
  • get access to share folder
cd /mnt/hgfs

Network Configuration

  • networkadapter1: connected NAT
  • networkcadapter2: connected bridge: host adapter: realtake USB gbE famliy controller

Cohda Implementation with VAM Message

The original SDK provides a VM with the EclipseIDE as a development environment.

File Preparation for RSU

  • VAM message structure is defined in /RSU_mk5/RAW.asn1
  • Custom payload is generated in /RSU_mk5/rawits.c with header file /RSU_mk5/rawits.h. The custom payload is PER-encoded data generated from the RAW.asn1 file. This is achieved by using the ASN1C compiler to generate C code from ASN.1, which implements the encoders and decoders and provides the structure of the message to populate. Apart from this, this file includes a UDP server to receive externe data from file /vam_client/Windows/VAMinput.py

please overwrite these three files under home/duser/mk5/stack/apps/exampleETSI/src.

File Preparation for OBU

  • VAM message structure is defined in /OBU_mk5/RAW.asn1, Both units employ identical VAM structures for both decoding and encoding.
  • VAM message can be received in /OBU_mk5/rawits.c with header file /RSU_mk5/rawits.h. This file includes a UDP client to send received data out for further analysis and visualisation.

please overwrite these three files under home/duser/mk6/stack/apps/exampleETSI/src.

Build

please replace "mk6" with "mk5" when using mk6.

cd ~/mk5/stack/apps/exampleETSI`
make mk5` (compiling)
make mk5-tarball

you can use winscp or command

scp -6 exampleETSI-mk5-Exported.tgz user@\[<ip%interface>\]:/tmp` 

to copy /home/duser/mk6/stack/apps/exampleETSI/exampleETSI-mk5-Exported.tgz to cohda model. user name & PW: user

Run scripts

Run UDP client script

VAMinput.py can receive test Priobike data from backend through MQTT and send it to RSU thorugh UDP.

python VAMinput.py

Start Cohda

  1. SSH or PuTTY

mk5: fe80::6e5:48ff:fe20:5a88% 141.30.187.201 mk6: fe80::6e5:48ff:fe50:01A0% 192.168.10.2 interface can be checked with ipconfig in Windows and ifconfig in Linux

  1. unzipping uploaded exampleETSI-mk5-Exported.tgz
sudo tar xzfv /tmp/exampleETSI-mk5-Exported.tgz -C /mnt/rw
  1. check GPS connection.
gpspipe -r
  1. start GPS connection.
/mnt/rw/exampleETSI/rc.exampleETSI start raw
  1. shutdown.
/mnt/rw/exampleETSI/rc.exampleETSI stop raw

Run UDP Server Script

This file vam_server/udpmappiong.py involves UDP server to exact data from OBU units and using PyQt5 to display and dynamically update a real-time map in a GUI window. Internet is neccessary for map loading.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published