On 03/21/2011 08:25 AM, Jorge Fernandez Monteagudo wrote:
> Hi,
> 
> I would like to know how to set the filter masks in order to receive can 
> frames.
> In my current code I'm using only standard frames with 11 bits. The three 
> possible
> situations for me are:
> 
> - Read frames from only an identifier: Then I set :
>   can_id = 0x1A4
>   can_mask = 0x00
> 
> - Read all the frames from a service. For instance, to receive all frames 
> from NMT
>   I set:
>   can_id = 0x700
>   can_mask = 0x7F
> 
>   then I get 11 bit address like this : 111 0xxx xxxx
> 
> - Read all the frames from a node. The I set:
>   can_id = 0x24
>   can_mask = 0x780
> 
>   then I get 11 bit address like this : xxx x010 0100
> 
> How can I recreate this situation using the socketcan filters?

The following doc should make clear how SocketCAN filtering works:

http://lxr.linux.no/#linux+v2.6.38/Documentation/networking/can.txt#L394

Wolfgang.
_______________________________________________
Socketcan-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/socketcan-users

Reply via email to