OBD2 Software for Puppy and Puppeee

Miscellaneous tools
Post Reply
Message
Author
paulski
Posts: 130
Joined: Fri 06 Oct 2006, 15:30
Location: Cologne, Germany &/or Perth, Australia

OBD2 Software for Puppy and Puppeee

#1 Post by paulski »

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 3.01
Puppeee 4.2
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/viewto ... 0&start=45 open up the tarball go to downloads and mirror two and browse until you find the zip files

http://web.archive.org/web/201012220259 ... a6atom.zip
or
http://web.archive.org/web/201012220259 ... eleron.zip
and don't forget
http://web.archive.org/web/201012220259 ... vx_510.sfs

(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

Screen:
screen-4.0.3-i486.pet
https://www.box.com/s/dxzmk6g5w1ycxdudv2u7

Usage:

My device is a 38400 baud rate unit and once plugged in it shows up on /dev/ttyUSB0
so:

Code: Select all

screen /dev/ttyUSB0 38400
Then the terminal comes up

get your basic error codes with

Code: Select all

01 01
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:
http://elmelectronics.com/DSheets/ELM327DS.pdf

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:

obdgpslogger-0.16
http://icculus.org/obdgpslogger/#Download
Partial build no gui
obdgpslogger-0.16-i686.pet
https://www.box.com/s/qb95p3uvvts2ywlkc305

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

Code: Select all

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

Code: Select all

obd2csv
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.

pyOBD
http://www.obdtester.com/pyobd-download
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
http://dotpups.de/puppy4/dotpups/Progra ... 4-i386.pet
http://dotpups.de/puppy4/dotpups/Progra ... 9-i486.pet
http://dotpups.de/puppy4/dotpups/Progra ... .8.7.1.pet

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

OpenOBD 0.50
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
https://www.box.com/s/uwfclvgqsyqw5645q8e4

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
openobd-0.5.0-pupeee44-i686.pet
https://www.box.com/s/fpv68x48ur6lepmr6lm9

obd2dtc
http://sourceforge.net/projects/obd2dtc/
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
obd2dtc-i686.pet
https://www.box.com/s/j1yooqrxxyerx52ia1qp

Assumed usage:

Code: Select all

obd2tdc /dev/ttyUSB0 38400



Scantool 1.13
Now there are newer versions but some patches to the 1.13 sourcecode enable it to be compiled in puppy
https://www.scantool.net/forum/index.ph ... pic=1706.0

This sourcecode is the one to use
http://code.google.com/p/scantool-eeepc ... p&can=2&q=
A good guide to patching was here
http://wiki.eeeuser.com/howto:scantool

Normal sourcecode:
http://sourceforge.net/projects/scantool/

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
Puppeee
dz099i-i686pupee.pet
https://www.box.com/s/dbqjnto0b7mbnj0a2npb
Lucid
dz099i-lupu-i486.pet
https://www.box.com/s/k5s11ovrtje09e95x0gi

Allegro I've compiled in Puppeee 3.01 and used some elses one posted here on the forum for lucid
Puppeee
allegro-4.2.2-i686pupeee.pet
https://www.box.com/s/nan1hgkj88dtv60rak8a
Lucid
http://murga-linux.com/puppy/viewtopic.php?t=58469

Scantool I have too but that is somewhat proprietary ... sorry not sure if I can post the pet
Puppeee 3.01
scantool-pupeee301-1.13.pet
https://www.box.com/s/55oeq80smff7dlehaajv
Lucid
scantool-1.13-lupu-i486.pet
https://www.box.com/s/ggq7ngvy35hkmrpb2t76

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.

Note:
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",

eg:
fprintf(stderr,buf);
change to:
fprintf(stderr,"%s",buf);
etc.

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

Code: Select all

#!/bin/sh
rm /dev/ttyS7
ln -s /dev/ttyUSB0 /dev/ttyS7
cd /usr/share/scantool/
./ScanTool
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, 14:13, edited 2 times in total.

tytower

#2 Post by tytower »

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

Post Reply