8devices Korlan USB2CAN User Manual - Page 8

Browse online or download pdf User Manual for USB Interfaces 8devices Korlan USB2CAN. 8devices Korlan USB2CAN 17 pages. High quality isolated usb to can interface
Also for 8devices Korlan USB2CAN: User Manual (15 pages)

8devices Korlan USB2CAN User Manual

3. Work on Linux

3.1 Driver and configuration

The Korlan USB2CAN converter is supported by mainline Linux since version 3.9. It works with Linux
distributions like Ubuntu and Debian with no additional driver installation. For older version driver must be
built manually.
Recommended Linux distributions:
Ubuntu 14.04 or newer
Debian 8 (Jessie) or newer
If the driver is correctly loaded, CAN interface should be seen when issuing the command sudo ip link.
Set can0 interface speed to 125 Kbps:
sudo ip link set can0 up type can bitrate 125000 sample-point 0.875
Set to can0 to "steady" state (steady green led):
sudo ip link set can0 up
To bring down interface (steady red led):
sudo ip link set can0 down
To get more information about configuration options type:
sudo ip link set can0 type can help
3.2 Tools- can-utils (send/receive CAN packets)
The programs allow to get CAN communications instantly using two commands "cansend" and "candump".
Command to install tool:
sudo apt-get install can-utils
Send byte of information (0102030405060708) to can device with id = "01010101":
cansend can0 01010101#0102030405060708
Receive everything on can0 interface:
candump can0
3.3 Tools- dfu-util (USB2CAN Firmware upgrade)
For dfu-util tool is recommended for USB2CAN firmware upgrade. The tool is used to upload firmware from PC to
device over USB. The tool is available for download on 8devices WEB page.
USB2CAN
User Guide
8