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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
05-12-2009, 10:09 AM
|
#1
|
Member
Registered: Mar 2004
Posts: 49
Rep:
|
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?
|
|
|
05-12-2009, 03:52 PM
|
#2
|
HCL Maintainer
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450
Rep:
|
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).
|
|
|
11-17-2009, 11:08 AM
|
#3
|
LQ Newbie
Registered: Apr 2009
Location: West Yorkshire UK
Distribution: Ubuntu 9.10 and Linpus Lite
Posts: 9
Rep:
|
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.
|
|
|
01-01-2010, 11:07 PM
|
#4
|
LQ Newbie
Registered: Jan 2008
Location: Los Angeles
Posts: 2
Rep:
|
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
|
|
|
01-04-2010, 10:32 AM
|
#5
|
LQ Newbie
Registered: Apr 2009
Location: West Yorkshire UK
Distribution: Ubuntu 9.10 and Linpus Lite
Posts: 9
Rep:
|
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
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 (-;
|
|
|
|
01-04-2010, 10:52 AM
|
#6
|
Senior Member
Registered: Jun 2008
Posts: 1,821
|
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.
|
|
|
01-04-2010, 04:55 PM
|
#7
|
Moderator
Registered: Mar 2008
Posts: 22,361
|
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.
|
|
|
01-04-2010, 10:43 PM
|
#8
|
Member
Registered: Feb 2004
Location: Manorville, New York, USA
Distribution: siduction, openSUSE Tumbleweed
Posts: 379
Rep:
|
I spotted this site, didn't see anyone mention it:
http://www.geekmyride.org/ Open Source Automotive hacking. Check out the wiki.
|
|
|
09-13-2010, 02:36 PM
|
#9
|
LQ Newbie
Registered: Jan 2007
Posts: 3
Rep:
|
Raw data
Quote:
Originally Posted by chunkyks
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
|
|
|
09-13-2010, 03:26 PM
|
#10
|
Moderator
Registered: Aug 2002
Posts: 26,853
|
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.
|
|
|
09-14-2010, 06:52 AM
|
#11
|
LQ Newbie
Registered: Jan 2007
Posts: 3
Rep:
|
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.
|
|
|
09-14-2010, 07:26 AM
|
#12
|
Moderator
Registered: Aug 2002
Posts: 26,853
|
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.
|
|
|
09-14-2010, 08:38 AM
|
#13
|
LQ Newbie
Registered: Jan 2007
Posts: 3
Rep:
|
Quote:
Originally Posted by michaelk
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
|
|
|
09-14-2010, 10:47 AM
|
#14
|
LQ Newbie
Registered: Jan 2008
Location: Los Angeles
Posts: 2
Rep:
|
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 (-;
|
|
|
07-29-2016, 05:52 PM
|
#15
|
Member
Registered: Apr 2016
Location: Bavaria
Distribution: Slackware
Posts: 140
Rep: 
|
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.
|
|
|
All times are GMT -5. The time now is 10:50 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|