CAN-BUS - how do I filter stuff ?

That there actually looks pretty nifty… While you’ve moved on, I have found that filtering with this library works as expected.

To enable receiving everything without commenting out a section in the library, add the below after ‘CAN.begin();’ in the sketch…

CAN.init_Mask(0,1,0x00000000);
CAN.init_Filt(0,0,0x00000000);
CAN.init_Filt(1,1,0x00000000);

Setting all of the mask bits to 0 causes it to pass through the filter regardless of its setting… HOWEVER, there is a bit in the filter that sets EXCLUSIVELY whether or not to accept extended frames. The second value in the above functions sets that bit. That code sets up the first receive buffer mask to allow anything, then sets up the first filter to exclusively to allow all standard frames and finally sets the second filter to exclusively allow all extended frames.

Ideally, if you want to receive a specific frame ID, set the all mask bits to 1 and define the filter(s) for the specific ID(s) you are wanting.