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>
- 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>
When CAN_ISOTP_SF_BROADCAST is set in the CAN_ISOTP_OPTS flags the
CAN_ISOTP socket is switched into functional addressing mode, where
only single frame (SF) protocol data units can be send on the specified
CAN interface and the given tp.tx_id after bind().
Add the CAN_ISOTP_SF_BROADCAST define from Linux UAPI includes.
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
With the new flag 'CAN_ISOTP_WAIT_TX_DONE' the send()/write() syscall returns
when the PDU is completely passed to the CAN netdevice queue. Depending on
STmin and other settings for the tx-queue-len this does not necessarily mean
that the PDU has been completely sent on the CAN interface at that time.
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
As requested by Laurent Vaudoit the extended address can be different in the
tx and he rx path:
(..) how can i have a segmented transfer like this:
0x6a7 0x55 0x10 0x08 ........
0x687 0xAA 0x30 0x00 0x00
0x6a7 0x55 0x21 .....
The connection i need is between two ECU, using IDs 0x6a7/687 and one has
adress extension 0x55, the other 0xAA (this adressing method is used on some
FIAT ECUs for example).
http://marc.info/?l=linux-can&m=140354647413513&w=2
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
This makes it possible to import header from the kernel more easily, e.g.:
cd $path_to_linux_repo
make headers_install
rsync -a --exclude .\* usr/include/linux/can* $path_to_can_utils/include/linux
[mkl: also move isotp.h although Uwe skipped it as it is not
part of the upstream kernel; adapt commit log accordingly]
Acked-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>