Innovate Motorsports OT-2 SDK User Manual

Page 22

Advertising
background image

22

The Firmware Version and Identifier should be exactly the same as the response that you
got for the in band Query Device Types (0xF3). This can be a handy way to ‘sync’ when
entering Setup Mode.

Since data packets have been streaming, you may have an indeterminate amount of data
buffered up. You can send the ‘S’ command, and then parse the data stream until you find
the expected Firmware Version and Identifier. Discard 9 more bytes and you are ready to
begin using Setup Mode Commands.

Setup Mode Commands


Note: Many of the commands below assume you have a basic knowledge of OBD-II. It is
beyond the scope of this SDK to fully cover this, but a good background article can be
found here:

http://www.dakota-truck.net/OBD2/obd2.html


And, although I am loathe to cite it, Wikipedia has some pretty good general material on
the subject (though, since anyone can edit it, that can easily change):

http://en.wikipedia.org/wiki/OBD-II#OBD-II


That out of the way, back to the subject at hand; unlike in-band mode, Setup Mode is not
packeted, and commands and responses are variable in length. There is no terminator or
delimiter (<cr>, <lf>, etc.), bytes are processed as they are received.

Important: In the following list, commands and/or responses are often documented as
pseudo C structures. In all cases, the structures are byte packed (no padding or alignment
bytes) and values are stored in little endian (yes, ‘in band’ communication is all big
endian, but Setup Mode is device specific and the OT-1b/2 is little endian).

Also note, U8, U16, U32, S8, S16, etc. represent unsigned and signed values of the given
number of bits, again in little endian. No, the world does not need yet another set of
standard data types, but we often share code between firmware and host software, so we
have standardized on these.

Similarly, while the example applications generally use defines for various return values,
the following explanations will typically include absolute numbers. This is simply a
matter of preference. I, personally, like to be able to use this sort of reference to
immediately interpret what I am seeing. Using defines adds an extra level of complexity,
since the matching header files, etc. have to be referenced as well.

Advertising