USB2CAN

usb2can.jpg

candev.jpg

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

Install dfu-util from source.

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.

When upgrading omit the device ID because the firmware is for product id 0.

sudo dfu-util -D usb2can_1_7.dfu
dmesg
new full-speed USB device number 24 using dwc_otg
New USB device found, idVendor=0483, idProduct=1234, bcdDevice= 1.00
New USB device strings: Mfr=1, Product=2, SerialNumber=3
Product: USB2CAN converter
Manufacturer: edevices
SerialNumber: ED000200
usb_8dev can0: firmware: 1.7, hardware: 1.0

Resources

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies