All of lore.kernel.org
 help / color / mirror / Atom feed
* certain CAN frames not being read ok
@ 2012-05-22  0:37 Michael Economides
  2012-05-22 16:56 ` Wolfgang Grandegger
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Economides @ 2012-05-22  0:37 UTC (permalink / raw)
  To: Oliver Hartkopp, linux-can@vger.kernel.org

Hello,

I am reading CAN frames using read()

	nbytes = read(s, &rframe, sizeof(rframe));

Sometimes it works fine.  For example these frames are read ok:

123#44 33 33 33 33 33 33 44
112#05 01 01 01 22 22 33 33

However, this frame causes an "Ack slot" error:

123#01 00 00 00 00 00 00 00

Any ideas what could cause this?

I don't see why same ID but different data should cause a problem.

Thanks,

Mike

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

* Re: certain CAN frames not being read ok
  2012-05-22  0:37 certain CAN frames not being read ok Michael Economides
@ 2012-05-22 16:56 ` Wolfgang Grandegger
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Grandegger @ 2012-05-22 16:56 UTC (permalink / raw)
  To: Michael Economides; +Cc: Oliver Hartkopp, linux-can@vger.kernel.org

On 05/22/2012 02:37 AM, Michael Economides wrote:
> Hello,
> 
> I am reading CAN frames using read()
> 
> 	nbytes = read(s, &rframe, sizeof(rframe));
> 
> Sometimes it works fine.  For example these frames are read ok:
> 
> 123#44 33 33 33 33 33 33 44
> 112#05 01 01 01 22 22 33 33
> 
> However, this frame causes an "Ack slot" error:
> 
> 123#01 00 00 00 00 00 00 00
> 
> Any ideas what could cause this?

This could be due to hardware problems on the CAN bus. Please check:

- bittiming.
- bus termination.

What does "candump -e any,0:0,#FFFFFFFF" report while you receive data?
And what CAN hardware are you using (what does "ip -d -s link show can0"
report)?

Wolfgang.



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

end of thread, other threads:[~2012-05-22 16:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-22  0:37 certain CAN frames not being read ok Michael Economides
2012-05-22 16:56 ` Wolfgang Grandegger

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.