The following tutorial is made for Raspberry Pi running the Raspbian operating system.
1. Ensure your Rasberry has network connectivity and install the following prerequisite packages:
sudo apt-get update sudo apt-get install git raspberrypi-kernel raspberrypi-kernel-headers can-utils
2. Clone USB2CAN driver repository:
git clone https://github.com/krumboeck/usb2can.git cd usb2can
3. Compile and install the driver:
sudo make && sudo make install
4. Reboot host device
sudo reboot
5. The can0 interface should now be available. You can test the adapter with these commands:
sudo ip link set can0 type can bitrate 125000 sudo ip link set can0 up
The LED on USB2CAN will turn green once interface is brought up.