Drew Technologies has used embedded Linux to build what it calls the “world's first open technology automotive scanning tool.” The ScanDAQ (“data acquisition”) is a ruggedized handheld device designed to run J2534-compliant software, enabling mechanics to reflash or modify automotive ECUs (electronic control units). The device could help create third-party and even open source J2534 (defined below) software markets that make today's computerized cars easier to modify and fix.

Drew Tech's ScanDAQ could bring hot-rodding into the computer age

According to Dan DeMaggio, J2534 is a standardized API for ECU programming that is maintained by the SAE (Society of Automotive Engineers) and mandated by the EPA (Environmental Protection Agency) for all cars newer than model year 2004. DeMaggio explains, “Before J2534, you needed a $40,000 tool specific to each car maker to reflash or reprogram an ECU. Dealers were forced to buy these things, and if a garage didn't have one, [they] had to tow the car to a dealer that did. The EPA put an end to that.”

DeMaggio says the advent of J2534 as a standard API allows garages to pay about $25 per day to subscribe to websites that host the latest ECU firmware updates. They can then use Windows laptops in conjunction with adapters such as Drew Tech's CarDAQ line to reflash ECUs as needed.

DrewTech built its newest CarDAQ adapter, the CarDAQ Plus, using Linux, which afforded two benefits — it was faster, and could host its own software, cutting the fragile laptop and associated dongles out of the picture. “The OEMs have adopted [the CarDAQ] because it's faster and more capable than our old [non-Linux-based] CarDAQ2534,” DeMaggio said.

The CarDAQ Plus lacks a screen and battery, however, making it difficult to use in some situations. DeMaggio said Drew Tech was responding to customer requests when it decided to design and build the ScanDAQ, a ruggedized handheld version of the CarDAQ. “We're talking with GM. They've got a guy whose phone rings on Friday nights telling him they've got 18,000 cars in Mexico that need to be reflashed before Monday.”

Drew Tech hopes the ScanDAQ will appeal not only to big car OEMs such as GM, but also to garages, mobile mechanics, and even hot-rod hobbyists. First, though, a third-party software market or an open source software community will have to spring up around J2534. “The value is in the software. We'll be putting together an SDK, but for now, there's a compiler on the device,” DeMaggio said.

What would widespread availability of J2534 software allow mechanics and hobbyists to do? DeMaggio said, “Say someone puts on a big air-ram. Now there's all this extra air coming into the engine, and the ECU has to understand that, and understand that that is a good thing. You have to actually tune the code, rewrite the lookup tables. [Hot-rodders] have not found J2534 yet. But they're starting to figure out that that's the way to do it.”

What's under the, er, hood?

Drew Tech is fundamentally a hardware company, and the ScanDAQ is based on a custom-designed SBC (single-board computer). The board is based on a new version of Sharp's Sharp LH7A400 SoC (system-on-chip), which in turn is based on an ARM9TDMI core clocked at 200MHz. DeMaggio notes, “It was hard because we had beta silicon from Sharp, and they had quite a bit of changes/problems.”

The ScanDAQ has 64MB of RAM, along with 8MB of NOR flash allocated as follows:

2 MB for recovery kernel+ramdisk

1MB for normal kernel

5MB CramFS filesystem

The ScanDAQ has two CompactFlash slots, which can be used to expand storage or add wireless or GPS capabilities (potentially interesting to mobile mechanics, presumably).

On the software side, the ScanDAQ runs a 2.4.17-rmk2-lineo5 kernel, which is the original Lineo port to the Sharp processor. DeMaggio says the port was handled “completely in-house, by me.” He adds, “I'd never actually done any kernel programming before, but it was suprisingly easy. I started with the Lineo source and hacked on it until it worked. It only took a couple of days to get the kernel booting.”

DeMaggio continues, “It's amazing how functional Linux was 'out of the box.' My boss gave me the datasheets to write a flash driver. Instead, I just enabled the flash support and was done. Next, I wrote custom drivers for our various bus protocols, pin switching hardware, voltage generation, etc. Thanks to the Linux Device Drivers [book], it was trivial to get started.”

According to DeMaggio, in addition to CAN, there are “about a dozen” automotive interfaces that have to be supported by a generic scan tool. Additionally, the project required work typical of many embedded projects. “Doing everything (J2534 API, J2535 pass-thru server, web page configuration, recovery mode, etc.) took a while. It's hard to say exactly how long it took because of a number of factors:

“We originally planned to use a Cyrix processor (didn't start shipping in time so we switched to Sharp)

“My boss was thinking about [Windows CE]. (Tests showed [it] was too slow to keep up with Ethernet packets at the rate we needed them)

“My boss originally wanted microwindows and a custom OS. I convinced him Linux/X would be faster and easier (it was!)

“We did the CarDAQ-Plus development in parallel with ScanDAQ. We started shipping the CarDAQ-Plus about a year ago.

“We've been working on a lot of other projects in parallel.”

In addition to Linux, the ScanDAQ uses a full complement of open source software. The windowing system is based on KDrive (TinyX), along with the Matchbox window manager. Utilities are written with FLTK, and the device also has QT. “It's not based on any distro,” DeMaggio notes. “It's completely custom.”

Other open source software used (and type of open source license) included:

The ScanDAQ and CarDAQ also come with a development environment based on open source software, including both TCC (tiny C compiler) and GCC. DeMaggio adds, “Right now we're too disorganized to post [a cross-development SDK], but we will.”

Asked about the advantages of open source software in the automotive repair market, DeMaggio replied, “Currently, the market works like this: scantool vendors make hardware so they can sell their software in subscription form. They don't allow third party developers, because they don't want any competition. They don't invest in innovative hardware, because they make money on software.

“We're the first open scantool platform. We use the standard vehicle API (SAE J2534). We only sell the hardware. We see a healthy market with both in-house development (so the vehicle OEMs can keep their secrets secret) and third party software development (so the OEMs/garages/dealers can buy off-the-shelf).”

DeMaggio suggests that readers interested in how open source software is affecting the automotive industry read about Drew Tech's March 2005 victory in a suit filed by the SAE over Drew Tech's open source (GPL) implementation of the SAE's J1699 test specification built upon the J2534 API. J1699 is an SAE standard for testing cars for compliance with CARB/EPA OBD (on-board diagnostics) IImandates, and the SAE attempted to seize control of the open source software project based on its ownership of J1699. Groklaw called the case evidence of the fact that the contrary to common belief, the GPL has been tested in court, and has stood up well.

The GPL was inspired by Richard Stallman's frustration at not being about to repair a buggy printer, so it only seems fitting that the license stands to play a role in automotive consumer rights efforts such as the pending Right to Repair legislation.

Availability

The ScanDAQ is available now, priced at $1,800. The CarDAQ Plus has been shipping for a year, and is priced at $1,595.