-
-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESP32 - only 1 extended filter working, is it possible to specify multiple filters? #123
Comments
I added the dual filter. |
Thank you very much @silk-indus, really appreciated. I'll see what changes you made and try to add another one myself as I need at least 3. |
I have used the hardware support of the filtering (I only need to set hardware registers), i.e. no software check is required. The packets are filtered on the hardware level and as far as I know, data are even not stored in the module. However, I think it is possible to use more than two filters, but another software check is required. This could be done in the onReceive call. |
Where? |
Please look on my fork: |
You mean this ? "virtual int filters(int id1, int mask1, int id2, int mask2);" SO I can use filter for 2 ID's? What about 3 or more? Some mask? |
Yes, exactly. |
Ok, what about filtering by mask? |
Mask is like a pattern. The HW way is to write the pattern to the HW register, and the HW do the filtering job. If HW is unable to process more than 2 filters (doesn't have more filter registers, what is our case), you have no other ways, just to filter the packets by the SW. You can use the same patterns, but all the stuff is up to you. That means you have to check every incoming packet (OR, XOR, … whatever, depending on your imagination) if matching your criteria. |
I use filter because I have a lot of ID's and I lose some of them. |
I think, you have a different problem. If the bus is overloaded, filtering does not solve your problem. Filtering can reduce the job of the receiving device. If the bus is ok, then most probably you are not properly receiving the packets. The good practice is to receive packets using interrupts (not by polling). |
Sorry for the delay. |
First of, thank you very much for that useful library.
Now:
No matter how many filters I set it only reads the last one, is it the library limitation or am I doing something wrong?
Thanks in advance.
The text was updated successfully, but these errors were encountered: