From: Oliver Hartkopp <socketcan@hartkopp.net>
To: Tobias Schmitt <tobias.schmitt@codm.de>
Cc: linux-can@vger.kernel.org
Subject: Re: State of ISO-TP in SocketCAN?
Date: Thu, 23 Jul 2015 20:29:17 +0200 [thread overview]
Message-ID: <55B1327D.10507@hartkopp.net> (raw)
In-Reply-To: <1689D99C-35FD-4CC4-ADDB-375F1B6F7ACC@codm.de>
Hi Tobias,
On 23.07.2015 20:02, Tobias Schmitt wrote:
> But I have one more question: I tested a lot with socketcand and the isotp utilities in can-utils today. In all of the programs you have to define the source and destination IDs on the can bus very static.
> In our application we use extended adressing, the master device on CAN has a specific id (0x00) and has to listen to the slave devices (which need to have different IDs for adressing).
>
> So I either need to open a socket for every slave device, or in case of possible wildcards the program call could be:
>
> ./isotprecv -s * -d 0 -x 0:**
>
> Is there any possibility to use the SocketCAN isotp protocol the "wildcard"-way I intend? I could also pass the information about the sender device into the payload of the isotp message. But why is there extended adressing then?
No, intentionally not.
Whenever you have a transport protocol channel for segmented PDUs you have to
provide two CAN-IDs to match FF/CF and FC messages on the 'virtual channel' on
the bus.
The extended addressing is just some kind of 'extension for the CAN-ID'.
E.g. If you would have a wildcard, to what address should you send the FC
then? You would need to implement some connection tracking - even when you are
communicating simultaneously to different nodes.
The functional addressing does not need segmentation, so you can create and
send functional PDUs by 'handmade' ISO-TP CAN frames via CAN_RAW sockets.
When your application needs to 'listen' on several transport channels you may
create as much sockets as you need and read from them simultaneously e.g. with
the select() syscall.
Does that help for your use-case? Can you tell about your use-case?
Regards,
Oliver
next prev parent reply other threads:[~2015-07-23 18:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-22 9:45 State of ISO-TP in SocketCAN? Tobias Schmitt
2015-07-22 18:25 ` Oliver Hartkopp
2015-07-23 18:02 ` Tobias Schmitt
2015-07-23 18:29 ` Oliver Hartkopp [this message]
2015-07-25 15:11 ` Tobias Schmitt
2015-07-27 17:40 ` Oliver Hartkopp
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55B1327D.10507@hartkopp.net \
--to=socketcan@hartkopp.net \
--cc=linux-can@vger.kernel.org \
--cc=tobias.schmitt@codm.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.