Custom CAN decoder to translate CAN messages to MQTT protobuf encoded packets with low latency and a JSON configuration structure.
Foll developer guide here: https://nerdocs.atlassian.net/wiki/spaces/NER/pages/1815773187/Calypso+and+Odyssey+Definitions+Guide
Usage: run -h to see the full usage options and defaults.
To test it on linux, please install:
- mosquitto broker: https://mosquitto.org
- can-utils
- mqttui: https://github.com/EdJoPaTo/mqttui
Process for testing:
- run
mosquittoand leave it open - run
mqttui(from here) and leave it open - setup the can network:
sudo ip link add dev vcan0 type vcansudo ip link set dev vcan0 up
run cargo run -- -u localhost:1883 -c vcan0
To send a CAN message:
cansend vcan0 <ID_IN_HEX>#<PAYLOAD_IN_HEX>Ex.cansend vcan0 702#01010101FFFFFFFF
Now view calypso interpret the can message and broadcast it onmqttui
- Same setup as above, then use the entry point
simulateinstead ofmain cargo run --bin simulatecargo run --bin simulate -- -u localhost:1883
docker pull ghcr.io/northeastern-electric-racing/calypso:Developdocker run -d --rm --network host ghcr.io/northeastern-electric-racing/calypso:Developdocker run -d --rm -e CALYPSO_SIREN_HOST_URL=127.0.0.1:1883 --network host ghcr.io/northeastern-electric-racing/calypso:Develop