Scantool - OBDII Car Diagnostic Software for Linux

Powered by Drupal
Submitted by Sam Hobbs on

My car has been a real pain recently: it has a recurring error code that the garage can't seem to fix (apparently, it's a fault in the air conditioning, but the car doesn't even have air con!). Taking the car to the garage to get the code cleared means I lose the car for a day, which is getting annoying. So, I decided to buy myself a USB connecter for the car's On Board Diagnostics (OBD) and see if I could get it working with Linux (specifically Kubuntu, but I doubt it matters). I was pleased to find that there was some decent Free Software available for Linux called Scantool that enabled me to read and clear the codes on my car. Here's how to install and use the software, and some screenshots...

What is an OBD Connector and Where to get one

Since 2004, the EU has required all cars to have a compatible connector for On Board Diagnostics. In 2007, the regulations were updated and now require all cars to have an OBD-II connector within 0.61m of the steering wheel, which makes it easily accessible. My boring old 2004 Ford Fiesta has one behind a little flap under the steering wheel. OBD-II.jpg OBD connectors come in USB and bluetooth variants, and you can pay through the nose for a fancy one or go with a cheap chinese knock-off. I opted for a generic £6 USB model from Amazon, which took ages to arrive but worked fine.

Installing scantool

Installation for this one is really simple: it's in the Ubuntu Universe section. Install with these commands:

sudo apt-get update
sudo apt-get install scantool

The software needs to access the OBD device, which is found at /dev/ttyUSB0. This is owned by root with the group dialout, so the proper way to run the scantool software is to add your user to the dialout group, e.g.:

sudo usermod -a -G dialout sam

When researching before trying the software out, I noticed someone recommending you run scantool with root so that it can read the device. While running it with sudo would work, it violates the principle of least privilege: scantool doesn't need superuser privileges to run, it just needs to be able to read the OBD interface. Running it as root is lazy - don't do it!

Usage / Screenshots

To make the changes to your groups take effect, you need to either log out and back in, or you can use the newgrp command, which will let you use the new group straight away by changing your group ID to the one you specify, in this case dialout:

newgrp dialout

Then check you are in the dialout group:

groups

(You should see dialout as one of the groups in the list). Now turn the ignition on, and then launch scantool:

scantool

You should see the main menu: scantool_mainmenu.png If you select "read codes" now you will see the error codes along with explanations of what they mean (the codes are standard, but sometimes manufacturers have non-standard meanings, so you may get more than one explanation for each code): scantool_readcodes2.png If you know what the code means and you are sure you want to clear it, you can select clear. Obligatory warning: I am not a mechanic. If you're not sure what the codes mean, ask a mechanic, and don't clear it unless you're sure it's OK. scantool_readcodes_cleartroublecodes.png Back to the main menu, and choose sensor data to see realtime readouts from the sensors on the car (the car needs to be running for this to work): scantool_sensordata_carrunning.png The tests option isn't implemented in this build, but the software still does more than enough to be useful!

Comments

I'm not sure, I didn't see any option for Bluetooth pairing, but maybe if you paired it manually it would show up in the program. I've connected android apps to a Bluetooth OBD reader and it worked fine.

alex cher

Fri, 03/25/2016 - 08:50

Hi i'm install this soft on my rasp pi2 and when i going command "scantools" im see this:
Version: 1.21 for DOS
Initializing All Modules...
---------------------------------
Initializing Alegro... OK
Segmentation fault

PS: xserver is installed and all commponents from xserver

Since I'd expect packages for the pi to already be compiled for arm, I think this might just be a case of choosing the wrong port on first run (you have to scroll down to the bottom of the list to get to he USB device). If so, "rm ~/.scantoolrc" will clear the current configuration and let you try again.

My Bluetooth device pairs with my computer on a serial rather than a Bluetooth connection. I have followed the steps to change the dialout and my terminal says it is COM1 . . . opened /dev/ttuS0. The Scantool software will not connect and gives a notice. I am using Linux: Ubuntu 16.04.1LTS and a Bluetooth OBDII device that pairs just fine with my Android phone and Tourque, but I cannot get any applications for Linux to work with my computer(and I thought that Android was based on Linux, Ha!Ha!) .

Maybe something is missing in the above instructions???? Why does the OBDII BT device pair as a serial rather than a BT port like my audio devices pair? And when I have configured the ports for dialout and /dev/ttyS0 is now COM1

My OBD adapter was a USB device like in the photo, not bluetooth, so you may have to rummage around and find the device and see which group owns it and experiment a bit to get it working. Sam

Thanks for this very informative webpage. Just received my USB ELM327 device today.
Hooked it up, started the engine and ran scantool, which connected after a little struggle with configuration.
For baud rate, device specifications stated 9600 or 38400, not what scantool defaults to.
For the COM port, scantool's output to console was helpful.

