Added CAN interface driver for low-cost CAN-Interfaces with ASCII protocol

via serial (or quasi serial via USB) lines.

This driver is partly derived from linux/net/driver/slip.c and uses a new
tty line discipline (N_SLCAN) analogue to N_SLIP to encapsulate can_frames
sent to a slc* netdevice for the serial line and vice versa.

As only the sending and receiving of can_frames is implemented, this driver
should work with the (serial/USB) CAN hardware from:
> www.canusb.com / www.can232.com / www.mictronic.com / www.canhack.de <

The sending and receiving frames format is pretty common. The other settings
and the 'open' command 'O' of the specific adapters may be set with a
terminal programm (like minicom) before switching the CAN data stream to
the slc* netdevice using the slcan_attach userspace tool.

Feel free to send patches / extensions to slcan.c / slcan_attach.c :)

ps. There had been no performances measurements until now. As long as the
data fit's through the 'serial' line it works obviously well. The slcan-driver
nor the Linux network layer will definitely have no problems to process
the received data. Remember the 'low-cost' hardware approach. We'll see ...
This commit is contained in:
Oliver Hartkopp
2007-02-22 12:47:37 +00:00
parent aca93c6867
commit 79cc51a867
2 changed files with 104 additions and 1 deletions
+2 -1
View File
@@ -43,7 +43,8 @@
CFLAGS = -O2 -Wall -Wno-parentheses -I../kernel/2.6/include \
-fno-strict-aliasing
PROGRAMS = candump cansniffer cansend canplayer cangen log2long log2asc asc2log
PROGRAMS = candump cansniffer cansend canplayer cangen\
log2long log2asc asc2log slcan_attach
all: $(PROGRAMS)