1

We have built an OBD-II scan tool using an STM32 microcontroller and it works for most vehicles. But occasionally our device fails to detect the OBD protocol, whereas the OBD scanner (ELM) will detect it. We are following international standard documentation provided by ISO and so the logic is theoretically correct, also this setup works for most vehicles.

Are there any open source implementations of an OBD scanner using a microcontroller instead of ICs/firmware like ELM327? Basically, I need to know how an OBD II scanner sends its frames into the CAN/K-Line bus.

  • 1
    You are aware there are vehicles out there which have the ECUs on either the L-Line (Audi was a prominent example) or a secondary CAN? So it may be just a matter of wiring. – Janka Jun 14 '17 at 9:39
  • Your best bet may be to reverse engineer what you have. Probe the lines and record what happens during the detection process. Then compare this to a recording of how your scanner does the detection. – vini_i Jun 14 '17 at 13:28
  • What transceivers and other hardware are you using? Is it only specific vehicles it fails to detect or is there an intermittent problem? – Terry Gould Jun 14 '17 at 16:49
  • @Janka, yes I'm aware of that. But if the scanner can detect it then my hardware must also detect it. Unless the scanner changes it's pin configuration. The OBD connector, to my knowledge, is a standard. So I'm not sure why my setup fails even though the scanner detects it. – clmno Jun 15 '17 at 11:01
  • @vini_i Thank you, I'm currently doing that. It's a bit hard as I don't own a scope, so currently using a LabJack U3. – clmno Jun 15 '17 at 11:02
1

I couldn't find an open source scanner firmware, but we have solved the KWP issue that we were facing. Still open for any mention on open source OBD II scanners.

I use the same GPIO pin as both GPIO and UART TX, which is what we must do. But when switching between that two modes the pin goes into high impedance mode and so there was a drop in voltage which the KWP ECU will see/read.Thus there was a faulty bit in the bus, and so obviously the "handshake" failed. We have fixed this with a pull-up resistor.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.