Trouble Applying Filters to Bus with Vector Interface
Attempting to filter bus to receive single PGN with vector interface. Filter is applied but still receiving other IDs when calling recv(). Not sure if issue with filter or bus declaration.
Try this:
filters = [{'can_id': 0xfff, 'can_mask': 0xfff, 'extended': False}, {'can_id': 0x18daf9aa, 'can_mask': 0x1fffffff, 'extended': True}]
Hello,
Unfortunately, I am still experiencing the same issue. Anything else to try? Few follow-up questions.
- Which attribute, "can_filters" or "receive_own_messages" takes precedence? If "receive_own_messages" is set to True, the bus will receive all of its own messages? Or only its messages that satisfy the filter? For me the filtering is not working for "receive_own_messages" set to either True or False.
- I am now using can Reader and Notifier with get_message(). The filters should work for both recv() and get_message()?
@.***
Sincerely, Tom Cowden
From: zariiii9003 @.> Sent: Saturday, November 2, 2024 7:08 PM To: hardbyte/python-can @.> Cc: Cowden, Thomas @.>; Author @.> Subject: Re: [hardbyte/python-can] Trouble Applying Filters to Bus with Vector Interface (Issue #1885)
You don't often get email from @.@.>. Learn why this is importanthttps://aka.ms/LearnAboutSenderIdentification [EXTERNAL EMAIL - If you suspect the validity of this email, do not click any links and use the Report Phish button to report it. If you do not see the Report Phish button, immediately forward it to @.@.>]
Try this:
filters = [{'can_id': 0xfff, 'can_mask': 0xfff, 'extended': False}, {'can_id': 0x18daf9aa, 'can_mask': 0x1fffffff, 'extended': True}]
Reply to this email directly, view it on GitHubhttps://github.com/hardbyte/python-can/issues/1885#issuecomment-2453232578, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BEFDB4US52JAN2FAVQRD74TZ6VSP3AVCNFSM6AAAAABRAXW5KKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINJTGIZTENJXHA. You are receiving this because you authored the thread.Message ID: @.@.>>
Disclaimer Confidentiality Notice: This e-mail, and any attachments and/or documents linked to this email, are intended for the addressee and may contain information that is privileged, confidential, proprietary, or otherwise protected by law. Any dissemination, distribution, or copying is prohibited. This notice serves as a confidentiality marking for the purpose of any confidentiality or nondisclosure agreement. If you have received this communication in error, please contact the original sender.
Currently this is being tested with Vector CAN case 1640A.
Hi, I add the same issue with an MCP2515 controler, in my case, the filter was applied after the receive buffer so when reading, I was receiving old messages stored in the buffer before the filters were applied.