Be a Mechanic...with Android and Linux!
Using a Laptop to Scan Your OBD-II System
Although it's possible to use a laptop to do the same duty as an Android
device, it's a little more involved, as the Bluetooth protocol stack on
a Linux laptop requires some more massaging than simply pairing up an
Android device. However, if you're comfortable with the command line and
Bluetooth commands like
rfcomm, it's absolutely possible, and
there are some good OBD-II packages like pyobd and openobd. You won't
get some of Torque's value-add features, like accelerometer and GPS
integration, but you still can use the laptop for diagnostic purposes
and data logging.
Using an Old Nokia Internet Tablet to Scan Your OBD-II System
In the December 2008 issue of LJ, I wrote an article called "Hacking the Nokia Internet Tablet", and I talked about ways to hack and extend the Nokia N800 tablet. It turns out there's an application for the N800 and N810 called Carman that was designed to work with wired OBD-II adapters, but it works just fine with the Soliport Bluetooth Scanner. Carman used to be in the Maemo repositories. I no longer have a working N800, so I can't check that now, but when my N800 did work, I used it a few times to diagnose the car. So, if you've got a Nokia device sitting in a drawer gathering dust, pull it out and put it to use!
Using Torque and the Soliport Bluetooth Adapter
The Soliport adapter comes with a little CD-ROM in the box, but it's not required for use with an Android device. To get started, you first need to find the OBD-II port in your car. In most cars sold in the United States, the port is under the dash on the driver's side of the car. Find the port, and plug the Soliport in to it.
Next, start the car, because the OBD-II port isn't powered until the car's ignition is on. (Make sure your garage door is open, please. I don't want to receive hate mail from your relatives on how you suffocated from carbon monoxide poisoning!) Next, you need to go through the standard Bluetooth pairing process to pair your Android device to the Soliport adapter. (The pairing code is 1234 if you can't find it in the instructions—coincidentally, it's the same combination that's on my luggage.)
Once you've got your Android device all paired up to the Soliport, you're ready to fire up Torque. Start Torque on your Android device, and you'll be greeted with the Torque main screen.
Figure 2. The Torque Home Screen
Setting Up Torque
Now that you have Torque up, select the little "settings" slider on the bottom left of the screen, and select "OBD2 Adapter Settings". Set the connection type as Bluetooth, and choose the Soliport if prompted. Go back to the main settings screen and select your desired units (Imperial or Metric), and any other preferences you choose, then flip back to the Torque main screen.
Next, you're going to create a "profile" for your vehicle. Select the settings slider from the main screen as before, then select "Vehicle Profile" and "Create new profile". Then, fill in the pertinent information about your vehicle. This information is used by Torque to compute things that can be calculated, like horsepower, fuel economy and other metrics. When you're done, go back to the main screen.
Checking for Fault Codes
Let's start by doing basic diagnostics on your car. From the main screen, select Fault Codes, then press the large magnifying glass to start a scan of your car's computer for trouble codes. If your Check Engine light is on, you'll probably find your issue represented as a code here. My father's 2001 Chevy Silverado pickup was showing a Check Engine light, and I ran a quick scan on it with Torque. It resulted in a trouble code of P1416. A quick Google search of that trouble code showed that it was the Secondary Air Valve, Bank 2. It turned out that was a little smog system valve right on top of the engine, on the passenger side. Amazon.com had that particular part for $37, and we had it at his house in two days.
I had the Check Engine light on my wife's Durango pop on not long after, and I used the tool to scan her car. Her car came back with a P0440 code, which means "Evaporative Emission Control System Malfunction". I searched a bit more on the Internet and found that the most common cause of this code is a broken or mis-installed fuel filler cap. It turned out that was exactly the case—her fuel filler cap wasn't tightened all the way. I tightened the cap and cleared the code via the Torque app, and it never returned.
Getting Performance Data
Those two cases listed above more than paid for the cost of the Soliport adapter and the Torque application, but Torque can do so much more. Torque can pull data from sources other than your OBD-II sensors. It also can poll your Android device's accelerometer and GPS. This means it can do performance calculations, such as 0–60 mph time (or 0–100 kph time), 1/4 mile time or even horsepower calculations. This requires that you get your car's data entered correctly into the vehicle profile during setup time, particularly the vehicle weight (including your weight as driver, and any other stuff you may have inside the car). If you do performance testing, make sure you're doing it safely—and don't violate any laws in your locality.
However, I think one of the coolest things that Torque and the Soliport adapter can do is they can act as an auxiliary instrument panel for your car. Any bit of information that passes through the OBD-II sensors can be logged, graphed or placed on a digital dial. You can pick and choose how you want that information presented as well—including the size and position of the graphs and dials. This information can be extremely valuable, for instance, displaying the current engine manifold vacuum. As a general rule, under cruise conditions, higher manifold vacuum means higher fuel economy, so having this gauge up can be handy on long trips.
Figure 3. Torque's Virtual Instrument Panel
Torque also has other features, like the ability to log your data for future analysis. It also can graph that data and correlate it to your GPS position and accelerometer data. This can be useful if you happen to be an amateur racer and would like to get information about your car's performance at certain points on the racetrack. Most people won't need that ability, but it's nice to know that the developer of Torque thought that out. All the data necessary to do those calculations is there, it just needs to be glued together.
Computer control systems in cars used to be mysterious, overly complicated, finicky pieces of technological voodoo to even the most seasoned mechanic. Scan tools were proprietary and cost thousands of dollars, and mechanics needed a special tool for each car manufacturer. With the advent of OBD-II and inexpensive computers, it's now easy to de-mystify and diagnose your car. Don't let the strange terms fool you—like the computers you're already familiar with, an automobile is just a collection of technology and machinery, and you can troubleshoot it just like a computer.
Soliport ELM327 Bluetooth OBD-II Scanner: http://www.amazon.com/Soliport-Bluetooth-OBDII-Diagnostic-Scanner/dp/B004KL0I9I
Torque Android OBD-II Scanner App: https://play.google.com/store/apps/details?id=org.prowl.torque&hl=en
Torque Lite (FREE) Android OBD-II Scanner App: https://play.google.com/store/apps/details?id=org.prowl.torquefree&hl=en
OBD-II Trouble Code Lookup: http://www.obd-codes.com/trouble_codes
PyOBD Home Page: http://www.obdtester.com/pyobd
OpenOBD Home Page: http://sourceforge.net/apps/mediawiki/openobd/index.php?title=OpenOBD
Carman on the Nokia N800: http://tabletblog.com/2007/02/carman-bluetooth-elmscan-5-and-n800.html
Bill Childers is the Virtual Editor for Linux Journal. No one really knows what that means.
|Happy Birthday Linux||Aug 25, 2016|
|ContainerCon Vendors Offer Flexible Solutions for Managing All Your New Micro-VMs||Aug 24, 2016|
|Updates from LinuxCon and ContainerCon, Toronto, August 2016||Aug 23, 2016|
|NVMe over Fabrics Support Coming to the Linux 4.8 Kernel||Aug 22, 2016|
|What I Wish I’d Known When I Was an Embedded Linux Newbie||Aug 18, 2016|
|Pandas||Aug 17, 2016|
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- Happy Birthday Linux
- Updates from LinuxCon and ContainerCon, Toronto, August 2016
- ContainerCon Vendors Offer Flexible Solutions for Managing All Your New Micro-VMs
- New Version of GParted
- What I Wish I’d Known When I Was an Embedded Linux Newbie
- Tor 0.2.8.6 Is Released
- NVMe over Fabrics Support Coming to the Linux 4.8 Kernel
- Blender for Visual Effects
- All about printf