CAN Adapters

ID #1070

Can I use SocketCAN with VSCAN devices?

Yes, it is possible. As of Linux kernel 2.6.38 ASCII protocol (slcan) will be also supported. To use it you’ll first need to install can-utils from project’s git repository. See this tutorial for installation instructions.

For older kernels you can use following patches from main line kernel.


For USB CAN device,  that is attached to /dev/ttyUSB0 device,  execute following commands:

slcand -o -s8 -t hw -S 3000000 /dev/ttyUSB0

ip link set up slcan0

You’ll get your USB CAN operated at 1MBit/s, with candump and cansend you can make first send/receive tests.


For Network CAN devices (NetCAN Plus) you’ll first need to create a symbolic link to it via socat. Assume your NetCAN Plus has IP address 192.168.254.254, and standard port 2001 for TCP Raw Server Mode. So the required commands are:
socat pty,link=/dev/netcan0,raw tcp:192.168.254.254:2001&
slcand -o -s8 /dev/netcan0
ip link set up slcan0

Tags: -

Related entries:

Last update: 2016-03-03 15:03
Author: Support
Revision: 1.1

Digg it! Print this record Send to a friend Show this as PDF file
Please rate this entry:

Average rating: 3 out of 5 (9 Votes )

completely useless 1 2 3 4 5 most valuable

You cannot comment on this entry