This is an old revision of the document!
USB2CAN
Install
To install the driver you must build the kernel module
It can be found in
Networking Support -> CAN bus subsystem support -> CAN Device Drivers -> CAN USB interfaces -> <M> 8 devices USB2CAN interface
lsusb
Bus 001 Device 015: ID 0483:1234 STMicroelectronics USB2CAN converter
dmesg
CAN device driver interface can0: firmware: 1.5, hardware: 1.0 usbcore: registered new interface driver usb_8dev
Configure
modprobe usb_8dev ip link set can0 up type can bitrate 250000 ip link set can0 txqueuelen 1024 ip -s -d link show can0
Termination
There is no termination resistor in the USB2CAN and 120 ohms can be placed within the female plug housing between CANH and CANL.
Test
apt install can-utils
Host 1
candump can0
Host 2
cansend can0 123#DEADBEEF cangen can0
Pinout
DB9 male socket
1 2 3 4 5 6 7 8 9 STANDARD 2 CAN L 3 GND 6 GND 7 CAN H
Upgrade
dfu-util
dfu-util -V dfu-util 0.11-dev
Flash
Hold down button with a paper clip, or more easily prise open case and press the button with a thumb and insert device in usb port.
sudo dfu-util -a 0 -D usb2can_1_7.dfu
dmesg
usb 1-1.5.1: new full-speed USB device number 24 using dwc_otg usb 1-1.5.1: New USB device found, idVendor=0483, idProduct=1234, bcdDevice= 1.00 usb 1-1.5.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-1.5.1: Product: USB2CAN converter usb 1-1.5.1: Manufacturer: edevices usb 1-1.5.1: SerialNumber: ED000200 usb_8dev 1-1.5.1:1.0 can0: firmware: 1.7, hardware: 1.0