Commit Graph

277 Commits (e36391c7d976a4204f6245f9511dc3d23b7c0af4)

Author SHA1 Message Date
Oliver Hartkopp c8be6085a4 Removed sanity check for received slcan ASCII data
as this is done with ASCII comparision three lines above.
2009-01-21 07:38:18 +00:00
Oliver Hartkopp 9862da595d Added a proof of concept tool 'slcanpty' which
creates a pty for applications using the slcan ASCII protocol and
converts the data to a CAN network interface (and vice versa).

This can be used for existing applications to run on SocketCAN.
2009-01-20 23:06:01 +00:00
Oliver Hartkopp 4369ac1c55 Consistencely allow '-?' to get a help text. 2009-01-13 09:32:45 +00:00
Oliver Hartkopp 278ba6377d disable default receive filter on the write-only bridge socket. 2009-01-06 09:04:34 +00:00
Oliver Hartkopp 6104197c6a Fix sloppy CAN_(EFF|RTR)_FLAG handling in can_filter.can_mask .
Due to a wrong safety check in af_can.c it was not possible to filter 
for SFF frames with a specific CAN identifier without getting the 
same selected CAN identifier from a received EFF frame also.

This fix has a minimum impact on the CAN filter API as the 'sloppy' 
handling is still a correct (and possibly wanted?) use-case.

Please update the can-utils (especially candump) whose filter definition 
on the commandline made assumptions to correct the user input that are 
probably unwanted now.

Thanks to Kurt van Dijck for pointing at this issue!

Signed-Off-by: Oliver Hartkopp <oliver@hartkopp.net>
2008-12-01 07:24:18 +00:00
Oliver Hartkopp 450a058072 Fixed parse_canframe() with reordering the checks for the can_id
delimiter. Before this fix the function may have found delimiters in the 
string behind the terminating zero.
2008-11-28 21:50:24 +00:00
Oliver Hartkopp e7046e7fca Added interface name to parameter list in first line. 2008-11-17 10:23:42 +00:00
Oliver Hartkopp 4e41082935 Added Id keyword propertiy on new files. 2008-11-05 14:20:52 +00:00
Oliver Hartkopp f1d4ebbbba Added ISO 15765-2 CAN transport protocol for protocol family CAN.
Including some tools and coarse documentation README.isotp
2008-11-05 11:34:23 +00:00
Oliver Hartkopp 9b717158c6 Reworked slcan_attach to give slcan setup values directly on the commandline. 2008-11-04 10:47:09 +00:00
Oliver Hartkopp 265021e323 Print non-data stuff (errors, warnings, hints) on stderr. 2008-10-29 09:41:40 +00:00
Oliver Hartkopp 1be68bcc64 Added support for swapped byte order representation. 2008-10-29 09:23:48 +00:00
Oliver Hartkopp b5bc6349a9 Start candump in silent mode, when logging into a file. 2008-10-02 13:47:43 +00:00
Oliver Hartkopp afcac3462a The number for the SLCAN line discipline can not be found in
<linux/tty.h> anyway but needs to be written as module alias

tty-ldisc-17 slcan

So we remove the annoying #error output and use the correctly defined 
'17' from Kernel 2.6.25+ as default.
2008-09-17 13:02:49 +00:00
Oliver Hartkopp 4455308aa0 Added support for comments in logfiles.
Added some sanity checks and error messages.
2008-09-09 12:56:05 +00:00
Oliver Hartkopp 6c0ca36ab2 Create an informative error message when detecting a wrong line format. 2008-07-25 06:32:20 +00:00
Oliver Hartkopp 15ce202e60 Changed comment line recognition:
Everything without a '(' at the beginning of an input line is treated as comment.
Changed buffer size to allow long comment lines & added overflow handling.
2008-07-24 19:12:19 +00:00
Oliver Hartkopp ba037dcffa Support for comment lines in the logfile:
'#' at the beginning of a line marks comment lines.
2008-07-24 13:03:18 +00:00
Oliver Hartkopp 5621884558 Added missing help test. 2008-07-10 11:01:37 +00:00
Oliver Hartkopp f33075946d Added -f option to filter only on the CAN-ID and not on the content.
This can be useful when the timestamp cyle needs to be displayed.
2008-07-10 10:59:37 +00:00
Oliver Hartkopp af472581eb Do not allow to create error frame filters via standard filter sets. 2008-07-02 04:19:07 +00:00
Oliver Hartkopp f1c095d801 Added automatic extended frame format recognition.
Most SocketCAN userspace tools (like cansend) recognize the EFF by the 
stringlength of the given CAN-ID: 3 -> SFF , 8 -> EFF.
This was missing in the candump filter definition and therefore the 
values had to be specified with the CAN_EFF_FLAG set in the value, e.g.
92345678 for the extended CAN-ID 12345678 - this was not really nice.

