Befehlsreferenz¶
Das ist die vollständige Liste dessen, was obd-diag an den Adapter senden darf, mit Seite und wörtlichem Zitat aus dem ELM327-Datenblatt (ELM327DSJ, Firmware v2.1; Seitenzahlen nach der Fußzeile „N of 94“). Alles andere wird vor dem Senden abgewiesen (Sicherheitskonzept).
Die Tabellen werden beim Bauen der Dokumentation aus
tests/fixtures/command_spec.yaml erzeugt. Dieselbe Datei prüfen die Tests gegen die
Freigabeliste im Code (tests/verification/test_command_spec.py, erschöpfend über alle
Hex-Befehle) und gegen jeden Befehl, der in irgendeinem Test gesendet wird. Die Liste
hier kann also weder vom Code noch von den Tests abweichen.
Befehle stehen so, wie sie auf der Leitung stehen: Großbuchstaben, keine Leerzeichen,
danach ein CR. Reguläre Ausdrücke (01[0-9A-F]{2}) stehen für eine Gruppe von
Befehlen, z. B. 010C.
Erlaubte Befehle¶
Befehl |
Bedeutung |
ans Fahrzeug |
schreibt |
Quelle |
Zitat |
|---|---|---|---|---|---|
|
Adapter komplett zurücksetzen (wie Strom aus und wieder an) |
nein |
nein |
Datenblatt S. 28 |
„complete reset as if power were cycled off and then on again“ |
|
Echo der empfangenen Zeichen aus |
nein |
nein |
Datenblatt S. 17 |
„These commands control whether or not the characters received on the RS232 port are echoed (retransmitted) back to the host computer.“ |
|
kein Zeilenvorschub nach CR |
nein |
nein |
Datenblatt S. 20 |
„for AT L0, they will be off.“ |
|
keine Leerzeichen in den Antworten |
nein |
nein |
Datenblatt S. 24 |
„These commands control whether or not space characters are inserted in the ECU response.“ |
|
Header in den Antworten ausblenden |
nein |
nein |
Datenblatt S. 18 |
„These commands control whether or not the additional (header) bytes of information are shown in the responses from the vehicle.“ |
|
Header in den Antworten anzeigen (Zuordnung je Steuergerät) |
nein |
nein |
Datenblatt S. 18 |
„may be of interest (especially if you receive multiple responses and wish to determine what modules they were from).“ |
|
Protokoll automatisch suchen (Suche erst mit der nächsten OBD-Anfrage) |
nein |
nein |
Datenblatt S. 26 |
„the AT SP0 command sets the protocol to 0, but does not perform a write to EEPROM.“ |
|
Spannung an Pin 2 messen (Bordspannung) |
nein |
nein |
Datenblatt S. 24 |
„This initiates the reading of the voltage present at pin 2“ |
|
aktuelles Protokoll als Text melden |
nein |
nein |
Datenblatt S. 17 |
„The DP command is a convenient means of asking what protocol the IC is currently set to“ |
|
aktuelles Protokoll als Nummer melden |
nein |
nein |
Datenblatt S. 17 |
„it returns a number which represents the current protocol.“ |
|
Kennung und Firmware-Version des Adapters melden |
nein |
nein |
Datenblatt S. 18 |
„Issuing this command causes the chip to identify itself, by printing the startup product ID string“ |
|
Gerätebeschreibung des Adapters melden |
nein |
nein |
Datenblatt S. 28 |
„This command displays the device description string.“ |
|
Übersicht der Programmable Parameters anzeigen (nur lesen, seit v1.1) |
nein |
nein |
Datenblatt S. 23 |
„The complete range of current Programmable Parameters are displayed with this command“ |
|
Pegel am Zündungseingang (Pin 15) lesen (seit v1.4) |
nein |
nein |
Datenblatt S. 19 |
„This command reads the signal level at pin 15.“ |
|
das Byte im Nutzerspeicher lesen (seit v1.4) |
nein |
nein |
Datenblatt S. 24 |
„The byte value stored with the SD command is retrieved with this command.“ |
|
Zähler des Aktivitätsmonitors anzeigen (seit v2.0) |
nein |
nein |
Datenblatt S. 12 |
„This count then represents the time since activity was last detected“ |
|
Service $01: aktuellen Wert einer PID lesen (auch 00/20/40 … unterstützte PIDs) |
ja |
nein |
Datenblatt S. 31 |
„01 - show current data“ |
|
Service $02: Freeze Frame lesen, PID und Frame-Nummer 00 |
ja |
nein |
Datenblatt S. 31 |
„02 - show freeze frame data“ |
|
Service $02 ohne Frame-Nummer: Rückfallebene, nur wenn 020200 abgelehnt wird |
ja |
nein |
Datenblatt S. 31 |
„02 - show freeze frame data“ |
|
Service $03: gespeicherte Fehlercodes lesen |
ja |
nein |
Datenblatt S. 34 |
„request the actual trouble codes with a mode 03 request (there is no PID needed)“ |
|
Service $07: ausstehende Fehlercodes lesen |
ja |
nein |
Datenblatt S. 31 |
„07 - show ‘pending’ trouble codes“ |
|
Service $0A: permanente Fehlercodes lesen |
ja |
nein |
Datenblatt S. 31 |
„0A - request permanent trouble codes“ |
|
Service $09, InfoType 02: FIN lesen (ohne Antwortzahl) |
ja |
nein |
Datenblatt S. 32 |
„It is obtained with mode 09, PID 02, and should be requested with: >09 02“ |
|
Service $09, InfoType 00: unterstützte InfoTypes 01 bis 20 |
ja |
nein |
Datenblatt S. 31 |
„09 - request vehicle information“ |
|
Service $09, InfoType 04: Kalibrierungs-IDs (Software-Stand) je Steuergerät |
ja |
nein |
Datenblatt S. 43 |
„ask the vehicle for the Calibration ID (09 04)“ |
|
Service $09, InfoType 06: Kalibrierungs-Prüfnummern (CVN) je Steuergerät |
ja |
nein |
Datenblatt S. 31 |
„09 - request vehicle information“ |
|
Service $09, InfoType 08: Überwachungszähler (In-Use Performance), Ottomotor |
ja |
nein |
Datenblatt S. 31 |
„09 - request vehicle information“ |
|
Service $09, InfoType 0A: Name des Steuergeräts |
ja |
nein |
Datenblatt S. 31 |
„09 - request vehicle information“ |
|
Service $09, InfoType 0B: Überwachungszähler (In-Use Performance), Dieselmotor |
ja |
nein |
Datenblatt S. 31 |
„09 - request vehicle information“ |
|
Service $06: Testergebnisse der Eigendiagnose je Monitor-ID (00/20/… unterstützte MIDs) |
ja |
nein |
Datenblatt S. 31 |
„06 - test results, non-continuously monitored“ |
|
Service $04: Fehlercodes, Freeze Frame und Testergebnisse löschen (nur in |
ja |
ja |
Datenblatt S. 35 |
„the SAE specifies that scan tools must verify that a mode 04 is intended (‘Are you sure?’) before actually sending it to the vehicle“ |
Verbotene Beispiele¶
Diese Befehle lehnt die Freigabeliste ab; die Tests prüfen, dass keiner je gesendet wird.
Befehl |
Warum verboten |
Quelle |
Zitat |
|---|---|---|---|
(nur CR) |
ein einzelnes CR wiederholt den letzten Befehl (nach 04 also erneutes Löschen) |
Datenblatt S. 9 |
„the ability to repeat any command (AT or OBD) when only a single carriage return character is received.“ |
|
Service $08 steuert Bauteile im Fahrzeug an |
Datenblatt S. 31 |
„08 - special control mode“ |
|
Service $08 mit Test-ID |
Datenblatt S. 31 |
„08 - special control mode“ |
|
falsche Antwortzahl bei der FIN-Anfrage |
Datenblatt S. 32 |
„If you should mistakenly send 09 02 1, you might cause problems.“ |
|
schreibt sofort ins EEPROM des Adapters |
Datenblatt S. 36 |
„The Set Protocol commands cause an immediate write to the internal EEPROM“ |
|
schreibt 0 ins EEPROM des Adapters |
Datenblatt S. 26 |
„if you must write 0 to the EEPROM, use command AT SP 00“ |
|
verändert dauerhaft einen Programmable Parameter (hier die Baudrate) |
Datenblatt S. 23 |
„PP hh SV yy [ Prog. Param. hh: Set the Value to yy ]“ |
|
Header setzen, also ein einzelnes Steuergerät statt der OBD-Sammeladresse ansprechen |
Datenblatt S. 25 |
„particularly if experimenting with physical addressing“ |
|
Mithören am Bus, schließt das aktuelle Protokoll |
Datenblatt S. 21 |
„This command places the ELM327 into a bus monitoring mode“ |
|
schaltet den Adapter in den Stromsparmodus |
Datenblatt S. 20 |
„This command causes the ELM327 to shut off all but ‘essential services’“ |
|
setzt alles auf Standard und kann die laufende Sitzung schließen |
Datenblatt S. 49 |
„the ELM327 will close the current session and then change the protocol to the default one“ |
|
schreibt ein Byte in den dauerhaften Nutzerspeicher des Adapters |
Datenblatt S. 24 |
„The ELM327 is able to save one byte of information for you in a special nonvolatile memory location“ |
|
schreibt die Gerätekennung, das geht nur ein einziges Mal |
Datenblatt S. 28 |
„once written to memory, they can not be changed (ie you may only use the @3 command one time)“ |