I’m using the Electron and the Carloop transceiver attachment to try to send an OBD request to my car and publish the response, but it’s not doing what I’d like. Here’s my code:
and here’s my Events log:
Based on the wikipedia page (https://en.wikipedia.org/wiki/OBD-II_PIDs) I would expect my Events log to populate with events where the Name is somewhere between 7E8 and 7EF (see https://en.wikipedia.org/wiki/OBD-II_PIDs#Response), and the Data says the same thing every time (see https://en.wikipedia.org/wiki/OBD-II_PIDs#Service_01_PID_00).
To make sure my Electron only receives OBD replies, and not just any raw CAN data, I’ve added line 7 in my code.
My thoughts are that either:
- My car’s CANbus doesn’t recognize the request the Electron is sending
can.transmit(message)is not doing what I think it’s doing
can.receive(message)is not working because
messagealready has data in it