All of lore.kernel.org
 help / color / mirror / Atom feed
* ISOTP-implementation
@ 2012-09-21  8:58 Mahesh.Maharjan-EXT
  2012-09-25 19:44 ` ISOTP-implementation Oliver Hartkopp
  0 siblings, 1 reply; 4+ messages in thread
From: Mahesh.Maharjan-EXT @ 2012-09-21  8:58 UTC (permalink / raw)
  To: linux-can

hello

In socketCan implementation with ISOTP_can, I want to know few things. As 
far. ISOTP is point to point. But , as in BCM and RAW, Is it possible to 
create multiple sockets for ISO-TP ??
Or creating each socket with Message object for reading and writing

Now If I want to implement with ISOTP with InterProcess Com  system  !! . 
which might have multiple PDU.. Suppose , In receiving side , I might have 
single master PDU and multi Slave PDU .. So  what could be idea.. if I 
want to use Socketcan ISO-TP standard Socketcan. and  I check in isotp.c 
file., But could able to figure out , how it realize with Socket and 
ISO-TP standard.
regards,
Mahesh


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ISOTP-implementation
  2012-09-21  8:58 ISOTP-implementation Mahesh.Maharjan-EXT
@ 2012-09-25 19:44 ` Oliver Hartkopp
  0 siblings, 0 replies; 4+ messages in thread
From: Oliver Hartkopp @ 2012-09-25 19:44 UTC (permalink / raw)
  To: Mahesh.Maharjan-EXT; +Cc: linux-can

On 21.09.2012 10:58, Mahesh.Maharjan-EXT@continental-corporation.com wrote:

> In socketCan implementation with ISOTP_can, I want to know few things. As 
> far. ISOTP is point to point. But , as in BCM and RAW, Is it possible to 
> create multiple sockets for ISO-TP ??


You can open as much ISO-TP as you like.
Each ISO-TP socket should be bound to a different src-ID / dst-ID pair so that
they don't interfere.

> Or creating each socket with Message object for reading and writing


No. Once bound to a specific src/dst identifier, the connection is defined
properly. You can send and receive on that socket then.

See this example:

https://gitorious.org/linux-can/can-utils/blobs/master/isotptun.c


> Now If I want to implement with ISOTP with InterProcess Com  system  !! . 
> which might have multiple PDU..


One write() syscall -> one ISO-TP PDU is sent

One ISO-TP PDU is received -> one read() syscall get's the PDU


> Suppose , In receiving side , I might have 
> single master PDU and multi Slave PDU ..


???

The ISO-TP socket can only deal with point-to-point connections - due to the
two needed CAN Identifiers.

If you think about functional diagnosis requests: Use the raw socket to send
these requests that are fitting into one CAN frame ...

> So  what could be idea.. if I 
> want to use Socketcan ISO-TP standard Socketcan. and  I check in isotp.c 
> file., But could able to figure out , how it realize with Socket and 
> ISO-TP standard.


Did you read the source of all the ISO-TP tools?

https://gitorious.org/linux-can/can-utils/trees/master (isotp*.c)

And did you read this:

https://gitorious.org/linux-can/can-modules/blobs/master/README.isotp

??

Regards,
Oliver

^ permalink raw reply	[flat|nested] 4+ messages in thread

* ISOTP-implementation
@ 2012-10-02  8:33 Mahesh Maharjan
  2012-10-04 18:33 ` ISOTP-implementation Oliver Hartkopp
  0 siblings, 1 reply; 4+ messages in thread
From: Mahesh Maharjan @ 2012-10-02  8:33 UTC (permalink / raw)
  To: linux-can


Thank you Oliver providing me some guideline to use  ISO-TP socketCan for multiple socket. 
In my previous queries- I think, I could not able to describe my problem properly.
While working with RAW socket in Imx6, I was having problem with frame lost during the Tx. So, I was thinking to use multiple socket to minimise the lost of can frame in ISOTP also. 

Another important things about Point to Point(ISOTP), as you wrote me;
One write() syscall -> one ISO-TP PDU is sent

One ISO-TP PDU is received -> one read() syscall get's the PDU

Would you please provide some further guide line on it, whether I can use some acknowledge between read Or writing frames. So I would prefer to know get inform with complete  tranmsmission Complete or  Received Complete...


~Mahesh

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ISOTP-implementation
  2012-10-02  8:33 ISOTP-implementation Mahesh Maharjan
@ 2012-10-04 18:33 ` Oliver Hartkopp
  0 siblings, 0 replies; 4+ messages in thread
From: Oliver Hartkopp @ 2012-10-04 18:33 UTC (permalink / raw)
  To: Mahesh Maharjan; +Cc: linux-can

On 02.10.2012 10:33, Mahesh Maharjan wrote:

> 
> Thank you Oliver providing me some guideline to use  ISO-TP socketCan for multiple socket. 
> In my previous queries- I think, I could not able to describe my problem properly.
> While working with RAW socket in Imx6, I was having problem with frame lost during the Tx. So, I was thinking to use multiple socket to minimise the lost of can frame in ISOTP also. 


Can you be a bit more detailed please?

Frames usually do not get lost - unless the driver is faulty OR you did not
check the return values for the raw socket you've been using ??

> 
> Another important things about Point to Point(ISOTP), as you wrote me;
> One write() syscall -> one ISO-TP PDU is sent
> 
> One ISO-TP PDU is received -> one read() syscall get's the PDU
> 
> Would you please provide some further guide line on it, whether I can use some acknowledge between read Or writing frames. So I would prefer to know get inform with complete  tranmsmission Complete or  Received Complete...


ISO-TP is an unreliable datagramm protocol, like UDP/IP.

The PDU loss has therefore to be detected by a higher layer. E.g. the UDS
diagnosis service has it's own timeout for application message timeouts.

So send a ISO-TP PDU, assume it gone ok and wait for an application layer
answer (with timeout).

Did you follow this hint?
https://gitorious.org/linux-can/can-modules/blobs/master/README.isotp#line212

Regards,
Oliver

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-10-04 18:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-02  8:33 ISOTP-implementation Mahesh Maharjan
2012-10-04 18:33 ` ISOTP-implementation Oliver Hartkopp
  -- strict thread matches above, loose matches on Subject: below --
2012-09-21  8:58 ISOTP-implementation Mahesh.Maharjan-EXT
2012-09-25 19:44 ` ISOTP-implementation Oliver Hartkopp

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.