For my P0420 DTC, I looked into Sensor Data but most everything was OFF on Page 1.
Why not turn everything ON? Or, can that be dangerous?

Thanks for your clear and helpful instructions. BTW, I can read your car's problem: it is called 'Landrover'... ;-)

Sam Hobbs

Sat, 02/18/2017 - 12:50

In reply to by Martin

It's actually a fiesta, I think the codes sometimes mean slightly more specific things for some manufacturers than others!

Hi, thank you for the clear instructions. Unfortunately when i run 'scantool' i get 'shutting down allegro due to signal #11'.
Any help would be greatly appreciated.

I got a USB one like in the picture. I couldn't get it to work at all. I knew it was connected to /dev/ttyUSB0 but I could only choose com1 through com8. After reading the man page, it will connect to com1 first tries /dev/ttyUSB0 and then tries /dev/ttyS0. Com2 tries /dev/ttyUSB1 and then tries /dev/ttyS1. The device was connected to /dev/ttyUSB0, but it was not reading in the software. I needed to change the baud rate to 38400 in order to get it to work 115000 is too fast.

I had no error code, so couldn't read anything, but I could go see the stats on the other page. Thanks for the advice. I get a similar code when mine goes haywire.

Yea, I've tried this program a time or two. It seems to connect to /dev/ttyUSB0, but I have to pick which com port and which baud rate? So if somebody has an answer, I'd love to hear it.

i did not read all of your article before i gave acces and root privilage to the app, can i cancel it;s root privilagge, and how.

Wayne Mews

Sat, 08/17/2019 - 04:21

Will the scan tool read codes from Electric auto's eg Smart fortwo ED or EQ

Greetings ...

Does this OBD2 tool have an option to Erase the existing chip stored on the ECU memory, (I lost my keys and have a new set arriving) and Program the New Chip and Keys into the ECU ...???

Thanks.

You cannot re-program your car's computer with this tool. If it has an OBDII connector, you can read trouble codes from the car's computer, clear them and usually see some live data from the engine. The codes may not have the correct description on them, look up or ask an auto store to look up the code for your specific car if you are not sure. It's free software, you get what you pay for. I have noticed that older cars usually have incorrect descriptions on some codes, so double check!

Blackslide

Thu, 05/21/2020 - 09:17

Hello! Mega thanks for the great post!

Dumb me, I got Scantool.net 1.21 working with my cheap-o ELM327 BT clone, but for some reason it stopped working.

I forgot the steps of how-to make it work, so If someone has succeeded in this, all help would be much appreciated! If I ever get it to work again, I'll be sure and post details here!

P.S. free MotorData OBD app in android, works okay. Remember you have to have ignition in the "on" position to have any change of connecting to the cars ECU, etc.

Cheers!
Blackslide

I was able to run scantool with a cheap BT dongle, but I found it much more useful to just buy Torque Pro app for my phone for $4.99. Nevertheless, I will share how I got it on my Ubuntu 18.04 laptop.
I used "1234" as the pairing code, but it would immediately disconnect after briefly connecting. After googling, I found that I could keep it connected thusly:
As root, create a file "/etc/bluetooth/rfcomm.conf" with this contents:
rfcomm99 {
bind yes;
device 00:1D:A5:0A:FF:AB;
channel 1;
comment "ELM327 based OBD II test tool";
}
Then,
sudo rfcomm --auth connect 99 00:1D:A5:0A:FF:AB 1
Please use your own BT device address for both of these.
This procedure will keep your BT connected, and open /dev/rfcomm99 as a the port.
However, scantool only recognizes serial ports. To trick scantool into using BT, do this:
cd /dev
sudo rm -f ttyS3
sudo ln -s rfcomm99 ttyS3
sudo chmod 766 rfcomm99

This kludge tricks scantool into using COM4 port, and worked for my laptop. However, scantool was very limited in its diagnostics, and buggy as well. It crashed my computer when my car threw a fault, although that may be a linux issue. I like the idea of using my laptop, but the phone app was the easy choice here.

I followed the instructions on this page and the Scantool software starts but it states 'Interface cannot be found'. If that the pc interface of the Scantool to car interface. I didn't set the Com port or baud rate but followed instructions posted here. I was using Debian Linux on my PC.

Scantool doesn't seem to work for ALL DTCs. I was not able to get the following brake-related DTCs...

Faulty Brake Actuator & Brake Booster Pump on Toyota & Lexus Cars
http://www.diy-time.com/automotive/toyota/faulty-brake-actuator-brake-b…

C1391 – Abnormal Leak of Accumulator Pressure
C1252 – Brake Booster Pump Motor ON Time Abnormally Long
C1253 – Brake Booster Pump Motor Circuit
C1256 – Accumulator Low Pressure

Add new comment

The content of this field is kept private and will not be shown publicly.

Filtered HTML

  • Web page addresses and email addresses turn into links automatically.
  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.