beautypg.com

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

Page 59

background image

59

Command ‘I’ – Look for Input Data

Sent:

3 bytes
{

U8 Cmd;

// ‘I’

U8 Timeout;

// Timeout (in mS) for responses

U8 Replies;

// Expected number of replies

}


Responds:

Variable (1 byte minimum)
{

// Optional

{

U8 Len;

// Data length of packet

U8 Data[Len];

// Received Data

}
U8 End;

// Always 0xFF

}


Notes:

Replies is for BYTES, not packets. This expert mode has no
understanding of packets, it leaves that entirely up to
you. Unlike J1850, which will calculate CRC for you,
checksum bytes, etc., are entirely your responsibility (CRC
is a pain, but we figured you can add!)

Timeout is per byte received. 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.

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).