This manual applies to Version 0.3 of Freediag/Scantool.
Table of contents:
In the Mid 1990's the US introduced mandated diagnostics on all vehicles sold in the USA for certain emissions related information. The idea behind this is that cars would monitor for emissions related problems and when they occur to light a "Check Engine" lamp on the dashboard and log fault information that could be then read by a Scantool. Scantools would become cheap and available to the smallest of vehicle repairers. These diagnostic protocols were grouped under the term "OBD II".
Europe has recently introduced similar, compatible systems, which are known as EOBD (European OBD).
OBDII/EOBD requires a standardised physical connector to be present within a small distance of the vehicle’s steering wheel. OBDII allows 3 types of physical interface (ISO9141/14230, SAEJ1850 VPW and SAEJ1850-PWM) and the related software protocols that are used with those physical interfaces.
This manual assumes that you have some knowledge of vehicle systems and
have probably used a scantool before.
This Scantool uses SAEJ1979 (ODB II) protocol on ISO9141, ISO14230, SAEJ1850 VPW and SAEJ1850-PWM interfaces depending on what hardware interface is attached to the PC. The scantool does not yet support any manufacturer specific protocols for talking to non OBDII vehicles.
It is configured by default to use a generic serial to ISO9141 converter such as those used on the VAG-COM software, It also supports smart interfaces from Multiplex Engineering and from B.Roadman for SAEJ1850 vehicles (mainly Ford and GM).
Please refer to the "supported interfaces" document to determine which
interface support what protocols.
The scantool distribution is a source-code distribution, so you will have to configure/compile it for your Linux system. To do this, unpack the archive and in the src directory, type:
./configuremake
The Scantool should be run as SuperUser as the process has to set real-time scheduling in order to get accurate timing control under Linux. If it is run by an un-privileged user than a warning will be printed and the scantool may not work. It is extremely unlikely to work on ISO9141/ISO14230 interfaces, it may work with SAEJ1850 type interfaces where timing is not so critical.
Start the Scantool CLI by running "./Scantool", you will get a command prompt:
scantool>
The scantool will read commands from a startup file called .scantoolrc in your home directory.
Many people will put the appropriate set interface <type>
command (see section 4) in their .scantoolrc file and will just want to use
the scan, and the cleardtc commands.
The CLI is hierarchical, with normal commands at the top level. These commands include:
scan : start a scanmonitor : loop repeatedly checking/displaying ECU values
2nd level commands, such as commands to set the address used by the scantool, can be accessed as:
set testerid <value>
or by entering the set menu:
set
and then using the testerid command
testerid <value>
Note the cli prompt will change from
scantool>
to
scantool/set>
To leave that menu and return to the main menu, type:
quit
Using the quit command at the main menu will end the scantool
application.
All numeric values can be entered as:
123 |
decimal 123 |
$27 |
hexadecimal 27 |
0x27 |
hexadecimal 27 |
012 |
octal 012 |
The help command is available at every menu and gives you
help for the commands available at that menu. Further information about a
specific command can be obtained by typing
help <command>.
The CLI supports shell like command line editing if supported by your
Linux version.
The following commands are available. Other commands may be visible from the CLI but are not supported
| Main Menu | |
|---|---|
scan |
Does an OBDII Scan for all parameters |
monitor [english/metric] |
Loops requesting/displaying OBD - Mode 1/2/7 results |
cleardtc |
Clear stored Diagnostic Trouble Codes |
source <filename> |
Read commands from <filename> |
log [logfile] |
Basic data logging to logfile specified |
stoplog |
Stops logging |
watch [raw] |
Watch the K line bus and attempt to decode data |
test |
SUBMENU, see later, perform various tests - mostly performed in scan process |
set |
SUBMENU, see later, set parameters for diagnostic functions |
diag |
SUBMENU, see later, extended diagnostic functions |
debug |
SUBMENU, see later |
help [command] |
Help |
quit |
Quit/Exit |
| Test Sub-Menu | |
rvi |
Do OBD Mode 9 requests for vehicle info (vin etc) |
cms |
Request/Display continuously monitored system results |
ncms |
Request/Display non continuously monitored system results [more verbose than in scan] |
readiness |
Do readiness tests [more verbose than in scan] |
| Set Sub-Menu | |
show |
Show all item values |
speed [value] |
show/set the speed to connect to ECU at |
testerid [val] |
Set the source address to use |
destaddr [val] |
Set the destination address to connect to |
protocol [val] |
Set the protocol to use. Use protocol ? to get list |
initmode [val] |
Set the initmode to use. Use initmode ? to get list |
display [english/metric] |
Sets default display mode for monitor command |
interface [type] |
Set the type of hardware interface. Use interface ? to get a list of interface types, and refer to the supported interface document. |
| Diag Sub-Menu | |
connect |
Connect to an ECU, but do not run any tests. Uses the protocol/speed etc set, i.e does not try multiple protocols. |
sendreq |
Send data on the bus |
sr |
Same |
read [timeout] |
Read data from the bus, timeout after timeout seconds |
rx |
Same |
| Debug Sub-Menu | |
show |
Show debug levels |
l0 [val] |
Show/set layer 0 debug value |
l1 [val] |
Show/set layer 1 debug value |
l2 [val] |
Show/set layer 2 debug value |
l3 [val] |
Show/set layer 3 debug value |
cli [val] |
Show/set layer cli debug value |
all [val] |
Show/set debug values for all the layers |
pid |
Show supported PIDS/TESTs for mode 1/2/5/6/9 |
dumpdata |
Show received data for mode 1/2 tests |
| Dyno Sub-Menu | |
mass [mass] |
Set the mass of the vehicle, including driver and passengers |
loss |
Dynamically determine power lost by aerodynamic and friction forces (follow the instructions) |
setloss [d] [f] |
Manually enter aerodynamic and friction forces parameters |
run |
Run dyno (follow the instructions) |
result |
Display run results |
graph |
Display run graphs |
save [filename] |
Save run measures and results to a file |
Please refer to the "supported" interface document to determine which hardware interface is appropriate for your usage and which version of the interface you should purchase.
In order to use the appropriate driver for your hardware interface, the
appropriate set interface XXX command needs to be run. The
default interface driver is the se9141 driver which works with most
generic serial to ISO9141 interfaces. It is recommended that you put this
command in your .scantoolrc file.
Andy Whittaker's OBD-II ISO9141 interface:
http://www.andywhittaker.com/ecu/obdii_hardware.htm
set interface se9141
Jeff's OBD-II ISO 9141 interface:
http://www.planetfall.com/~jeff/obdii
set interface se9141
Silicon Engines ISO 9141 interface:
http://www.siliconengines-ltd.com/products/9141-232.html
set interface se9141
B.Roadman ISO9141/VPW/PWM interface:
http://obddiagnostics.com/
set interface br1
Multiplex Engineering VPW, PWM, and ISO 9141-2 interface:
http://www.multiplex-engineering.com/products.htm
set interface met16
Note, if you have a Multiplex Engineering interface not purchased for the
freediag software, it will have a different ID to that used in the freediag
project. Freediag uses ID 0x38. If you know the ID of your interface you can
change the INTERFACE_ADDRESS definition in diag_l0_me.c
and recompile.