filter receive message

A free API for the transfer of data packages according to ISO-TP (ISO 15765-2)
Post Reply
clem69
Posts: 22
Joined: Thu 24. Feb 2022, 18:54

filter receive message

Post by clem69 » Wed 29. Mar 2023, 13:31

Hello,
I filter with this function that I call after initialization
res = CANTP_AddFiltering_2016(PCANTP_HANDLE_USBBUS1, 0x16D20097, 0x0x16D20098, false,
PCANTP_CAN_MSGTYPE_EXTENDED);

to read I use this function
res = CANTP_Read_2016(PCANTP_HANDLE_USBBUS1, &rx_msg, NULL, PCANTP_MSGTYPE_NONE);


but the message is not filtered because I receive messages from other identifiers. How to use the filter function?

Thank you

F.Vergnaud
Software Development
Software Development
Posts: 305
Joined: Mon 9. Sep 2013, 12:21

Re: filter receive message

Post by F.Vergnaud » Wed 29. Mar 2023, 14:02

Hello,

You need to enable the white-list filtering mechanism with parameter PCANTP_PARAMETER_FILTER_CAN_ID, as described in the documentation it is not enabled by default.
Best regards,
Fabrice

Post Reply