All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-help] catching CAN errors
@ 2007-03-03 13:54 roland Tollenaar
  2007-03-05 11:06 ` Sebastian Smolorz
  0 siblings, 1 reply; 9+ messages in thread
From: roland Tollenaar @ 2007-03-03 13:54 UTC (permalink / raw)
  To: xenomai

Hi,

What I cannot find an example of is how to filter for more than one error?

ret = rt_dev_setsockopt(can_fd, SOL_CAN_RAW, CAN_RAW_ERR_FILTER,
&err_mask, sizeof(err_mask));

will pick out the messages that correspond to err_mask. At the moment
I seem to be picking up CAN_ERR_BUSERROR but not for example
CAN_ERR_CRTL (mind you I presume the latter should have been
CAN_ERR_CTRL which is a bit more intuitive). If I want to pick up both
can I do this


ret = rt_dev_setsockopt(can_fd, SOL_CAN_RAW, CAN_RAW_ERR_FILTER,
&err_mask1, sizeof(err_mask1));

ret = rt_dev_setsockopt(can_fd, SOL_CAN_RAW, CAN_RAW_ERR_FILTER,
&err_mask2, sizeof(err_mask2));

to set up to get errors of two types or can I only pick up one at a time.?

This is what my CanID and the data sequence looks like:

!0x00000088!<0x088> [8] 00 00 80 19 00 00 00 00

0x00000080 is CAN_ERR_BUSERROR  and
0x00000008 is protocol violation CAN_ERR_PROT.

So I seem to have those two errors. Correct?

-What is a protocol error?

The values in data 2 and 3 seem to say

data 2:  80 Error occurred on transmission
data 3 19 Ack Slot?

The first one I can understand I have nothing connected to the bus,
the second one
What does the second one mean?


Regards,

Roland.


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

end of thread, other threads:[~2007-03-05 22:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-03 13:54 [Xenomai-help] catching CAN errors roland Tollenaar
2007-03-05 11:06 ` Sebastian Smolorz
2007-03-05 11:22   ` Roland Tollenaar
2007-03-05 11:49     ` Sebastian Smolorz
     [not found]       ` <45EC0970.1060606@domain.hid>
2007-03-05 13:40         ` Sebastian Smolorz
2007-03-05 14:08           ` Roland Tollenaar
2007-03-05 14:39             ` Sebastian Smolorz
     [not found]               ` <45EC2F61.2060307@domain.hid>
2007-03-05 15:18                 ` Sebastian Smolorz
2007-03-05 22:15                   ` roland Tollenaar

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.