Cannelloni UDP to JSON stream translator
To configure the parameters of the program you have to create a CONFIG.txt
file with the following parameters:
Canneelloni mode:
MODE=Cannelloni
PATH_DBC_CAN0=Path
PATH_DBC_CAN1=Path
UDP_PORT=5000
IP_SCANNER=8.8.8.8
CAN0_PORT=9600
CAN1_PORT=9601
Physical CAN mode:
MODE=PhysicalCAN
PATH_DBC_CAN0=Path
PATH_DBC_CAN1=Path
UDP_PORT=5000
CAN_SOCKET0=can0
CAN_SOCKET1=can1
The PATH_DBC_CAN0
and PATH_DBC_CAN1
parameters are the paths to the DBC files of the CAN0 and CAN1 buses respectively. The IP_SCANNER
parameter is the IP address of the scanner. The CAN0_PORT
and CAN1_PORT
parameters are the ports of the CAN0 and CAN1 buses respectively. The UDP_PORT
parameter is the port of the local UDP server. The CAN_SOCKET0
and CAN_SOCKET1
parameters are the names of the physical CAN0 and CAN1 sockets respectively (only supported in Linux).
It is possible to run the program directly from the command line (for example) with the following command:
./SerialToUdpTranslator-v2.8.2-Win-x64.exe --config ./CONFIG.txt --mode Cannelloni --nogui
#./NameOfTheExecutable --config ./CONFIG.txt --nogui
Where you can specify the path of the configuration file --config
-> CONFIG.txt
file (explained above), the functioning mode --mode
("Cannelloni" of "PhysicalCAN") and the --nogui
flag to run the program without the GUI.
This mode supports the input from physical can0
and can1
buses. You can select the bitrate and the DBC file for each bus. The output is a JSON stream that is sent to a UDP server.
pip install -r requirements.txt
python main.py
pyinstaller --name SCannerAdapter main.py --onefile --windowed
Simply run the script deploy.sh
with the version as argument.
chmod +x deploy.sh
./deploy.sh 1.0
Replace 1.0 with your version.
git add .
git commit -m "v1.0"
git tag -a v1.0 -m "Version 1.0"
git push origin master --tags
For a complete guide on how it works and how to publish a new release, check this repo.
- Python 3.12.2
- Tkinter
- Pyinstaller
- CannelloniPy
- Cannelloni
- Cantools
- PlotJuggler