Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
interface:syntax [2011/11/04 09:03] nexulminterface: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 = "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ; 
-  hex = "A" | "B" | "C" | "D" | "E" | "F" |"a" | "b" | "c" | "d" | "e" | "f" | digit ; 
- 
-===== Parameters ===== 
- 
-input: 
-  p key value <CR> 
-   
-where the definion is as follows 
- 
-  p = "p" | "P" ; 
-  key = number ; 
-  value = number ; 
-  number = digit , {digit } | "$" , hex , { hex } ; 
-   
-   
-===== Examples ===== 
- 
-Sending 11 bytes of data 
- 
-input: 
-   112233445566778899AABB 
- 
-if the number of input chars is not even, the last char is handled as MSB of the last byte, so 
- 
-   112233445566778899AAB 
- 
-is send as  
- 
-   112233445566778899AAB0 
- 
- 
-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 ''data'' locks the input until the receive tasks times out. 
- 
-====== 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    | Output System infos  | 
-|  1    |  0,1    |  Global    | set local echo on/off. 0=off, 1=on  | 
-|  2    |  0..2    Global    | set Linefeed (0=crlf, 1 = cr , 2 = lf  | 
-|  3    |  0..max |  Global    | set bus listening level. 0=off, all other values implementation specific | 
-|  4    |  0..max |  Global    | select Protocol | 
-|  5    |  0..max |  Protocol  | select Bus | 
-|  6    |  0..max |  Protocol  | select Bus configuration | 
-|  7    |  0..max |  Protocol  | set module answer Timeout (Unit: 10ms) | 
-|  8    |  0..max |  Protocol  | set "answer pending" answer Timeout (Unit: 10ms) | 
-|  9    |  0..max |  Protocol  | overwrite Blocksize with fixed value  (0= use the blocksize requested by module)| 
-|  10    |  0..max |  Protocol  | set  frame delay time (Unit: 10ms, 0= use the delay requested by module) | 
-|  11    |  0..max |  Protocol  | set Receiver ID | 
-|  12    0..max |  Protocol  | set tester present ON (value (dec or $xxx) = Receiver ID) | 
-|  13    0..max |  Protocol  | set tester present OFF (value (dec or $xxx) = Receiver ID) | 
-|  14    0..max |  Protocol  | set tester present frequency (Unit: 10ms) | 
-|  15    |  - |  -   | just for internal  | 
-|  16    |  0..max |  Protocol  | set Sender ID (value (dec or $xxx) (= awaited answer address, 0 disables)  | 
-|  99    |  0..max |  System  | system reset (= jumps back into bootloader)  | 
- 
- 
-^ System infos (Key 00) ^^^ 
-^  Value ^ Protocol ^ Format ^ 
-|  0     | version | OOBD <Design-ID> <Rev> [Build date](e.g.: OOBD D2 214 So 27. Feb 14:31:12 CET 2011) | 
-|  1     | serial number | xx:xx:xx:xx:xx:xx (=BTM222 MAC-Address) | 
-|  2     | actual Bus | <Bus-ID> [<Name>] (e.g.: 1 CAN) | 
-|  3     | actual Protocol | <value> [<Name>] (e.g.: 1 - UDS (ISO 14229-1) | 
-|  4     | actual CAN-Transceiver status | <Transceiver-Status> (e.g.: 0 - CAN Transceiver in 'Silent Mode') | 
-|  5     | actual Bus Configuration | <Configuration-ID> [<Name>] (e.g.: 3 - ISO 15765/4, CAN 11bit ID/500kBaud) | 
-|  6     | Power supply | <voltage value> (e.g. 12950 mV) | 
-|  10     | CPU ID | (e.g.: 0x411fc231) | 
-|  13     | Free Heap | Total Heap (in byte): <value>, Free Heap (in byte): <value> | 
-|  14     | CRC check of application | CRC-32 application check <passed>/<failed>! | 
-|  20     | BTM222 devicename | OOBD-Cup xxxxxxxx | 
-|  21     | BTM222 UART speed | 4800/9600/19200/38400/57600/115200/230400/460800 bit/s| 
- 
- 
-^ Protocols (Key 04) ^^ 
-^  Value ^ Protocol ^ 
-|  1     | raw CAN | 
-|  2     | [[http://de.wikipedia.org/wiki/Unified_Diagnostic_Services|UDS (ISO 14229-1)]] | 
- 
- 
-^ 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 | 
- 
-