CAN Adapters
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:
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:
Author: Support
Revision: 1.1
You cannot comment on this entry