Unable to sniff CAN traffic

Discussion about software developed by Freematics, including Freematics Builder and Freematics Emulator GUI
Post Reply
froghorn
Posts: 4
Joined: Wed Oct 14, 2020 1:35 pm

Unable to sniff CAN traffic

Post by froghorn »

Hello, I recently purchased the Freematics ONE+ B. I was able to get an example sketch (datalogger) working and am working on developing my own program. I'd like to use the sniff functionality to passively capture CAN frame data, however I don't seem to be able to do so.

I loaded the can_sniffer example sketch from the firmware_v5 folder in the Freematics repo and plugged the device into my car with the USB serial attached to my laptop. I see no output over serial. In my own custom sketch, which is based on can_sniffer, I also see no data. I tried changing the header mask from 0xFFFFFFF0 to 0x0 (which should allow all messages) and I still see nothing. I then tried to query a PID by myself, letting the can_sniffer code sniff the result. To do this, I did:

Code: Select all

char buffer[64];
sprintf(buffer, "%02X%02X\r", obd.dataMode, PID_RPM);
link->send(buffer);
I would expect that the sniffer should sniff the OBD-II response to this RPM request, especially since readPID works for that PID, but I again see no data. Does anyone have any ideas why I'm unable to sniff ANY data?
froghorn
Posts: 4
Joined: Wed Oct 14, 2020 1:35 pm

Re: Unable to sniff CAN traffic

Post by froghorn »

Bumping this thread. Still looking for a solution. Clearly it's not an issue with my vehicle (2019 Lexus NX300h) or the bus speed configuration, since I am able to use the readPID function. Could there be an issue with the co-processor? I purchased my Freematics ONE+B very recently, is there a way I can verify that the co-processor is indeed running the firmware that supports sniffing?
Post Reply