doc:hw_syntax
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
doc:hw_syntax [2014/03/23 07:47] – admin | doc:hw_syntax [2014/03/29 00:07] (current) – removed admin | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== The OOBD Firmware Commands ====== | ||
- | |||
- | Under the assumtion, that it will be mostly other software which talks to the interface, the command structure was made simple, but flexible. | ||
- | |||
- | The exact description about the syntax as such can be found in the [[rfc_firmware_syntax|RFC Firmware Syntax]] | ||
- | |||
- | The firmware and its commands are split into five different so called functions blocks | ||
- | - System | ||
- | - Serial Input | ||
- | - Serial Output | ||
- | - Protocol | ||
- | - Bus | ||
- | |||
- | where each of this function blocks is split again into a generic and a implementation specific part | ||
- | * **Generic** means, that these functions are common for all implementation of this particular function block, means each implementation has to support this commands. But please note that e.g. a K-Line Bus will still have other generic commands as a CAN- Bus | ||
- | * **Implementation specific** means, that the support of these commands if depending of actual type or implementation of the function block. So is e.g. the CAN-ID length setting supported of course by a CAN bus, but not by a K-Line Bus | ||
- | |||
- | When sending any p- command to the firmware, the first number in the command string always defines, to which function block the command is forwarded to. This gives then finally the following meaning of the first number: | ||
- | |||
- | ^ Command starts with ^ goes to which function block ^ | ||
- | | p 0 | System Specific | ||
- | | p 1 | System Generic | ||
- | | p 2 | Serial-In Specific | ||
- | | p 3 | Serial-In Generic | ||
- | | p 4 | Serial-Out Specific | ||
- | | p 5 | Serial-Out Generic | ||
- | | p 6 | Protocol Specific | ||
- | | p 7 | Protocol Generic | ||
- | | p 8 | Bus Specific | ||
- | | p 9 | Bus Generic | ||
- | |||
- | |||
- | |||
- | max: implementation specific (unsigned long) | ||
- | |||
- | ===== System Generic Commands (P 1) ===== | ||
- | |||
- | ^ Command | ||
- | | 1 | 0 | 0 | enable protocol CAN raw | | | ||
- | | 1 | 1 | 0 | enable protocol UDS diagnositc | ||
- | | 1 | 3 | 0 | enable protocol RTP (Real time data) | | | ||
- | | 2 | 0 | 0 | disable blue LED (= OFF) | | | ||
- | | 2 | 0 | 1 | enable blue LED (= ON) | | | ||
- | | 2 | 1 | 0 | disable green LED (= OFF) | | | ||
- | | 2 | 1 | 1 | enable green LED (= ON) | | | ||
- | | 2 | 2 | 0 | disable red LED (= OFF) | | | ||
- | | 2 | 2 | 1 | enable red LED (= ON) | | | ||
- | | 2 | 3 | 0 | disable buzzer (= OFF) | | | ||
- | | 2 | 3 | 1..max | ||
- | | 2 | 10000 | 0 | disable Relais (= OFF) | | | ||
- | | 2 | 10000 | 1 | enable Relais (= ON) | | | ||
- | |||
- | ===== System Specific Commands (P 0) ===== | ||
- | ===== System Specific Commands (P 0) for the D2 Implementation ===== | ||
- | |||
- | ^ Command | ||
- | | 0 | 0 | 0 | show software version: \\ OOBD < | ||
- | | 0 | 1 | 0 | show serial number: \\ xx: | ||
- | | 0 | 2 | 0 | show power supply voltage of OBD-II connector | ||
- | | 0 | 3 | 0 | show CPU info | | | ||
- | | 0 | 4 | 0..max | ||
- | | 0 | 5 | 0 | show ROM table location | ||
- | | 0 | 6 | 0 | show free heap memory | ||
- | | 0 | 7 | 0 | check CRC-32 of application | ||
- | | 0 | 8 | 0 | show OOBD-Cup device name | | | ||
- | | 0 | 9 | 0 | show UART speed | | | ||
- | | 99 | 0 | 0 | Hardware - Reset | | | ||
- | |||
- | |||
- | ===== Serial-In Specific Commands (P 2) ===== | ||
- | Nothing implemented yet | ||
- | |||
- | ===== Serial-In Generic Commands (P 3) ===== | ||
- | Nothing implemented yet | ||
- | |||
- | ===== Serial-Out Specific Commands (P 4) ===== | ||
- | Nothing implemented yet | ||
- | |||
- | ===== Serial-Out Generic Commands (P 5) ===== | ||
- | Nothing implemented yet | ||
- | |||
- | ===== Protocol Specific Commands (P 6) ===== | ||
- | ====== Protocol Specific Commands (P 6) for the CAN UDS Protocol ====== | ||
- | |||
- | ^ Command | ||
- | | 1 | 0..max | ||
- | | 5 | $xxx | 0 | set ECU Request-ID (RECVID) | ||
- | | 6 | $xxx | 0 | activate Tester present on CAN-ID $xxx | | | ||
- | | 7 | $xxx | 0 | deactivate Tester present on CAN-ID | ||
- | | 8 | 0..max | ||
- | | 9 | $xxx | 0 | set ECU Response-ID (SENDID) | ||
- | |||
- | ====== Protocol Specific Commands (P 6) for the CAN Raw Protocol ====== | ||
- | |||
- | No dedicated p- commands for this mode, as the function is mainly driven by the sent data content. For more details about the CAN Raw Mode, please refer to the [[rfc_canraw-mode|RFC CAN Raw Mode]] | ||
- | |||
- | |||
- | |||
- | ====== Protocol Specific Commands (P 6) for the CAN RTD Protocol ====== | ||
- | For more details about the CAN RTD Mode, please refer to the [[rfc_rtd-real-time-data-protocol-for-the-oobd-firmware|RFC CAN RTD Mode]] | ||
- | |||
- | ^ Command | ||
- | | 1 | | ||
- | |||
- | |||
- | ===== Protocol Generic Commands (P 7) ===== | ||
- | ^ Command | ||
- | | 0 | 0 | 0 | show info of used protocol | ||
- | | 1 | 0 | 0 | deactivate Listen mode | | | ||
- | | 1 | 1 | 0 | activate Listen mode | | | ||
- | |||
- | |||
- | ===== Bus Specific Commands (P 8) ===== | ||
- | ====== Bus Specific Commands (P 8) for the CAN Bus, used in D2 Design ====== | ||
- | |||
- | ^ Command | ||
- | | 2 | 0 | 0 | CAN transceiver: | ||
- | | 2 | 1 | 0 | CAN transceiver: | ||
- | | 2 | 2 | 0 | CAN transceiver: | ||
- | | 2 | 3 | 0 | CAN transceiver: | ||
- | | 3 | 1 | 0 | Standard-CAN init (initialize CAN controller with 125kbit/s, 11bit) | ||
- | | 3 | 2 | 0 | Standard-CAN init (initialize CAN controller with 250kbit/s, 11bit) | ||
- | | 3 | 3 | 0 | Standard-CAN init (initialize CAN controller with 500kbit/s, 11bit) | ||
- | | 3 | 4 | 0 | Standard-CAN init (initialize CAN controller with 1000kbit/s, 11bit) | ||
- | | 3 | 5 | 0 | Extended-CAN init (initialize CAN controller with 125kbit/s, 29bit) | ||
- | | 3 | 6 | 0 | Extended-CAN init (initialize CAN controller with 250kbit/s, 29bit) | ||
- | | 3 | 7 | 0 | Extended-CAN init (initialize CAN controller with 500kbit/s, 29bit) | ||
- | | 3 | 8 | 0 | Extended-CAN init (initialize CAN controller with 1000kbit/s, 29bit) | ||
- | | 4 | 0 | 0 | HS-CAN (Relais switch - OFF) | | | ||
- | | 4 | 1 | 0 | MS-CAN (Relais switch - ON) | | | ||
- | | 10 | < | ||
- | | 11 | < | ||
- | | 12 | < | ||
- | | 13 | < | ||
- | | 14 | 0 | 0 | set all 11bit CAN filter to CAN-ID $0000 and Mask-ID $07FF (= disable any CAN traffic to application) | ||
- | |||
- | ===== Bus Generic Commands (P 9) ===== | ||
- | ===== Bus Generic Commands (P 9) for the CAN Bus ===== | ||
- | |||
- | ^ Command | ||
- | | 0 | 0 | 0 | show info which interface/ | ||
- | | 0 | 3 | 0 | show info of CAN transceiver operating mode | | | ||
- | | 0 | 4 | 0 | ?? | | | ||
- | | 0 | 5 | 1 | read different CAN error counters | ||
- | | 0 | 5 | 2 | delete all software internal CAN error counters | ||
- | " | ||
- | < | ||
- | " | ||
- | < | ||
doc/hw_syntax.1395557243.txt.gz · Last modified: 2014/03/23 07:47 by admin