Innovate Motorsports OT-2 SDK User Manual

Page 18

Advertising
background image

18

N

0

0

0

0

0

0

0

D7

0

D6

D5

D3

D3

D2

D1

D0


This leaves the 4 Words (sometimes easier to think of as 8 bytes in this case) that each
device provides in the response. The response to the 0xCE query you can probably guess.
The 8 bytes contain the Device’s ASCII name, padded to 8 bytes with zeros. Since users
can alter the names, and the default names are the type of device, we use this name
information to provide somewhat descriptive default channel names in our software.
The response to 0xF3, query device types, is also 8 bytes, and contains the following
information:

Byte

0-1

2-5

6

7

Description

Firmware

Version

Identifier

CPU

Channels/Flags


The first two bytes contain the firmware version, encoded in nibbles (Big Endian). For
example, 1.23a would be 0x12 0x3A. The last nibble should be ignored, since it
represents type of build (beta, manufacturing, update dld file, etc.). However, you will
want to pay attention to the upper three nibbles. This SDK requires version 1.02 (0x102n)
or higher to work. All OT-2 units meet this requirement, but OT-1b units may require
firmware update.

The next four bytes are a unique device identifier. This would be “OT1B” or “OT2 ”
(note the trailing space character) for the two devices covered by this SDK. Again, if you
are connected to an OT-2 via Wi-Fi, this is not really something you have to check. But if
you are connected via USB, then you definitely need to check, because you could be
connected to something completely different, like an LM-2.

The CPU byte is a number that represents the CPU and clock speed of the device. This is
only of interest to LM Programmer for firmware updates, so I have no idea why it is
included here, so do not ask.

The last byte is of real interest, but its meaning is device specific. For devices which have
fixed numbers of channels, like the LC-1 and the TC-4, this byte carries some hardware
related flags. In devices that have variable numbers of channels, like the OT-1b/2 and
LM-2, this byte gives information on how many channels that the device is currently
adding to data packets. For the OT-1, OT-1B, and OT-2, using type byte this is simple.
The byte is a binary count of Aux Channels currently being generated.

So, if you are only interested in OT-1b/2 channels, it is not too complicated. You can get
the device type, check this byte, and know that the last n channels in every MTS data
packet are the channels you are interested in.

If you are specifically interested in channels from other devices, it gets more
complicated. You need to know how many channels the fixed count devices each
produce, and you need to understand how the LM-2 uses this byte, which is a bit more
complicated because it can provide variable numbers of both Aux and Lambda channels.

Advertising