Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/northeastern-electric-racing/calypso
Configurable CAN-MQTT Gateway
https://github.com/northeastern-electric-racing/calypso
Last synced: 26 days ago
JSON representation
Configurable CAN-MQTT Gateway
- Host: GitHub
- URL: https://github.com/northeastern-electric-racing/calypso
- Owner: Northeastern-Electric-Racing
- Created: 2023-02-13T22:35:50.000Z (almost 2 years ago)
- Default Branch: Develop
- Last Pushed: 2025-01-12T23:26:11.000Z (27 days ago)
- Last Synced: 2025-01-13T00:21:15.446Z (27 days ago)
- Language: Rust
- Homepage:
- Size: 301 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Calypso
Custom CAN decoder to translate CAN messages to MQTT protobuf encoded packets with low latency and a YAML configuration structure.Usage: run `-h` to see the full usage options and defaults.
### Develop setup
#### Go to Settings in VSCode
search Rust-analyzer check and set the command from check -> clippy#### Open Settings.json
add following information:
```
"[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer",
"editor.formatOnSave": true
}
```To test it on linux, please install:
- mosquitto broker: https://mosquitto.org
- can-utils
- mqttui: https://github.com/EdJoPaTo/mqttui### Developing
Process for testing:
- run `mosquitto` and leave it open
- run `mqttui` and leave it open
- setup the can network:
- `sudo ip link add dev vcan0 type vcan`
- `sudo ip link set dev vcan0 up`run ```cargo run -- -u localhost:1883 -c vcan0```
To send a can message:
- `cansend vcan0 #`
Ex. `cansend vcan0 702#01010101FFFFFFFF`
Now view calypso interpret the can message and broadcast it on `mqttui`### Simulation Mode
#### Run from build
- Same setup as above, then use the entry point `simulate` instead of `main`
- ```cargo run --bin simulate```
- ```cargo run --bin simulate -- -u localhost:1883```#### Run from Docker
- ```docker pull ghcr.io/northeastern-electric-racing/calypso:Develop```
- ```docker run -d --rm --network host ghcr.io/northeastern-electric-racing/calypso:Develop```
- ```docker run -d --rm -e CALYPSO_SIREN_HOST_URL=127.0.0.1:1883 --network host ghcr.io/northeastern-electric-racing/calypso:Develop```### Generate Proto
#### linux
`apt-get install protobuf-compiler -y`#### mac
`brew install protobuf``cargo install protobuf-codegen`
`PATH="$HOME/.cargo/bin:$PATH"`
`protoc --rust_out ./src ./src/proto/serverdata.proto`
delete the `mod.rs` file