Added the '-b' command line option, to be used in conjunction with the '-d'
option that enables CAN FD, to set the BRS bit in a CAN FD frame. When
enabled, the data part of the CAN FD frame is transmitted at a higher speed.
All remaining parts of the CAN FD frame use the classic CAN speed.
Signed-off-by: RICCIARDI-Adrien <adrien.ricciardi@hotmail.fr>
Add the '-d' command line option that allow to transmit CAN FD frames instead
of CAN 2.0 frames. The frames content is the same.
This allows to stress test the flexible data rate part of a CAN FD network.
Signed-off-by: RICCIARDI-Adrien <adrien.ricciardi@hotmail.fr>
Usually the ISO 15765-2 protocol is a point-to-point protocol to transfer
segmented PDUs to a dedicated receiver. This receiver sends a flow control
message to specify protocol options and timings (e.g. block size / STmin).
The so called functional addressing communication allows a 1:N
communication but is limited to a single frame length.
The new CAN_ISOTP_CF_BROADCAST flag introduced in Linux 5.19 allows an
unconfirmed 1:N communication with PDU lengths that would not fit into a
single frame. This feature is not covered by the ISO 15765-2 standard.
The isotpsend tool gets a new option '-C' to enable this unconfirmed 1:N
communication by setting the CAN_ISOTP_CF_BROADCAST flag.
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
In commit 6799180bd0 ("log asc converter: support len8_dlc for Classical
CAN frames") the len8_dlc support was accidentally only implemented for
the new CANFD asc format. This patch adds len8_dlc support for the 'old'
Classical CAN asc format which in fact always supported len8_dlc.
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
We need to check for different sscanf() failures and the number of read
items in the data frames. So move the simple check to the beginning.
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
check_frame has a return value. Make use of this in can_echo_dut which
then is evaluated and returned thereof in main()
Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
Since commit ad250a68dc ("candump: add option to define individual
filename for logfile") the option "-f <fname>" allows to define an
individual filename for a logfile.
Usually the "-" is used as filename to represent stdout or stdin on
Linux/Posix systems to be able to concatenate several applications via
pipes. This patch handles this special case by detecting the filename
"-" to print the logfile format on stdout instead of creating a logfile
with the name "-".
Fixes: ad250a68dc ("candump: add option to define individual filename for logfile")
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
- update isotp.h include file
- update maximum PDU (buffer) size to 64kByte buffer
- support setting of N_As (frame_txtime) to zero
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
With the option '-T <msecs>' candump terminates after getting no CAN traffic
for a specific time. With the introduction of epoll_wait() this feature
has been accidentally disabled.
This patch adds an extra check to detect the timeout again.
Fixes: 639498bc80 ("candump: use epoll_wait() instead of select()")
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
The poll function return -1 on error and set errno to indicate the
error.
Signed-off-by: Stefan Herbrechtsmeier <stefan.herbrechtsmeier@weidmueller.com>