LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 05-12-2009, 10:09 AM   #1
sureshot324
Member
 
Registered: Mar 2004
Posts: 49

Rep: Reputation: 15
Getting ODB2 (OBD-II) car scanner working in Linux


I have a cheap USB ODB2 scanner that I got off ebay straight from Hong Kong. I'd like to use it get get the check engine light codes from my car. It has no brand or any other info, so I'm not sure what kind of chip it has. Do nghost and other Linux OBD2 software usually have the drivers for most OBD2 scanners included, or do you need to get them separate? If they're separate, how would I go about finding the drivers for my scanner?
 
Old 05-12-2009, 03:52 PM   #2
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 78
Your most promising option is to find out if your USB device can be used as a character device. There may be drivers linux drivers under the usbserial category, the most common being ftdi, but sometimes the generic one works as well.

After this, you will need to get some userspace software which speaks OBD-II. From what I can tell, the OBD-II has very little implementation, but you might find the following useful:
http://freediag.sourceforge.net
http://wiki.eeeuser.com/howto:scantool

Note that you may have to edit source code to deal with the fact that you are using a usb-serial device rather than a true serial device (read the mailinglist/forums).
 
Old 11-17-2009, 11:08 AM   #3
Dave Wakefield
LQ Newbie
 
Registered: Apr 2009
Location: West Yorkshire UK
Distribution: Ubuntu 9.10 and Linpus Lite
Posts: 9

Rep: Reputation: 1
Question How did you get on?

I am looking at buying some OBD2/EOBD software and would like to run in on my Linux Acer notebook. Have tried ScanTool.net.1.23 on windows and it worked well. Would like to know how you got on with the software interface you bought.
 
Old 01-01-2010, 11:07 PM   #4
chunkyks
LQ Newbie
 
Registered: Jan 2008
Location: Los Angeles
Posts: 2

Rep: Reputation: 1
Two things that might be useful:
First, google for "obdgpslogger". That's my pet project for about the last year, and it does OBDII Linux stuff.

Second, to get the trouble codes out is easy by hand. Your device is probably an ftdi device, so linux will probably magically recognise it out of the box, and create /dev/ttyUSB0 or similar.

You can open that with your favorite serial terminal [I like screen: "screen /dev/ttyUSB0"]. If all goes well, you can type "03" and hit enter, and see the trouble codes in Hex. They're easy to decode; google for "elm electronics", go to their products, datasheets, and download the one for ELM327. Instructions on decoding trouble codes is on page 26.

My apologies for telling you to google stuff and this post being a bit terse; this is my first post to these forums. The first time I wrote up a big thing but the forum ate it because it contained urls, here's hoping this one's briefer.

Hopefully that's helpful. One thing to add is that the ubuntu 9.10 FTDI driver can be buggy; if you run into problems with garbage on your console and you know you have the right baudrate, it might be that. I wrote a userland ftdi<->pty proxy that neatly sidesteps the problem; if you download obdgpslogger and have libftdi-dev installed when you build it, you'll get "obdftdipty" built as part of it. Run that, and you'll be given a pty to use instead of /dev/ttyUSB{something}. The rest of the instructions are the same.

Gary (-;

Last edited by chunkyks; 01-01-2010 at 11:09 PM. Reason: clarifications
 
Old 01-04-2010, 10:32 AM   #5
Dave Wakefield
LQ Newbie
 
Registered: Apr 2009
Location: West Yorkshire UK
Distribution: Ubuntu 9.10 and Linpus Lite
Posts: 9

Rep: Reputation: 1
Smile Thanks for help

Thanks for this help, appologies for not getting back to you earlier Christmas and mechanical tasks on another vehicle got in the way. I will try what you suggest and let you know how I get on. It might be a while before I get to this job, usual problem when you fix something you skip onto the next task. I appreciate your efforts.
Best regards
Dave

Quote:
Originally Posted by chunkyks View Post
Two things that might be useful:
First, google for "obdgpslogger". That's my pet project for about the last year, and it does OBDII Linux stuff.

Second, to get the trouble codes out is easy by hand. Your device is probably an ftdi device, so linux will probably magically recognise it out of the box, and create /dev/ttyUSB0 or similar.

You can open that with your favorite serial terminal [I like screen: "screen /dev/ttyUSB0"]. If all goes well, you can type "03" and hit enter, and see the trouble codes in Hex. They're easy to decode; google for "elm electronics", go to their products, datasheets, and download the one for ELM327. Instructions on decoding trouble codes is on page 26.

My apologies for telling you to google stuff and this post being a bit terse; this is my first post to these forums. The first time I wrote up a big thing but the forum ate it because it contained urls, here's hoping this one's briefer.

Hopefully that's helpful. One thing to add is that the ubuntu 9.10 FTDI driver can be buggy; if you run into problems with garbage on your console and you know you have the right baudrate, it might be that. I wrote a userland ftdi<->pty proxy that neatly sidesteps the problem; if you download obdgpslogger and have libftdi-dev installed when you build it, you'll get "obdftdipty" built as part of it. Run that, and you'll be given a pty to use instead of /dev/ttyUSB{something}. The rest of the instructions are the same.

Gary (-;
 
Old 01-04-2010, 10:52 AM   #6
thorkelljarl
Senior Member
 
Registered: Jun 2008
Posts: 1,820

Rep: Reputation: 229Reputation: 229Reputation: 229
Hey chunkyks, I liked it and I don't even own a car...

You get a thanks for general helpfulness "pour encourager les autres".

Last edited by thorkelljarl; 01-04-2010 at 06:39 PM.
 
Old 01-04-2010, 04:55 PM   #7
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,020

Rep: Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630
Codes are really of little use to a service tech. A more complete scan tool would find reasons instead of "hard" codes. Sure you can guess but if you want simple go to autozone and ask them to tell you the codes.

Better still take it to the dealer and get it scanned and request the report.
 
Old 01-04-2010, 10:43 PM   #8
GoinEasy9
Member
 
Registered: Feb 2004
Location: Manorville, New York, USA
Distribution: siduction, openSUSE Tumbleweed
Posts: 379
Blog Entries: 1

Rep: Reputation: 47
I spotted this site, didn't see anyone mention it:
http://www.geekmyride.org/ Open Source Automotive hacking. Check out the wiki.
 
Old 09-13-2010, 02:36 PM   #9
bhodder
LQ Newbie
 
Registered: Jan 2007
Posts: 3

Rep: Reputation: 0
Raw data

Quote:
Originally Posted by chunkyks View Post
Two things that might be useful:
First, google for "obdgpslogger". That's my pet project for about the last year, and it does OBDII Linux stuff.

Second, to get the trouble codes out is easy by hand. Your device is probably an ftdi device, so linux will probably magically recognise it out of the box, and create /dev/ttyUSB0 or similar.

You can open that with your favorite serial terminal [I like screen: "screen /dev/ttyUSB0"]. If all goes well, you can type "03" and hit enter, and see the trouble codes in Hex. They're easy to decode; google for "elm electronics", go to their products, datasheets, and download the one for ELM327. Instructions on decoding trouble codes is on page 26.

My apologies for telling you to google stuff and this post being a bit terse; this is my first post to these forums. The first time I wrote up a big thing but the forum ate it because it contained urls, here's hoping this one's briefer.

Hopefully that's helpful. One thing to add is that the ubuntu 9.10 FTDI driver can be buggy; if you run into problems with garbage on your console and you know you have the right baudrate, it might be that. I wrote a userland ftdi<->pty proxy that neatly sidesteps the problem; if you download obdgpslogger and have libftdi-dev installed when you build it, you'll get "obdftdipty" built as part of it. Run that, and you'll be given a pty to use instead of /dev/ttyUSB{something}. The rest of the instructions are the same.

Gary (-;
chunkyks;

Were you able to get the raw data? I am working on a project and am currently trying to just simply get the OBD2 raw data with no interface and am failing in able to do so. Could point me to some good sources or aid in this in any way?

Thanks,

Blake
 
Old 09-13-2010, 03:26 PM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,796

Rep: Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952
What do you mean by "no interface" You need an ODB2 tool or hardware of some sort to convert the signals into something compatible with a computer.
 
Old 09-14-2010, 06:52 AM   #11
bhodder
LQ Newbie
 
Registered: Jan 2007
Posts: 3

Rep: Reputation: 0
Quote:
What do you mean by "no interface" You need an ODB2 tool or hardware of some sort to convert the signals into something compatible with a computer.
Sorry, what I mean is I have a hardware interface but on the computer side of this all I have is a linux box but want to get the raw data from my serial console.
 
Old 09-14-2010, 07:26 AM   #12
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,796

Rep: Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952Reputation: 5952
I would expect the output to be a binary format. I have no experience using this utility and no idea what distribution/desktop you are running but this is something that could be useful:
http://sourceforge.net/projects/serlook/

If the output is ASCII data then minicom would work too.
 
Old 09-14-2010, 08:38 AM   #13
bhodder
LQ Newbie
 
Registered: Jan 2007
Posts: 3

Rep: Reputation: 0
Quote:
Originally Posted by michaelk View Post
I would expect the output to be a binary format. I have no experience using this utility and no idea what distribution/desktop you are running but this is something that could be useful:
http://sourceforge.net/projects/serlook/

If the output is ASCII data then minicom would work too.
Sorry, I am using Ubuntu 10.4 and the device is the AutoTap OBDII Streamer. I tried minicom but did not seem to see anything or be able to input any commands.

Blake
 
Old 09-14-2010, 10:47 AM   #14
chunkyks
LQ Newbie
 
Registered: Jan 2008
Location: Los Angeles
Posts: 2

Rep: Reputation: 1
The device you have isn't ASCII to communicate with, you won't have much luck with minicom [or screen, which is a much better serial terminal than minicom for normal human usage].

The protocol description for your device is here: http://www.bb-elec.com/bb-elec/liter...onse_V1_17.pdf. Very simple serial protocol, a proof of concept to "just see if I can communicate with it" would be twenty lines of C.

It would be easy to write an obdsim plugin if you wanted to communicate with "real" OBDII software, but be warned that there aren't many parameters that it has that are also in base OBDII spec; this is clearly a device intended to make managing fleets easier, rather than a device for consumers to play around with their cars.

Gary (-;
 
Old 07-29-2016, 05:52 PM   #15
alberich
Member
 
Registered: Apr 2016
Location: Bavaria
Distribution: Slackware
Posts: 140

Rep: Reputation: Disabled
Has anyone have recent experience with more or less powerful Linux software for doing On Board Diagnostics?

I have an OBDII USB interface with FT232RL chip for connecting via KKL to my 2002 Volkswagen.

I will check the mentioned software later.

For the problem of DTC error codes but not knowing what to make of them:
http://wiki.ross-tech.com/wiki/index...ry:Fault_Codes
There are the fault codes and also basic checks to be done in case.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Sound car is not working marciobarbalho Slackware 15 08-12-2008 01:36 PM
OBD-II real time data Oxagast Linux - Hardware 1 08-09-2006 09:10 AM
how to get a hp scanner working in linux fc4 newusermike Linux - Newbie 2 09-05-2005 03:20 PM
Audigy Sound Car not working...... fifty Fedora 8 10-02-2004 07:18 PM
mandrake linux 10.0 kernel 2.6.3 usb scanner, webcam not working grolon Mandriva 2 04-28-2004 08:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 05:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration