Any code for vehicle OBD over CAN

I found NETMF projects to access a vehicle’s OBD2 data using the ELM interface chip. Anyone has done it over CAN directly?


I have not done CAN OBD specifically from NETMF, but have done some basic PID reading using Arduino and a CAN shield (logging geo-tagged engine/vehicle speeds etc to a Google Earth KML file) a few years back.
Are you looking for specific code to use, or info on how to query and interpret the responses? I can’t guarantee it will be useful, but I will help where I can! :slight_smile:


You have both serial and CAN communication on the OBD connector.For CAN diagnostic messages (DM1-4) have a look at the SAE J1939-73, we have implemented this with G120 based hardware. If you have the PGN / SPN documentation (J1939-71) then you can almost access everything :wink:

@ nrobbert - I am looking for code to use because I am lazy… and I may have something to share with someone as well :wink:

@ Gus -

because I am lazy…

I highly doubt that! ;D

@ Gus - Is that lazy relative or absolute? Are you less lazy then say Gus :open_mouth:

(list time)

@ Gus - Sorry, I have nothing on NETMF. Most of my OBD stuff is done with Vector tools, so I haven’t needed to make much myself yet.

A lot of the non-manufacturer-specific OBD-II stuff is pretty straight-forward request/response stuff anyway, so is easy to implement, and I am guessing you are mainly interested in reading some data from the car, which would be service #22 requests (Read Data by Identifier) and they are pretty simple once you know the relevant scaling and offsets etc. If you want to get deeper than that, you may run in to secure diagnostic protocols which is not something manufacturers like to share (not surprisingly!!).

I do have an OBD-relevant project on my to-do list, possibly on Panda III, but that list is long and jumbled, so not sure when I will get to it!!

If you run across any more specific questions, I am happy to try and help!