Results 1 to 4 of 4

Thread: OBD-II programming

  1. #1
    Newbie
    Join Date
    Aug 2010
    Posts
    1

    OBD-II programming

    Hi,

    I've recently learned that you can program, in Python, to read the OBD-II port. I want to do this because I have a Nokia N900 which runs Python and use a Bluetooth OBD-II adaptor in the car and connect them over Bluetooth.
    I can't find any documentation that explains how to interface Python to the device and once done what data I should be reading.

    Has anybody tried this before and if so could you send me some pointers please.

    Thanks, Ste

  2. #2
    Variable Bitrate
    Join Date
    Oct 2008
    Posts
    376
    The best way would be to get some copies from the SAE.
    SAE J1979 describes the OBD2 protocols and the data, J2012 has a list of trouble codes.
    Although with a little bit of patience you can get the descriptions for the codes from www.dtcsearch.com.

  3. #3
    SuperMod - OBDII GPS Logger forum
    Auto Apps:loading...

    Join Date
    Mar 2009
    Location
    Los Angeles
    Posts
    929
    It's just a serial device. Your bluetooth dongle presents the RFCOMM bluetooth mechanism, which is just a serial device by the time it makes it into userland.

    Open the device, start reading and writing. The elm327 datasheet [available at elmelectronics.com] will tell you most of what you need to know about the actual protocol.

    Gary (-;
    OBDGPSLogger, for logging OBDII and/or GPS data
    OBDSim, an OBDII/ELM327 software simulator
    mp3car forums: obdgpslogger, obdsim

  4. #4
    VENDOR - ScanTool Vitaliy's Avatar
    Join Date
    Dec 2006
    Location
    Phoenix, AZ
    Posts
    624
    Quote Originally Posted by sterichards View Post
    Hi,

    I've recently learned that you can program, in Python, to read the OBD-II port. I want to do this because I have a Nokia N900 which runs Python and use a Bluetooth OBD-II adaptor in the car and connect them over Bluetooth.
    I can't find any documentation that explains how to interface Python to the device and once done what data I should be reading.

    Has anybody tried this before and if so could you send me some pointers please.

    Thanks, Ste
    Ste, have you checked out these projects already?

    pyOBD-II

    pyOBD-II (a.k.a. "pyobd2") is a Python library for communicating with OBD-II vehicles. Its goal is to make writing programs for vehicle diagnostics and monitoring vehicle data as easy as possible. Relies on pySerial to communicate with ELM scanners.

    Carman

    Carman 0.7 code is now available to everyone. Under the GNU General Public License v3 (GPL v3), our brand new release is the achievement of some very hard work and a lot of no sleeping nights focused on developing more customized features to the application. Check for yourself.

    pyOBD

    pyOBD is an OBD-II (SAE-J1979) compliant scantool software written entirely in Python. It is meant to interface with the low cost ELM 32x devices sold by ScanTool.net. It could possibly work with other devices to, but nothing else is available to the author at this time.

    For Python devlopers, pyOBD provides a single module, obd_io, that allows high level control over sensor data and diagnostic trouble code managment. An ncurses terminal interface is provided and wxWindows interface is under consideration. The entire package has been tested to work on both Mac OSX 10.3 (panther) and Gentoo Linux. Generally speaking, any Posix-type system meeting the requirements below will be supported. In theory, Windows is also supported but has not been tested.


    So there are plenty of examples to help you interface with the OBD interface over Bluetooth. As others have suggested, you also need to read the ELM327 datasheet and respective SAE standards.

    Best regards,

    Vitaliy
    OBDLink MX: world's smallest, fastest, most advanced OBD/Bluetooth adapter with SW and MS CAN support. Read the review to learn more.
    Need to look up a diagnostic trouble code? Try the most up-to-date, free DTCsearch.com!

    You cannot send me a private message using this forum. Use my email instead: vitaliy[@]scantool.net.

Similar Threads

  1. Lilliput screen on Ubuntu
    By yam125 in forum Linux
    Replies: 13
    Last Post: 06-13-2011, 10:19 AM
  2. OBD II connector on an OBD I car
    By HearseNurse in forum Engine Management, OBD-II, Engine Diagnostics, etc.
    Replies: 6
    Last Post: 03-23-2009, 09:52 AM
  3. Replies: 2
    Last Post: 07-27-2008, 09:42 PM
  4. Replies: 0
    Last Post: 11-03-2007, 03:33 PM
  5. Confused about OBD II
    By tom2112 in forum Engine Management, OBD-II, Engine Diagnostics, etc.
    Replies: 30
    Last Post: 10-19-2007, 01:06 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •