stanleyhuangyc / Freematics

Official source code repository for Freematics
https://freematics.com
419 stars 345 forks source link

Remove Filter from sniff mode #193

Open m1iles opened 7 months ago

m1iles commented 7 months ago

Hi, is there a way to remove any Filter from sniffing mode. I want to be able to monitor all of the traffic on the can bus not just the ones with the header 7E*. Becuse data like this won't help: [47763] 00 00 07 E9 08 06 41 00 98 18 00 01 [55263] 00 00 07 E9 08 06 41 00 98 18 00 01 [59762] 00 00 07 E8 08 06 41 00 98 1B A0 13 [64262] 00 00 07 E8 08 06 41 00 98 1B A0 13 [67263] 00 00 07 E9 08 06 41 00 98 18 00 01 [70262] 00 00 07 E8 08 06 41 00 98 1B A0 13 [71763] 00 00 07 E9 08 06 41 00 98 18 00 01 [74762] 00 00 07 E8 08 06 41 00 98 1B A0 13 [79262] 00 00 07 E8 08 06 41 00 98 1B A0 13 [82263] 00 00 07 E8 08 06 41 00 98 1B A0 13 [86763] 00 00 07 E8 08 06 41 00 98 1B A0 13 Thank you in advance.

m1iles commented 7 months ago

Maybe I should I add a few steps I tried to remove the filter: remove the obd.setHeaderFilter() and obd.setHeaderMask() functions. Changed the filter functions to the following: obd.setHeaderFilter(0x000); obd.setHeaderMask(0x7FF); also removed the code in the library in case it gets called by a different function with a default value of some sort.

None of this removed the filter.