Hello,
How to filter CAN ID using either PCAN-Basic or ISOTP filter API?
I tried using the following code for PCAN Basic:
res = m_PCAN.FilterMessages(PCAN_HANDLE_USBBUS1, 0x7DA, 0x7DA, PCAN_MESSAGE_STANDARD)
its showing :
Read CAN frame: CANID=0x0001 MSGTYPE=0x80 LEN=4 DATA=[00 00 00 00], TS=1197528406764.'
26032 ; Filtering CAN frames: '0x1' is rejected.'
but this is not send by the ECU.
Thanks in advance and Regards,
geethusara
Filtering CAN ID.
-
- Sales & Support
- Posts: 1083
- Joined: Fri 20. Sep 2019, 13:31
Re: Filtering CAN ID.
Hello,
IN PCAN-ISO TP specifically:
Please have a look at the parameter "PCANTP_PARAMETER_FILTER_CAN_ID", which will whitelist CAN-IDs
that have been added to the Whitelist using the function "AddFiltering_2016", please see the ISO_TP documentation regarding this:
https://www.peak-system.com/produktcd/P ... an_eng.pdf
Using PCANBasic:
Make sure you properly configure your filter and that you close the filter once configured.
This is also mentioned in the PCANBasic documentation:
Please also see the examples given on that page.
Please also see the PCANBasic Parameter Documentation regarding this, specifically see chapter "PCAN_Message_Filter" starting on page 41:
The chapters "PCAN_ACCEPTANCE_FILTER_11BIT" and "PCAN_ACCEPTANCE_FILTER_29BIT" starting on page 48:
And futhermore the Appendix "Acceptance Code and Mask Calculation" starting on page 75
Please report back to us, if this was helpful to you.
IN PCAN-ISO TP specifically:
Please have a look at the parameter "PCANTP_PARAMETER_FILTER_CAN_ID", which will whitelist CAN-IDs
that have been added to the Whitelist using the function "AddFiltering_2016", please see the ISO_TP documentation regarding this:
https://www.peak-system.com/produktcd/P ... an_eng.pdf
Using PCANBasic:
Make sure you properly configure your filter and that you close the filter once configured.
This is also mentioned in the PCANBasic documentation:
Please also see the examples given on that page.
Please also see the PCANBasic Parameter Documentation regarding this, specifically see chapter "PCAN_Message_Filter" starting on page 41:
The chapters "PCAN_ACCEPTANCE_FILTER_11BIT" and "PCAN_ACCEPTANCE_FILTER_29BIT" starting on page 48:
And futhermore the Appendix "Acceptance Code and Mask Calculation" starting on page 75
Please report back to us, if this was helpful to you.
- Attachments
-
- PCANBasic_Filter.PNG (55.47 KiB) Viewed 4113 times
---
Marvin Heidemann
PEAK-Support Team
Marvin Heidemann
PEAK-Support Team