* iso-tp: timeout handling for unknown packet size
@ 2013-10-23 13:32 Josselin Costanzi
2013-10-23 14:40 ` Nathan Conrad
0 siblings, 1 reply; 4+ messages in thread
From: Josselin Costanzi @ 2013-10-23 13:32 UTC (permalink / raw)
To: linux-can, Yannick Bedhomme
Hello,
We are working with the current implementation of ISO-TP from Oliver
Hartkopp available on github. The implementation works well for us
with a slight limitation that we would like to discuss here.
We use ISO-TP to talk to OBD ECUs. In this context, our userspace
opens an ISO-TP socket and sends an OBD-CAN request to the ECU and
waits for a response over ISO-TP. To be able to receive large frames
over ISO-TP or to account for transmitter having a large inter frame
delay, we have to use large timeout values so we don't close the
socket while the packet is still being received.
We would like to know if an ECU is responding or not without having to
wait several seconds for a hypotetical packet to be received, do you
have any idea how we could do that?
Thanks,
--
Josselin Costanzi
Embedded Linux System Engineer
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: iso-tp: timeout handling for unknown packet size
2013-10-23 13:32 iso-tp: timeout handling for unknown packet size Josselin Costanzi
@ 2013-10-23 14:40 ` Nathan Conrad
2013-10-23 16:00 ` Oliver Hartkopp
0 siblings, 1 reply; 4+ messages in thread
From: Nathan Conrad @ 2013-10-23 14:40 UTC (permalink / raw)
To: Josselin Costanzi; +Cc: linux-can, Yannick Bedhomme
You could also add a filter for the ISO-TP reception ID to a raw
protocol socket and monitor the reception of packets that way. Non
ISO-TP packets shouldn't be on that ID.
Nathan Conrad
On Wed, Oct 23, 2013 at 8:32 AM, Josselin Costanzi
<josselin.costanzi@mobile-devices.fr> wrote:
> Hello,
>
> We are working with the current implementation of ISO-TP from Oliver
> Hartkopp available on github. The implementation works well for us
> with a slight limitation that we would like to discuss here.
>
> We use ISO-TP to talk to OBD ECUs. In this context, our userspace
> opens an ISO-TP socket and sends an OBD-CAN request to the ECU and
> waits for a response over ISO-TP. To be able to receive large frames
> over ISO-TP or to account for transmitter having a large inter frame
> delay, we have to use large timeout values so we don't close the
> socket while the packet is still being received.
>
> We would like to know if an ECU is responding or not without having to
> wait several seconds for a hypotetical packet to be received, do you
> have any idea how we could do that?
>
> Thanks,
>
> --
> Josselin Costanzi
> Embedded Linux System Engineer
> --
> To unsubscribe from this list: send the line "unsubscribe linux-can" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: iso-tp: timeout handling for unknown packet size
2013-10-23 14:40 ` Nathan Conrad
@ 2013-10-23 16:00 ` Oliver Hartkopp
2013-10-23 16:50 ` Josselin Costanzi
0 siblings, 1 reply; 4+ messages in thread
From: Oliver Hartkopp @ 2013-10-23 16:00 UTC (permalink / raw)
To: Nathan Conrad; +Cc: Josselin Costanzi, linux-can, Yannick Bedhomme
On 23.10.2013 16:40, Nathan Conrad wrote:
> You could also add a filter for the ISO-TP reception ID to a raw
> protocol socket and monitor the reception of packets that way. Non
> ISO-TP packets shouldn't be on that ID.
>
> Nathan Conrad
Yes. This would be an idea.
You could also create a CAN_BCM socket to detect a timeout on a given CAN-ID.
See the BCM documentation(s) at
http://marc.info/?l=linux-can&m=138217795117288&w=2
or the tst-bcm-*.c examples at
https://gitorious.org/linux-can/can-tests/
With the BCM you can put the timeout handling completely into the kernel.
Regards,
Oliver
>
> On Wed, Oct 23, 2013 at 8:32 AM, Josselin Costanzi
> <josselin.costanzi@mobile-devices.fr> wrote:
>> Hello,
>>
>> We are working with the current implementation of ISO-TP from Oliver
>> Hartkopp available on github. The implementation works well for us
>> with a slight limitation that we would like to discuss here.
>>
>> We use ISO-TP to talk to OBD ECUs. In this context, our userspace
>> opens an ISO-TP socket and sends an OBD-CAN request to the ECU and
>> waits for a response over ISO-TP. To be able to receive large frames
>> over ISO-TP or to account for transmitter having a large inter frame
>> delay, we have to use large timeout values so we don't close the
>> socket while the packet is still being received.
>>
>> We would like to know if an ECU is responding or not without having to
>> wait several seconds for a hypotetical packet to be received, do you
>> have any idea how we could do that?
>>
>> Thanks,
>>
>> --
>> Josselin Costanzi
>> Embedded Linux System Engineer
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: iso-tp: timeout handling for unknown packet size
2013-10-23 16:00 ` Oliver Hartkopp
@ 2013-10-23 16:50 ` Josselin Costanzi
0 siblings, 0 replies; 4+ messages in thread
From: Josselin Costanzi @ 2013-10-23 16:50 UTC (permalink / raw)
To: Oliver Hartkopp; +Cc: Nathan Conrad, linux-can, Yannick Bedhomme
2013/10/23 Oliver Hartkopp <socketcan@hartkopp.net>:
> On 23.10.2013 16:40, Nathan Conrad wrote:
>> You could also add a filter for the ISO-TP reception ID to a raw
>> protocol socket and monitor the reception of packets that way. Non
>> ISO-TP packets shouldn't be on that ID.
We thought of that, the problem is we have to wake the process up by
receiving each frame if we don't only want to detect the presence of
an ECU but also if it's still responding or if there have been a
problem during transfer.
>> Nathan Conrad
>
> Yes. This would be an idea.
>
> You could also create a CAN_BCM socket to detect a timeout on a given CAN-ID.
That's a neat idea. We are not familiar with the broadcast manager but
we will look further into it.
> See the BCM documentation(s) at
>
> http://marc.info/?l=linux-can&m=138217795117288&w=2
>
> or the tst-bcm-*.c examples at
>
> https://gitorious.org/linux-can/can-tests/
Thanks
> With the BCM you can put the timeout handling completely into the kernel.
That's what we were hoping was possible.
Regards,
--
Josselin Costanzi
Embedded Linux System Engineer
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-10-23 16:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-23 13:32 iso-tp: timeout handling for unknown packet size Josselin Costanzi
2013-10-23 14:40 ` Nathan Conrad
2013-10-23 16:00 ` Oliver Hartkopp
2013-10-23 16:50 ` Josselin Costanzi
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.