Message Filters not filtering - Ixxat.Vci4 version 4.1.4 Nuget package

I am working on a WPF C# program and trying to implement a message filter to allow only two extended id message to pass, although ALL messages are passing. I have set my filter as follows:
if (mCanCtl != null)
{
mCanCtl.StopLine ();
///
/// If SelectedBoard = 8 then CAN_ARBIDS[SelectedBoard].VI_CANFD_ArbID == 0x11CF4880,
/// and we are trying to accept only 0x11CF4880 and 0x11CF4881
///
mCanCtl.SetAccFilter (CanFilter.Ext, CAN_ARBIDS[SelectedBoard].VI_CANFD_ArbID << 1, 0x3FFFFFFD);
mCanCtl.StartLine ();
}

Here my code for handling the USB to CAN device.
MainWindow.xaml.cs (28.9 KB)

Hi @waltersd,

I’m not sure what is wrong. We added your filter settings to the CanConNet demo for CAN and CAN-FD and both work on a CAN-IB100 can CAN-IB600. I can send you CanFdConNet with the modification, but it’s Windows-Forms not XAML.

CAN reset…
CAN started…
Standard setting all IDs received (I use only 10 for the sender:)

Time: 89002473 ID: 2 DLC: 8 Data: 11 22 33 44 55 66 77 88
Time: 143373027 ID: 11CF4880 DLC: 8 Data: 11 22 33 44 55 66 77 88
Time: 143473023 ID: 11CF4881 DLC: 8 Data: 11 22 33 44 55 66 77 88
Time: 143573026 ID: 11CF4882 DLC: 8 Data: 11 22 33 44 55 66 77 88
Time: 143673024 ID: 11CF4883 DLC: 8 Data: 11 22 33 44 55 66 77 88
Time: 143773024 ID: 11CF4884 DLC: 8 Data: 11 22 33 44 55 66 77 88
Time: 143873024 ID: 11CF4885 DLC: 8 Data: 11 22 33 44 55 66 77 88
Time: 143973023 ID: 11CF4886 DLC: 8 Data: 11 22 33 44 55 66 77 88
Time: 144073023 ID: 11CF4887 DLC: 8 Data: 11 22 33 44 55 66 77 88
Time: 144173029 ID: 11CF4888 DLC: 8 Data: 11 22 33 44 55 66 77 88
Time: 144273025 ID: 11CF4889 DLC: 8 Data: 11 22 33 44 55 66 77 88
Time: 146707860 ID: 0 DLC: 8 Data: CC CC CC CC CC CC CC CC
CAN stopped…
→ here I set the filter as described

CAN started…

Time: 150380028 ID: 11CF4880 DLC: 8 Data: 11 22 33 44 55 66 77 88
Time: 150480024 ID: 11CF4881 DLC: 8 Data: 11 22 33 44 55 66 77 88
Free VCI - Resources…
Free VCI - Resources… OK !

My function I called there:

static void SetFilter()
{

  if (null != mCanCtl)

  {

    mCanCtl.StopLine();

    mCanCtl.SetAccFilter(CanFilter.Ext, (0x11CF4880 << 1), 0x3FFFFFFD);

    mCanCtl.StartLine();

  }

}

I am not sure if hardware makes a difference, but I am using USB to CAN FD Automotive 1.01.0353.22012.

I took and built CanFdConNet using Visual Studio 2022, using .NET 4.8.1 and the IxxAT Nuget package Ixxat.Vci4 version 4.1.4. I have Vector Canoe send all the messages and added the SetFilter to filter out every thing but those two messages, and the filtering does NOT work, I still see all the messages. I added the call to SetFilter just before I started the RxThread.

I don’t know what could be happening here, Also, I have set the receiveFifo size to 1 in mCanChn.Initialize to try and make the sure that I always pull the most recent message, but it seems like the receiveFifo is saving more that 1 message in the fifo. My code continues to pull messages from the fifo even after I have stopped all nessages on the bus.