Welcome, Guest. Please login or register.
Did you miss your activation email?
April 18, 2014, 11:58:08 AM
Home Help Search Login Register
News: Added OBDLink MX forum board.

ScanTool.net Forum  |  Software  |  ScanTool.net Software  |  Topic: ElmScan 5 USB, Scantool 1.13, and Ubuntu Linux: My long march « previous next »
Pages: [1] Go Down Print
Author Topic: ElmScan 5 USB, Scantool 1.13, and Ubuntu Linux: My long march  (Read 9307 times)
JoseQ
Newbie
*
Posts: 1


View Profile
« on: February 13, 2008, 11:28:29 PM »

So I started off by plugging the thing in, and to my shock and surprise, Linux recognized it and loaded the right driver.  Then something called "brltty" squashed it.  I did this a few times and then I resorted to the simple solution of un-installing brltty (1).

Now we get ready to compile.  You'll need to install build-essential and liballegro4.2-dev.  Download the dzcomm source and unzip it somewhere.  Run fixunix.sh, configure and compile dzcomm.  So far we haven't deviated from the path very much.

Unzip the scantool source, and try to compile it like this:
Code:
make DEFINES="-I ../dz099i/include -DDZCOMM_DJGPP -L../dz099i/lib/unix -lm -lXpm -lXxf86vm -lXcursor -lpthread"
This assumes your scantool directory and dzcomm "dz099i" directory are in the same place. I put mine in my "Desktop" folder.  This will fail like this:
Code:
gcc -g -Wall -Werror -I ../dz099i/include -DDZCOMM_DJGPP -L../dz099i/lib/unix -lm -lXpm -lXxf86vm -lXcursor -lpthread -c main.c
In file included from ../dz099i/include/dzcomm.h:29,
                 from serial.h:17,
                 from main.c:26:
../dz099i/include/dzcomm/dzconfig.h:53:1: error: "INLINE" redefined
In file included from /usr/include/allegro/base.h:40,
                 from /usr/include/allegro.h:25,
                 from globals.h:5,
                 from main.c:22:
/usr/include/allegro/internal/alconfig.h:88:1: error: this is the location of the previous definition
make: *** [main.o] Error 1

Open up the file dz099i/include/dzcomm/dzconfig.h in your favorite editor and change line 53 from
Code:
#define INLINE          inline
to
Code:

  #ifndef INLINE
      #define INLINE          inline
  #endif
(2)

Now run the long make line from above, and this time scantool will compile.  I'm still out of luck, though, because scantool/dzcomm want to open a device called "/dev/ttySnum" and my ElmScan USB is at /dev/ttyUSB0.  No problem, as root do
Code:
ln -s ttyUSB0 ttyS4
"4" was the first non-existent ttyS device for me (I have 4 comm ports?!).  This is "comm5" as far as the scantool software is concerned.

Launch Scantool as root (you have to be root to run scantool.)  Still no dice.  It turns out dzcomm doesn't play very nicely with USB serial ports, at least on Ubuntu. You will need to edit the file dz099i/src/linux/lcomm.c and change line 261 to look like this:
Code:
/*if (ioctl(port->fd, TIOCSERCONFIG) < 0) return 0;*/
(3)

And...it still didn't work.  I gave up and used the AT commands method to read the code and clear the MIL.  Fortunately (unfortunately?) the MIL light went back on and I decided to try scantool again on a lark.  It worked!  Now it works every time.  Hopefully we'll get that evaporative system leak tracked down soonish.

HTH,
Jose.

(1) brltty has something to do with Braille terminals.  Uninstalling it will not work for you if you use a Braille terminal.

(2) I think this is necessary because the dzcomm code was last updated in 2003, and Ubuntu uses a very new compiler (gcc 4.1..3).  The code in question probably compiles fine with the 3.x line of gcc compilers.

(3) This code was borrowed from the setserial utility (the author says so in the comments.)  If you look at the setserial source you'll notice that particular ioctl is used to attempt auto-configuration of the serial port.  I don't understand why the dzcomm code always attempts auto-configuration, even if you specifiy all of the port parameters, and dies if the auto-configuration fails.  In any case, it looks like USB serial ports don't like to be auto-configured.
Logged
tandr
Newbie
*
Posts: 1


View Profile
« Reply #1 on: March 18, 2008, 03:32:08 AM »

Hi
Can you help me with the command that is suppose to give you that error? Don't seem to get the same error.
Where are you running the command?
I am very new to linux so might not understand fully.

Also can you tell me you got it to work?

Thanks alot

Sam
Logged
dwmcqueen
Newbie
*
Posts: 17


View Profile
« Reply #2 on: March 27, 2008, 09:10:29 AM »

I have an issue that ScanTool never seems to even check my com port.  I can echo to it, but ScanTool seems to ignore it. 

Anything in this post that may help?

http://www.mp3car.com/vbulletin/linux/79795-howto-scantool-net-linux-odb-ii.html
Logged
dwmcqueen
Newbie
*
Posts: 17


View Profile
« Reply #3 on: March 31, 2008, 09:56:05 AM »

I noticed that another coder wrote a patch for dzcomm for the USB serial devices at http://www.outflux.net/blog/?s=dzcomm

I will try this and see if it fixes my issue.
Logged
dwmcqueen
Newbie
*
Posts: 17


View Profile
« Reply #4 on: April 01, 2008, 12:31:03 PM »

Nope - still have the issue.  I don't even see the device being accessed.  I

It's a shame, this works fine under Windows, but my eeePC has Linux on it and would love to see it work there....

Any ideas?
Logged
dwmcqueen
Newbie
*
Posts: 17


View Profile
« Reply #5 on: April 04, 2008, 06:54:55 AM »

BTW - there will be a new dzcomm release shortly that incorporates code changes to make it function nicely with USB.
Logged
ajmacleod
Newbie
*
Posts: 3


View Profile
« Reply #6 on: April 10, 2008, 12:54:50 AM »

That's good news; it's not exactly difficult to create a smylink etc but it would be nice not to have to nonetheless!
Logged
Pages: [1] Go Up Print 
ScanTool.net Forum  |  Software  |  ScanTool.net Software  |  Topic: ElmScan 5 USB, Scantool 1.13, and Ubuntu Linux: My long march « previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.8 | SMF © 2006-2008, Simple Machines LLC Valid XHTML 1.0! Valid CSS!