The time now is Wed 23 Apr 2014, 21:14
All times are UTC - 4
Joined: 06 Oct 2006
Location: Cologne, Germany &/or Perth, Australia
|Posted: Mon 15 Apr 2013, 17:56 Post subject:
OBD2 Software for Puppy and Puppeee
Subject description: OBD2 Automotive Diagnostic Software
At the moment this is more of an experiment than anything else so try any tips at your own risk of frustration.
Background: I bought myself a USB to OBD2 interface (ELM327 Chipset) to do the automotive diagnostic stuff on my car.
I wanted to basically read the fault codes. Deleting them would be good too.
I have an EeePC 701G that runs nicely on 3 different puppee versions I have.
Puppeee 4.4 Beta 6 (Jemimah's last great puppeee distro - a work of art in itself).
Eeepc Users-- Get it while it is still there. I can't link it exactly but see cat dude's post here: http://www.murga-linux.com/puppy/viewtopic.php?t=72190&start=45 open up the tarball go to downloads and mirror two and browse until you find the zip files
and don't forget
(actually I can't recommend it enough to grab a copy of all you can get there before it disappears in digital oblivion)
Failing that option 2 is a proper Laptop running Lucid Puppy 5.28
unsure about wary or racy.
My aim is to get as much useful software going for doing the automotive diagnostic stuff, first as native linux software and, failing that, windows software in wine.
First the driver-- if the pup is new enough nothing to do here:
The ftdi driver should be picked up and modprobed automatically in all puppies newer than 4.2.
I'm not sure but 4.0 may even be enough.
The kernel in puppeee 3.01 was just too old to do it and thought my interface was some mouse or other HID device.
Linux Native Software:
Screen --- hacking your car full on!
You can run these devices much like the old days of modems using a terminal program.
Some googling and I found out the screen command works well.
Not in puppy though.
Okay I compiled it in Puppeee 4.4 and also in Lucid
My device is a 38400 baud rate unit and once plugged in it shows up on /dev/ttyUSB0
|screen /dev/ttyUSB0 38400 |
Then the terminal comes up
get your basic error codes with
ie. enter in "01" space "01" enter
interpreting the codes is a bit of work but read from page 29 on here and you are away:
you can even enter the most powerful two numbers known to the ELM327 commands namely "04" enter
---"Nooo don't do it! That's the history eraser button you fool!" ----
note another terminal program may do the job too-- i have not tried others.
too much power for you?? Okay lets try another tool:
Partial build no gui
I wasn't concerned about getting the gui going (missing dependencies) but the main binaries compiled okay.
(I tried a second time to compile everything - it needs fltk but there are always compile issues - no idea what version works)
Tested with a simple command
|obdgpslogger -s /dev/ttyUSB0 |
it made a log file in the current folder and after stopping with ctrl-c i converted the file to a csv with
This program has enormous potential to be expanded beyond throttle rpm and temperature info. If I understand the code well enough I may patch it.
Perhaps simplifying it to a robust c++ single utiltiy would be enough.
I had to install python 2.6 python devs - build and installed pyserial from source and installed wxpython --that in itself was tricky
I had to modify the wxpython pet to have /usr/lib/python2.6 not 2.5
Once installed I could use pyOBD in its own folder with python pyobd.py
Gui came up -- but I had to modify the pyobd.py file by changing ttyACM0 to ttyUSB0
But didn't seem to run--- looked promising
Changing the settings failed -- not sure why
Maybe its only good for true serial devices
Can't seem to find the homepage anymore .. but stumbled on this and got it working.
It needs wxwidgets (see above) and needed
libmspack-0.3alpha-i686.pet compiled in Puppeee 4.4
I modified the source code to include /dev/ttyUSB0 in the ports options
I haven't tried it on the car but it appears to recognize the interface.
This looks like a promising tool.
It may have difficulties finding its database file. If so just symlink it from its usr/share/openobd/data/ folder to /root/.openobd
Compiled in Puppeee4.4
Now this is just what I was looking for.
A simple command line program to interpret the error codes and a human readable list of PID codes I can edit and expand and recompile for an easy update.
Also not tested on my car yet but this program looks like it will do a wonderful job when used in scripts or with xmessage.
Compiled in Puppeee 4.4
|obd2tdc /dev/ttyUSB0 38400 |
Now there are newer versions but some patches to the 1.13 sourcecode enable it to be compiled in puppy
This sourcecode is the one to use
A good guide to patching was here
Basic idea is -- patch dzcomm 099i and install first
then install allegro 4.2.2 (don't go for a newer version it won't work)
then patch the sourcecode in a lot of places for scantool 1.13
I've got a patched dzcomm pet made in Puppeee 3.01 and one in lucid
Allegro I've compiled in Puppeee 3.01 and used some elses one posted here on the forum for lucid
Scantool I have too but that is somewhat proprietary ... sorry not sure if I can post the pet
Strangely it works in Puppeee 4.2 and lucid but not in pupee 4.4 -gets a segmentation fault somewhere, even if I build it in the system
Have to look deeper there.
further to the above some extra patching was needed when the compiled came up with
"error: format not a string literal and no format arguments"
find the source file and in the fprintf commands add a ,"%s",
Essential - Scantool looks for ttyS# ports that are com 1 to 8 in the program.
I start the program with this script to force a link from ttyUSB0 to ttyS7 that is then com8 in ScanTool
ln -s /dev/ttyUSB0 /dev/ttyS7
Windows Programs in Wine
Essential is to make a symbolic link from ttyUSB0 to root/.wine/dosdevices/com1
I've installed a few - more to do here as to what actually works.
Just be sure not to install any drivers -let puppy do the drivers-and wine just the programs.
I will edit this post once I have some success reports.
Anyone done something similar with their puppy?
Last edited by paulski on Tue 16 Apr 2013, 10:13; edited 2 times in total
Joined: 24 Feb 2007
Location: Green Island Cairns for the winter
|Posted: Tue 16 Apr 2013, 05:29 Post subject:
All this, and all mine requires is a wire jumper in the correct place in the coonnector and out they come on the engine check light.
But no doubt its not as much fun as you are having .Watch the Government does not get on to it and stop you having so much fun
Neither my Family nor my Property are Government issues. Governments should do what they were designed to do Manage the larger issues best done by Governments
To stop corruption give them 3 times the penalty. Get their agreement on first employment.
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum
Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0619s ][ Queries: 11 (0.0061s) ][ GZIP on ]