A recurring car error code can be frustrating, especially when a trip to the garage doesn’t solve the issue. Thankfully, a USB car code scanner and Linux software offer a DIY solution. This guide explains how to use a USB OBD-II scanner with Linux, specifically using the scantool
software. We’ll cover installation, usage, and provide helpful screenshots.
OBD-II Connector: Location and Types
Since 2004, all cars sold in the EU have been required to have a standardized On-Board Diagnostics (OBD) connector. Regulations mandated an easily accessible OBD-II connector within two feet of the steering wheel by 2007. These connectors come in USB and Bluetooth versions, ranging from inexpensive generic models to pricier, feature-rich options. A simple USB scanner is sufficient for reading and clearing basic error codes.
Installing Scantool on Linux
Scantool
is a free software application available in the Ubuntu Universe repository, making installation straightforward. Open a terminal and execute the following commands:
sudo apt-get update
sudo apt-get install scantool
Scantool
needs access to the OBD device, typically located at /dev/ttyUSB0
. This device is owned by root and belongs to the dialout
group. To use scantool
without sudo
, add your user to the dialout
group:
sudo usermod -a -G dialout $USER
Important: Avoid running scantool
with sudo
. While it might work, it grants unnecessary privileges, violating the principle of least privilege. Adding your user to the dialout
group provides sufficient access.
Using Scantool: Reading and Clearing Codes
After adding your user to the dialout
group, log out and back in, or use the newgrp
command to apply the changes immediately:
newgrp dialout
Verify your group membership with the groups
command. “dialout” should appear in the list. With the car’s ignition turned on, connect the USB scanner and launch scantool
:
scantool
The main menu will appear. Select “read codes” to retrieve error codes and their explanations. While codes are standardized, manufacturer-specific interpretations may exist, resulting in multiple explanations for a single code.
To clear a code, select the “clear” option after understanding its meaning and implications. Caution: Consult a mechanic if unsure about a code’s meaning. Clearing codes without understanding the underlying issue could mask a serious problem.
Return to the main menu and choose “sensor data” to view real-time sensor readings. The engine must be running for this feature to function correctly.
While the “tests” option might not be implemented in all builds, scantool
provides ample functionality for diagnosing and resolving common car issues using a Usb Car Code Scanner Linux.