Now the filtersets for extended frames can be specified as expected:
12345678:1FFFFFFF to filter for only 12345678 extended CAN-ID
000000AA:1FFFFFFF to filter for only AA extended CAN-ID.
2008-07-02 04:05:11 +00:00
Oliver Hartkopp 6410c22fd5 Added silent correction for can_dlc out of range. 2008-07-01 11:31:59 +00:00
Oliver Hartkopp 34703ac659 Fixed condition pointed out by Uwe Bonnes:
https://lists.berlios.de/pipermail/socketcan-core/2008-June/001625.html
2008-06-26 14:35:46 +00:00
Oliver Hartkopp e7d0db9f21 Fix typo. 2008-06-20 09:19:13 +00:00
Oliver Hartkopp 7a2544a169 Fix commandline parameter handling for fixed canframe.data[] . 2008-06-20 09:16:06 +00:00
Oliver Hartkopp ddbe7d9575 Introduced new functions:
unsigned char asc2nibble(char c);
int hexstring2candata(char *arg, struct can_frame *cf);
(see documentation in lib.h)
As prerequsite to fix the commandline interface of cangen.
2008-06-20 09:15:13 +00:00
Oliver Hartkopp 278344e5d5 fixed comment. 2008-06-11 16:38:00 +00:00
Oliver Hartkopp 4c7d5e434f Removed bad hacks in vcan.c and slcan_attach.c.
Giving some hints for users of older kernels than 2.6.25 that a 
compilation error is a normal behaviour in these cases.
2008-06-11 16:35:19 +00:00
Oliver Hartkopp 9cb4775283 Added Id properties that gone lost. 2008-06-03 08:52:06 +00:00
Oliver Hartkopp adbe6f9bee Whitespace fixes. Indented the code following Linux styleguide to fix
the mess between tabs and spaces.
2008-06-03 08:46:57 +00:00
Oliver Hartkopp 8a5c0365e6 Added binary output option to candump.c and sprint_long_canframe() in lib.c . 2008-06-02 20:06:37 +00:00
Oliver Hartkopp 789a021bb9 Added tiny tool to measure CAN busload. 2008-05-27 13:47:20 +00:00
Oliver Hartkopp 0df736ca51 Added hint about hexadecimal data representation. 2008-05-11 11:46:00 +00:00
Oliver Hartkopp 5769d708e4 Updated new 'cangen' and 'candump' in the trunk. 2008-05-05 12:20:34 +00:00
Oliver Hartkopp 770eeeaf23 Allow commandline option '-?' to print the help text. 2008-03-13 21:52:20 +00:00
Oliver Hartkopp 8891e44d28 Updated help text for commandline options. 2008-03-13 21:44:20 +00:00
Oliver Hartkopp ec4a0bcd6d Fixed the temporary hack to run with 2.6.24-rc5 again. 2007-12-23 18:17:29 +00:00
Oliver Hartkopp 5f164d3414 - allow timout to be zero, which means timeout is off. 2007-12-10 15:47:01 +00:00
Oliver Hartkopp 64f6a9a6d4 Added canlogserver programmed by Andre Naujoks. 2007-11-30 13:35:01 +00:00
Oliver Hartkopp e47a1b4b26 Changed color order at colorized output.
Remove index cache zombies when unloading CAN drivers.
Modified index cache failure message.
2007-11-20 18:37:30 +00:00
Oliver Hartkopp 12f9170338 Fixed checking of CAN interface name commandline parameter.
Cosmetics.
2007-10-07 14:39:52 +00:00
Oliver Hartkopp d72681c442 Reverted most of the changes since r500 except the changes in
drivers/net/can/* after discussion with Urs.
TODO: Documentation & new Version.
2007-10-01 05:48:50 +00:00
Oliver Hartkopp 6689e9600d Changed loopback to echo in CAN RAW sockets. The binary interface does
not change through this renaming of CAN_RAW_LOOPBACK to CAN_RAW_ECHO.
2007-09-30 13:00:42 +00:00
Oliver Hartkopp d0b24ffc10 Fixed contradiction in Sourcecode discalimer.
See details at
http://marc.info/?l=linux-netdev&m=119074747913703&w=2
2007-09-27 12:29:32 +00:00
Oliver Hartkopp 44fb4089c3 Update outdated comment. 2007-09-21 07:21:24 +00:00
Oliver Hartkopp 592c916948 Updated the canplayer to accept logfile timestamps in the future (which
is very nice when you don't have a RTC and your systemtime is somewhere 
in the 1970's :)
Added a new commandline option to skip timestamp jumps greater than x 
seconds to allow to concatenate different logfiles that replay 
constantly and not waiting for the absolute timestamp offsets.
2007-09-07 11:15:22 +00:00
Oliver Hartkopp e5de3cbeeb Removed "unused variable i" warning for the dry-run testing. 2007-08-03 11:17:10 +00:00
Oliver Hartkopp 8d365bc5b0 Added the blanking of 'old' data when the can_dlc decreases between two
receiptions of the same can_id.
Thanks to Andre Naujoks for the bug report.
2007-07-16 09:52:43 +00:00
Oliver Hartkopp 01a8c5d32b Added -B option to display binary content with a gap after each data byte.
This option is similar to -b but may exceed the 80 char boundary.
2007-07-16 08:29:28 +00:00