Need Help setting up Filters and Mask

I know this can be a complicated topic but really hoping someone with a better grasp can help. I’ve done filters and masks before to allow a single ID to flow in but now I want to do the opposite. I want to use the M2 as an in-between device and block only a single ID and allow all others past. There is a standard frame message I want blocked but the bus carries both types.

All examples I’ve seen have been to convert ID’s you want into binary and compare… Well all ID’s but one is a lot to compare.

The ID I want to block is 0x64B aka 1760 in dec.

any help would be appreciated. Would hate to have to write code and use up processor power to block the ID when there are filters.

Well, filters were always designed in order to accept frames, not reject them. By default frames are rejected unless a filter accepts them. So, that does present a little challenge. The best approach I can think of if you desperately want to use filtering is this:

Set up a filter to accept only that one frame (bear with me here).
Set up a filter to accept any frame

Set a mailbox callback on the second filter. This way the first filter will match the one you don’t want. You have no callback set so it gets stored into the normal frame queue. You never check this queue and just let it overflow constantly. The callback on the second filter causes all other traffic to go there where you can just quickly resend it onto the other bus.

I haven’t tried this personally and you might need to set multiple “accept everything” filters after that first one so that you can accept frames quickly enough. But, I think it’ll work.