Programming Extended Message ID Filters
If space is reserved in Extended Message ID CAN filters in device tree node, then extended filters can be configured using following sys interface:
/sys/devices/c310000.mttcan/net/can0/xtd_filter
- Enter echo help(h) to the sys interface to obtain the format for the parameters to be
provided in
dmesg
.#echo h > /sys/devices/c310000.mttcan/net/can0/xtd_filter [250873.532674] net can0: Invalid std filter [250873.536673] usage:eft=0..3 efec=0..7 efid1=ID1h efid2=ID2h idx=i
Where:
- The efid1 and efid2 are in HEX.
- The eft, efec, and idx are in unsinged integers.
- The idx field is optional.
- If the index is provided, then the given index filter is updated; otherwise the filters are assigned incrementally.
For example:
echo "eft=0 efec=2 efid=0x7 efid2=0x21 idx=0" > /sys/devices/c310000.mttcan/net/can0/xtd_filter