Command ‘i’ – look for input data – Innovate Motorsports OT-2 SDK User Manual

Page 53

Advertising
background image

53

Command ‘I’ – Look for Input Data

Sent:

3 bytes
{

U8 Cmd;

// ‘I’

U8 Timeout;

// Timeout (in mS) for responses

U8 DataLen;

// Expected data bytes in replies

// 1-7, (0 will be treated as 7)

U8 Replies;

// Expected number of replies

}


Responds:

Variable (1 byte minimum)
{

// Optional

{

U8 Len;

// Data length of packet

// Bit 7 set indicates csum failure

U8 Data[Len];

// Received Data

}
U8 End;

// Always 0xFF

}


Notes:

Timeout is basically P2. If replies is set, the 0xFF will
be returned after either a) the desired number of bytes is
received or b) this time is reached without a received
byte.

Timeout cannot be set to 0, doing do will default to a
timeout of 150 mS.

DataLen is the expected number of J1979 data bytes in
responses (1-7). You really want to set this. If you do
not, then the unit has to wait for timers to expire,
because ISO protocols do not nec. have packet length
fields. If you set it to 0, then, depending on the
protocol, you may have to wait for full timeout per
response (slooow).

ByteDelay can be set to zero, but the ISO 9141 and KWP 2000
protocols require 5 (we’ve found that 6 helps with older
Japanese vehicles).

Advertising