linux-can.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Fwd: Loosing CAN messages with socket-CAN
       [not found] <OFFDCA8F9E.6364F5F1-ONC1257B42.00342754-C1257B42.003887D3@de.abb.com>
@ 2013-04-03 10:37 ` Marc Kleine-Budde
  2013-04-03 15:17   ` Marc Kleine-Budde
  0 siblings, 1 reply; 2+ messages in thread
From: Marc Kleine-Budde @ 2013-04-03 10:37 UTC (permalink / raw)
  To: linux-can@vger.kernel.org; +Cc: Jeroen Lammertink

[-- Attachment #1: Type: text/plain, Size: 2281 bytes --]

Hello Jeroen,

please use the linux-can Mailinglist, but don't post HTML mails there.

Marc

-------- Original Message --------
Subject: Loosing CAN messages with socket-CAN
Date: Wed, 3 Apr 2013 12:17:31 +0200
From: Jeroen Lammertink <jeroen.lammertink@nl.abb.com>
To: bet-frogger@users.berlios.de

Marc Kleine-Budde,

I hope you can put me in the right direction for the following problem: We
seem to loose CAN messages.

We are sending batches of 80 CAN messages using socket CAN to transfer an
image for download. After the 80 messages we wait for a response
consisting of a single CAN message. Within the messages we have coded a
sequence number, so that we can detect lost messages. Besides the CAN
device that is subject of download, we have also a (hardware) CAN sniffer
on the CAN bus. We typically log CAN messages when we put them in the
socket. With this set-up we typically detect loosing a short series of
(mostly 5) CAN messages, somewhere halfway the batch of 80. No other
devices are present on the CAN bus.

I've dumped below some version and set-up info of Ubuntu, socket-can and
ifconfig.

Is this problem known?
May this problem be related to using an old version of socket can?
How can I upgrade Ubuntu to the latest versions of socket-can?

Thanks in advance,

Jeroen Lammertink


bmterra@q7buntu:~/user/jla$ uname -a
Linux q7buntu 3.5.0-26-generic #42~precise1-Ubuntu SMP Mon Mar 11 22:19:42
UTC 2013 i686 i686 i386 GNU/Linux
bmterra@q7buntu:~/user/jla$ cat /proc/net/can/version
rev 20090105 abi 8
bmterra@q7buntu:~/user/jla$ ifconfig can0
can0      Link encap:UNSPEC  HWaddr
00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          UP RUNNING NOARP  MTU:16  Metric:1
          RX packets:1128 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4400 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1024
          RX bytes:9024 (9.0 KB)  TX bytes:34176 (34.1 KB)
          Interrupt:18


-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |




[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

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

* Re: Fwd: Loosing CAN messages with socket-CAN
  2013-04-03 10:37 ` Fwd: Loosing CAN messages with socket-CAN Marc Kleine-Budde
@ 2013-04-03 15:17   ` Marc Kleine-Budde
  0 siblings, 0 replies; 2+ messages in thread
From: Marc Kleine-Budde @ 2013-04-03 15:17 UTC (permalink / raw)
  To: linux-can@vger.kernel.org; +Cc: Jeroen Lammertink

[-- Attachment #1: Type: text/plain, Size: 2243 bytes --]

On 04/03/2013 12:37 PM, Marc Kleine-Budde wrote:
> We are sending batches of 80 CAN messages using socket CAN to transfer an
> image for download. After the 80 messages we wait for a response

Are you evaluating the return value of the write() or sendmsg() systemcall?

> consisting of a single CAN message. Within the messages we have coded a
> sequence number, so that we can detect lost messages. Besides the CAN
> device that is subject of download, we have also a (hardware) CAN sniffer
> on the CAN bus. We typically log CAN messages when we put them in the
> socket. With this set-up we typically detect loosing a short series of
> (mostly 5) CAN messages, somewhere halfway the batch of 80. No other
> devices are present on the CAN bus.
> 
> I've dumped below some version and set-up info of Ubuntu, socket-can and
> ifconfig.
> 
> Is this problem known?
> May this problem be related to using an old version of socket can?

This is either a userspace problem or a buggy driver. The driver problem
may have been fixed in the meantime.

> How can I upgrade Ubuntu to the latest versions of socket-can?

First we have to figure out what's brokoen.

> Thanks in advance,
> 
> Jeroen Lammertink
> 
> 
> bmterra@q7buntu:~/user/jla$ uname -a
> Linux q7buntu 3.5.0-26-generic #42~precise1-Ubuntu SMP Mon Mar 11 22:19:42
> UTC 2013 i686 i686 i386 GNU/Linux
> bmterra@q7buntu:~/user/jla$ cat /proc/net/can/version
> rev 20090105 abi 8
> bmterra@q7buntu:~/user/jla$ ifconfig can0
> can0      Link encap:UNSPEC  HWaddr
> 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
>           UP RUNNING NOARP  MTU:16  Metric:1
>           RX packets:1128 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:4400 errors:0 dropped:0 overruns:0 carrier:0
>           collisions:0 txqueuelen:1024
>           RX bytes:9024 (9.0 KB)  TX bytes:34176 (34.1 KB)
>           Interrupt:18

Which CAN hardware are you using?

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]

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

end of thread, other threads:[~2013-04-03 15:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <OFFDCA8F9E.6364F5F1-ONC1257B42.00342754-C1257B42.003887D3@de.abb.com>
2013-04-03 10:37 ` Fwd: Loosing CAN messages with socket-CAN Marc Kleine-Budde
2013-04-03 15:17   ` Marc Kleine-Budde

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).