I too tried to compile, but I couldn't get Scantool.net to recognize my
USB to Serial Adapter. So I kept searching........and trying things.
How to enable USB-Serial Port adapter (RS-232) in Ubuntu 10.04 (Linux)
for the ELMSCAN5 Serial Version ODBII Code Reader.
Part Number: 46001
Controller: ELM327
Hardware Revision 2.2
Firmware Revision 1.2A
MFG Date: 18 Oct 2007
SERIAL PORT or USB Converter:
If you don't have a serial port on your Laptop, or want to use a USB
port Converter check out the following:
The USB to Serial Converter is from www.newegg.com and is
a N82E16812156008 SABRENT 1 ft. USB to Serial db9 Male RS-232 (9-pin)
Converter Model SBT-USC1M - Retail @ $10.99.
These work wonderful with wvdial, modems, and the Serial ELMSCAN5.
INSTALL REQUIRED SOFTWARE FOR COMPILE:
Typically you need to install build-essential and the headers for the
kernel you are running, if you are going to compile code.
will tell you the kernel you are currently running.
Code:
sudo apt-get install build-essential linux-headers-$(uname -r)
will install the software needed to compile your code.
TYPICAL COMPILE STEPS: (from within your source directory)
Code:
./configure
make clean
make
sudo make install
"make clean" won't remove anything on the first compile, but will clean up
on a successive compile.
You can also use checkinstall to build a deb file.
REF:
http://ubuntuguide.org/wiki/Ubuntu:Lucid
DETECT THE DEVICE - USB
Open a Linux Terminal window and cut/paste the following commands with
the USB to Serial Adapter unplugged from a USB port.
larry@ubuntu:~$ dmesg | tail
[10797.964432] domain 0: span 03
[10797.964434] groups: 01 02
[10797.964436] domain 1: span 03
[10797.964438] groups: 03
[10797.964440] CPU1 attaching sched-domain:
[10797.964441] domain 0: span 03
[10797.964443] groups: 02 01
[10797.964446] domain 1: span 03
[10797.964447] groups: 03
[12071.044928] usb 6-1: USB disconnect, address 3
larry@ubuntu:~$ lsusb
Bus 008 Device 001: ID 0000:0000
Bus 007 Device 003: ID 04f2:b091 Chicony Electronics Co., Ltd
Bus 007 Device 002: ID 0bda:0158 Realtek Semiconductor Corp.
Bus 007 Device 001: ID 0000:0000
Bus 006 Device 001: ID 0000:0000
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
Then plug in the USB-Serial Port adaptor to one of your USB ports. (REMEMBER to
ALWAYS use this same port for when using your ODBII Scanner) Wait for about
15 seconds, then cut and paste the following command in your Linux Terminal Window:
You should see these messages.
larry@ubuntu:~$ dmesg | tail
[10797.964440] CPU1 attaching sched-domain:
[10797.964441] domain 0: span 03
[10797.964443] groups: 02 01
[10797.964446] domain 1: span 03
[10797.964447] groups: 03
[12071.044928] usb 6-1: USB disconnect, address 3
[12091.200574] usb 6-1: new full speed USB device using uhci_hcd and address 4
[12091.358706] usb 6-1: configuration #1 chosen from 1 choice
[12091.363887] /build/buildd/linux-2.6.24/drivers/usb/class/cdc-acm.c: This
device cannot do calls on its own. It is no modem.
[12091.363914] cdc_acm 6-1:1.0: ttyACM0: USB ACM device
My device is /dev/ttyACM0
larry@ubuntu:~$ lsusb
Bus 008 Device 001: ID 0000:0000
Bus 007 Device 003: ID 04f2:b091 Chicony Electronics Co., Ltd
Bus 007 Device 002: ID 0bda:0158 Realtek Semiconductor Corp.
Bus 007 Device 001: ID 0000:0000
Bus 006 Device 003: ID 058f:9720 Alcor Micro Corp. USB-Serial Adapter
Bus 006 Device 001: ID 0000:0000
Bus 005 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
Now, cut and paste the following command in your Linux Terminal Window:
Code:
lsusb -v -d 058f:9720
Bus 006 Device 003: ID 058f:9720 Alcor Micro Corp. USB-Serial Adapter
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 2 Communications
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 8
idVendor 0x058f Alcor Micro Corp.
idProduct 0x9720 USB-Serial Adapter
bcdDevice 0.00
DOWNLOAD & COMPILE:
Download scantool_net121src.zip referenced above.
Download the patch, scantool_net121-linux-termios.patch.gz referenced above.
Create a subdirectory named scantool, and move both downloaded files there.
Open a Terminal Window (Console), and while connected to the Internet, do:
Code:
sudo apt-get install liballegro4.2-dev liballegro4.2
cd ~/scantool
unzip scantool_net121src.zip
zcat scantool_net121-linux-termios.patch.gz | patch
make
This will compile the code. We just need to check out the COMM Ports.
LINKING the COMM PORT: SYMBOLIC vs HARD
To locate the possible COMM PORTS in Ubuntu, cut and paste the following commands
with the USB to RS-232C Adapter plugged in.:
Code:
ls -l /dev/ttyS*
ls -l /dev/ttyU*
Notice that ttyS0 through ttyS3 are detected as shown. You may have
/dev/ttyUSB0 if it was properly detected. Mine was NOT, because it
was a Sabrent SBT-USC1M USB to Serial Converter..
crw-rw---- 1 root dialout 4, 64 2009-11-27 15:26 /dev/ttyS0
crw-rw---- 1 root dialout 4, 65 2009-11-27 15:26 /dev/ttyS1
crw-rw---- 1 root dialout 4, 66 2009-11-27 15:26 /dev/ttyS2
crw-rw---- 1 root dialout 4, 67 2009-11-27 15:26 /dev/ttyS3
I couldn't make a symbolic link work, so I decided to create a
hard link, replacing /dev/ttyS3. First remove /dev/ttyS3.
Code:
sudo rm /dev/ttyS3
sudo ln /dev/ttyACM0 /dev/ttyS3
Running the command again:
gives:
crw-rw---- 1 root dialout 4, 64 2010-11-10 11:59 /dev/ttyS0
crw-rw---- 1 root dialout 4, 65 2010-11-10 11:59 /dev/ttyS1
crw-rw---- 1 root dialout 4, 66 2010-11-10 11:59 /dev/ttyS2
crw-rw---- 2 root dialout 166, 0 2010-11-10 12:59 /dev/ttyS3
If you don't have rw priviledges remove /dev/ttyS3 and create it again.
We can determine the Baud rate of the Port:
Code:
stty -F /dev/ttyS3 -a
and to change it to 9600:
Code:
stty -F /dev/ttyS3 9600
stty -F /dev/ttyS3 -a
If you connect to a modem for testing you can transmit out an "ATZ"
causing the Modem to flash the lights and reset with:
Code:
echo ATZ > /dev/ttyS3
Which proves characters routed to /dev/ttyS3 get sent to /dev/ttyACM0,
the USB to Serial Converter.
All that remains is to connect the ODBII Cable to the Vehicle, Connect the
Serial cable to the ELMSCAN5, run the Software, configure Scantool for COMM 4 at 9600 baud.
Run the Software with:
I use the underlined characters to move around the menu's, and left click on an item, then
turn it OFF/ON with the Space Bar. It is a bit confusing, but it works.
Now to make a batch file to automate things a bit.
In your home directory, create a small shell file called st.
Code:
#!/bin/sh
sudo rm /dev/ttyS3
ln /dev/ttyACM0 /dev/ttyS3
cd ~/scantool
./ScanTool
Make it executable.
Plug the device into the OBD-II port in your car and turn the ignition on (but do not start the engine). Run ScanTool.
ScanTool will default to /dev/ttyS0 (COM1). Change it to /dev/ttyS3 (COM4) & 9600 Baud.
Also change to Windowed interface.
I hope this helps...........
LK
Ref:
http://wiki.eeeuser.com/howto:scantool
http://ubuntuforums.org/showthread.p...light=scantool