Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
interface:syntax [2011/11/04 09:03] – nexulm | interface:syntax [2014/02/25 06:38] (current) – removed admin | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== The OOBD Firmware Syntax ====== | ||
- | |||
- | Under the assumption, that it will be mostly other software which talks to the interface, the command structure was made simple, but flexible. | ||
- | |||
- | To archive this, the interface knows only two different kind of inputs, data or parameters | ||
- | |||
- | ===== Data ===== | ||
- | input: | ||
- | data <CR> | ||
- | |||
- | where data is defined as (in EBNF- Syntax) | ||
- | |||
- | data = hex , { hex }; | ||
- | digit = " | ||
- | hex = " | ||
- | |||
- | ===== Parameters ===== | ||
- | |||
- | input: | ||
- | p key value <CR> | ||
- | | ||
- | where the definion is as follows | ||
- | |||
- | p = " | ||
- | key = number ; | ||
- | value = number ; | ||
- | number = digit , {digit } | " | ||
- | | ||
- | | ||
- | ===== Examples ===== | ||
- | |||
- | Sending 11 bytes of data | ||
- | |||
- | input: | ||
- | | ||
- | |||
- | if the number of input chars is not even, the last char is handled as MSB of the last byte, so | ||
- | |||
- | | ||
- | |||
- | is send as | ||
- | |||
- | | ||
- | |||
- | |||
- | Set the parameter 127 to 64: | ||
- | |||
- | p 127 64 | ||
- | | ||
- | the same, but with hexadecimal notation: | ||
- | |||
- | p $7F $40 | ||
- | | ||
- | | ||
- | ====== Interface feedback ====== | ||
- | The format of the data given back on a data or parameter input is depending on the actual active protocol and bus implementation. | ||
- | |||
- | |||
- | **Important** Sending '' | ||
- | |||
- | ====== Parameter list ====== | ||
- | The OOBD interface is designed to allow generic protocols and busses. For that reason only some parameters can be common for all possible cases (the so called global parameters). All other ones are protocol or bus specific. | ||
- | |||
- | |||
- | |||
- | max: implementation specific (unsigned long) | ||
- | |||
- | ^ Key ^ Value ^ Used by ^ Meaning | ||
- | | 0 | 0..max | Global | ||
- | | 1 | 0,1 | Global | ||
- | | 2 | 0..2 | ||
- | | 3 | 0..max | Global | ||
- | | 4 | 0..max | Global | ||
- | | 5 | 0..max | Protocol | ||
- | | 6 | 0..max | Protocol | ||
- | | 7 | 0..max | Protocol | ||
- | | 8 | 0..max | Protocol | ||
- | | 9 | 0..max | Protocol | ||
- | | 10 | 0..max | Protocol | ||
- | | 11 | 0..max | Protocol | ||
- | | 12 | ||
- | | 13 | ||
- | | 14 | ||
- | | 15 | - | - | just for internal | ||
- | | 16 | 0..max | Protocol | ||
- | | 99 | 0..max | System | ||
- | |||
- | |||
- | ^ System infos (Key 00) ^^^ | ||
- | ^ Value ^ Protocol ^ Format ^ | ||
- | | 0 | version | OOBD < | ||
- | | 1 | serial number | xx: | ||
- | | 2 | actual Bus | < | ||
- | | 3 | actual Protocol | < | ||
- | | 4 | actual CAN-Transceiver status | < | ||
- | | 5 | actual Bus Configuration | < | ||
- | | 6 | Power supply | <voltage value> (e.g. 12950 mV) | | ||
- | | 10 | CPU ID | (e.g.: 0x411fc231) | | ||
- | | 13 | Free Heap | Total Heap (in byte): < | ||
- | | 14 | CRC check of application | CRC-32 application check < | ||
- | | 20 | BTM222 devicename | OOBD-Cup xxxxxxxx | | ||
- | | 21 | BTM222 UART speed | 4800/ | ||
- | |||
- | |||
- | ^ Protocols (Key 04) ^^ | ||
- | ^ Value ^ Protocol ^ | ||
- | | 1 | raw CAN | | ||
- | | 2 | [[http:// | ||
- | |||
- | |||
- | ^ Busses (Key 05) ^^ | ||
- | ^ Value ^ Bus ^ | ||
- | | 0 | Silent Mode, **default** after power up, reset and Busconfig change via P 6 x | | ||
- | | 1 | Loopback Mode | | ||
- | | 2 | Loopback Mode combined with Silent Mode | | ||
- | | 3 | Normal Mode | | ||
- | |||
- | ^ Reset (Key 99) ^^ | ||
- | ^ Value ^ kind of reset ^ | ||
- | | 1 | soft reset | | ||
- | | 2 | hard reset | | ||
- | |||
- | ===== Raw CAN & UDS ===== | ||
- | |||
- | ^ Value ^ Meaning, CAN-Interface **must be** set to **Normal Mode** afterwards wit parameter "P 5 3" ^ | ||
- | ^ Bus configuration (Key 06) ^^ | ||
- | | 1 | CAN Bus 11 bit ID 125kB | | ||
- | | 2 | CAN Bus 11 bit ID 250kB | | ||
- | | 3 | CAN Bus 11 bit ID 500kB | | ||
- | | 4 | CAN Bus 11 bit ID 1MB | | ||
- | | 5 | CAN Bus 29 bit ID 125kB | | ||
- | | 6 | CAN Bus 29 bit ID 250kB | | ||
- | | 7 | CAN Bus 29 bit ID 500kB | | ||
- | | 8 | CAN Bus 29 bit ID 1MB | | ||
- | |||
- | |||