Reading OBDII Trouble Codes & Descriptions Using Python On A Raspberry Pi

Sdílet
Vložit
  • čas přidán 12. 09. 2024

Komentáře • 10

  • @TradeAlgoPremier
    @TradeAlgoPremier Před 5 lety

    Hello Develop IT, I just saw your video and very much interesting in writing this software. Any resources or books I can purchase to write this software?

    • @DevelopIT
      @DevelopIT  Před 5 lety

      I'm not sure if you are saying you know how to program but want to know more about programming OBDII applications specifically, or you are just starting out programming. For OBDII I got all the information searching the web, a good starting point was:
      en.wikipedia.org/wiki/On-board_diagnostics
      It gives a good starting point for codes, wiring, standards to search for and other links.
      For starting out programming, many people think a good language to start with is the one used in the video, Python. The device I use called a Raspberry Pi is also good to start with as it was designed for learning programming and has many resources that can be found here:
      www.raspberrypi.org/
      They also have a free monthly magazine which you can download from the site as a PDF file, geared at learning programming, can doload all of the back issues too:
      www.raspberrypi.org/magpi/
      This is how I started out by reading though other peoples code in magazines, I didn't really start reading books until later for specifics of more complex languages.
      I hope this helps.

    • @TradeAlgoPremier
      @TradeAlgoPremier Před 5 lety

      I have HTML5 background but haven’t done any program in python and etc. I am currently studying automotive technology in Indiana, USA. I will take my time and study the resources to get started. Thank you for the info/links

  • @chadleymaggott3786
    @chadleymaggott3786 Před 3 lety

    Hey man I'm trying to establish a simple connection with 2012 Toyota GT86. I manage to make a the initial connection with ELM327 = serial.Serial("/dev/serial_port", 38400). I can also do ELM327.write(b'AT Z
    ') but I get nothing back on ELM327.read()? Any insight is much appreciated

    • @DevelopIT
      @DevelopIT  Před 3 lety

      It's been a while since I looked at the software, but looking at my source code I don't check for a response from 'AT Z
      ', it resets the ELM327 communication. When I send 'AT E0
      ' after, I look for a response 'AT E0
      OK
      '.

    • @chadleymaggott3786
      @chadleymaggott3786 Před 3 lety

      @@DevelopIT Firstly thanks a lot for getting back to me, I know its been over 2 years since you worked on this. My problem is that with any of the elm commands I get nothing back on when I call ELM327.read(), I've tried "AT RV", "AT E0", "AT @1" but every time I only get timeout with b' ', could the baudrate cause this problem? Or might it be permissions?

    • @DevelopIT
      @DevelopIT  Před 3 lety

      @@chadleymaggott3786 The baud rate could be the issue, the ELM327 can be set to a rate other than default, and then I think it stays there. Also when I was using a USB port I think the device may have been called something like /dev/ttyUSB0. If you to an 'ls /dev' without the device connected, and then 'ls /dev' after connecting the device, you will see which device names appear, it should be one of them.

    • @chadleymaggott3786
      @chadleymaggott3786 Před 3 lety

      ​@@DevelopIT After some more digging and poor oversight on my part I kinda got somewhere. I was using the wrong baud rate, "stty" command solved that issue. But I think there's something dodge with my elm device... It works on one car (Toyota Hilux) but not on the car the project is intended for. However even when I managed to read data via pyserial it was all in hex, like `AT Z` responds with b'\xd2' and b'\xfe', even the `AT RV` responds with something similar to that. If the hex had sense I would have been happy but it probably needs to be decoded in a certain way... Once again thanx for your help!

    • @DevelopIT
      @DevelopIT  Před 3 lety

      @@chadleymaggott3786 The full source code can be found here: github.com/BirchJD/PiOBDII
      The functions in ELM327.py do the decoding of the HEX data. If you get it at the second version from the bottom here it should be the command line fault reporting, or the latest version is the full GUI interface:
      github.com/BirchJD/PiOBDII/commits/master