Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 24 Oct 2014, 04:16
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
OBD2 Software for Puppy and Puppeee
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [2 Posts]  
Author Message
paulski

Joined: 06 Oct 2006
Posts: 127
Location: Cologne, Germany &/or Perth, Australia

PostPosted: 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 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/viewtopic.php?t=72190&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/20101222025938/http://puppeee.com/files/puppeee4.4beta6/puppeee4.4-Beta6atom.zip
or
http://web.archive.org/web/20101222025938/http://puppeee.com/files/puppeee4.4beta6/puppeee4.4-Beta6celeron.zip
and don't forget
http://web.archive.org/web/20101222025938/http://puppeee.com/files/puppeee4.4beta6/eee_devx_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:
screen /dev/ttyUSB0 38400


Then the terminal comes up

get your basic error codes with
Code:
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:
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:
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/Programming/python-2.6.4-i386.pet
http://dotpups.de/puppy4/dotpups/Programming/wxWidgets-2.8.9-i486.pet
http://dotpups.de/puppy4/dotpups/Programming/wxpython-2.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 Sad
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:
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.php?PHPSESSID=f5hd1s9qbu6noivk3jaios3a93&topic=1706.0

This sourcecode is the one to use
http://code.google.com/p/scantool-eeepc/downloads/detail?name=ScanTool%20for%20EEE%20PC%20Build%201.zip&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:
#!/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, 10:13; edited 2 times in total
Back to top
View user's profile Send private message 
tytower

Joined: 24 Feb 2007
Posts: 440
Location: Green Island Cairns for the winter

PostPosted: 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.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [2 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
Jump to:  

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.0900s ][ Queries: 11 (0.0262s) ][ GZIP on ]