Skip to content

A bridge for relaying CAN bus frames to a front-end web application using websockets.

License

Notifications You must be signed in to change notification settings

willzhang05/can-websocket-bridge

Repository files navigation

can-websocket-bridge

The following instructions are mostly Arch Linux focused

Building

  • Install rust and the cargo package manager
  • Run cargo build to build the binary

Cross Compilation for ARM

Testing Information

Hardware

  • Raspberry Pi 4 Model B 4GB or Raspberry Pi 3 Model B/B+
  • Copperhill Tech PiCAN FD Shield

Software

  • Arch Linux ARM
  • To set up a virtual CAN interface for testing, run ./setup_vcan.sh as root or sudo ./setup_vcan.sh.
  • To generate CAN bus traffic for testing, use the cangen utility included in can-utils
  • Example command for generating frames with a gap of 500ms, a set ID of 1, and data payload of fixed length 8: cangen vcan0 -g 500 -I 1 -L 8
  • The static files can be served through many different means
    • an easy way to do this is to use python3 -m http.server
    • install the Node.js reference http server npm install -g http-server and run with ./start_webserver.sh

About

A bridge for relaying CAN bus frames to a front-end web application using websockets.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published