1 Innovate Motorsports OT-1b/2 SDK Version 1.3 Disclaimer: Information in this document is being provided as-is without any warranty/guarantee
10 When our host connects to the OT-2 via Wi-Fi, it is virtually connecting to the physical serial OUT on the device. That is, it starts seeing the s
11 Not only does it see them, the second LC-1 specifically has to pass them on, transmitting them on its own serial OUT connector, for the data to ev
12 Second, ‘Commands’: Third, and finally, the more complicated ‘Query’: So, for MTS “In Band” communication (normal), the Host receives two k
13 Packets in General As covered above, in ‘in band’ (normal) MTS communication, hosts receive two types of packets, data, and query responses. The
14 The last piece of information that we generally care about is the packet type (remember, we have two): Word Bit15 Bit14 Bit 13 Bit 12 Bit 11 Bit
15 It has room for 13 bits of data, but all Innovate Devices only use 10 bits. The reason is legacy/historical. Notice that there is no indication of
16 000 Lambda valid, lambda value contains lambda reading in .001 lambda increments Offset by .5 lambda (0x000 = .5 lambda, 0x3FF = 1.523 lam
17 3 0 0 0 0 0 Ax19 Ax18 Ax17 0 Ax16 Ax15 Ax14 Ax13 Ax12 Ax11 Ax10 4 0 0 0 0 0 Ax29 Ax28 Ax27 0 Ax26 Ax25 Ax24 Ax23 Ax22 Ax21 Ax20 5 0 0 0 0
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 provide
19 At the time of this writing this would be: Device Channels LC-1 (fixed) 1 Lambda LM-1 (fixed) 1 Lambda (old) + 5 Aux LMA-3 (fixed) 5 Aux DL-32 (f
2 Table of Contents Revision History:...
20 Get to the Good Stuff! OK, you’ve waded though more stuff on in band MTS communication than any sane person would ever want to know. Just think o
21 This means that we are no longer receiving packets from the LC-1s in the example above. In addition, the gauge is no longer receiving information.
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
23 Command ‘S’ - Get Setup Mode Header Sent: 1 byte { U8 Cmd; // ‘S’ } Responds: 15 bytes { U8 VersionH; // Firmware version MSB
24 Command ‘j’ – Get OBD-II Connection Status Sent: 1 byte { U8 Cmd; // ‘j’ } Responds: 33 bytes { U8 Status; // Connection Status
25 Command ‘k’ – Get OBD-II Diagnostic Trouble Codes (DTCs) Sent: 1 byte { U8 Cmd; // ‘k’ } Responds: 33 bytes { U8 Count; // Number
26 Command ‘l’ – Get Last OBD-II Loop Time Sent: 1 byte { U8 Cmd; // ‘l’ } Responds: 2 bytes { U16 Time; // Time in mS of last OBD-I
27 Command ‘t’ – Get Basic Emissions Status Sent: 1 byte { U8 Cmd; // ‘t’ } Responds: 5 bytes { U8 Count; // char count (norm. 4) //
28 Command ‘C’ – Set Device Configuration Sent: 37 bytes { U8 Cmd; // ‘C’ U8 Channels; // Number of channels (16 max) U8 Protocol; // OBD
29 Command ‘M’ – Set ‘My’ (temporary) Device Configuration Sent: 37 bytes { U8 Cmd; // ‘M’ U8 Channels; // Number of channels (16 max) U8
3 Command ‘O’ – Output Data and (optionally) look for input ...42 Command ‘I’ – Look for Input Data ...
30 Command ‘w’ – Get Wi-Fi Settings Sent: 1 byte { U8 Cmd; // ‘w’ } Responds: 16 bytes { U8 HWAddr[6]; // MAC Address U32 IPAddr;
31 Command 0xFF – Don’t hang up on me! Sent: 1 bytes { U8 Cmd; // 0xFF } Responds: None Notes: This command merely gives you a way to t
32 Understanding OT-1b/2 Device Configuration To fully understand the Device Configuration (which can be obtained with the ‘c’ command, and set with
33 A separate diagram shows how low priority channels fit into the loop. Only one is read each time around. The manual then shows this scheme
34 Now that we understand ‘Normalized PIDs’ and ‘Priority’, let’s look at the response to the ‘Get Configuration’ (‘c’) command again: Responds: 3
35 Benefits of In Band Mode The reasons for Innovate using MTS In Band Mode are pretty clear, it makes OBD-II compatible with our existing product l
36 Expert Modes As mentioned earlier, Expert Modes are entered using the ‘e’ command from Setup Mode. They are specialized ‘sub modes’, each dedicat
37 Unlike In Band mode, MTS packets are not ‘pushed’ to the virtual OUT connection in Expert Modes. You can poll the last MTS packet passed with t
38 Special Considerations Entering Expert Modes Before entering an Expert Mode, the OT-1b/2 firmware cleanly suspends the thread that normally does
39 Can The general flow with Can Expert Mode (‘e’<1>), is: 1. Select a rate (250 Kbit or 500 Kbit) 2. Set up filters for the CAN identifier
4 IMS USB under Windows...64 Other Platforms ...
40 Command ‘r’ – Get the Protocol Rate Sent: 1 byte { U8 Cmd; // ‘r’ } Responds: 1 byte { U8 Result; // Current rate // 1 = 250 Kbit
41 Command ‘f’ – Clear all Pass Filters Sent: 1 byte { U8 Cmd; // ‘f’ } Responds: 1 byte { U8 Result; // Should be 0 } Notes: Clear a
42 Command ‘e’ – Clear all Handshake Filters Sent: 1 byte { U8 Cmd; // ‘e’ } Responds: 1 byte { U8 Result; // Should be 0 } Notes: Cl
43 Command ‘I’ – Look for Input Data Sent: 3 bytes { U8 Cmd; // ‘I’ U8 Timeout; // Timeout (in mS) for responses U8 Replies; /
44 Command ‘b’ – Get Last MTS Packet passed Sent: 1 bytes { U8 Cmd; // ‘b’ } Responds: Variable (2 bytes minimum) { U8 Len; // Length o
45 J1850 The general flow with J1850 Expert Mode (‘e’<2>), is: 1. Select a ‘rate’ (PWM or VPW, really selecting rate, voltage and encoding)
46 Command ‘F’ – Add a Pass Filter Sent: 7 bytes { U8 Cmd; // ‘F’ U8 Header; // Header to pass on U8 Destination; // Destination address t
47 Command ‘O’ – Output Data and (optionally) look for input Sent: Variable { U8 Cmd; // ‘O’ U8 Timeout; // Timeout (in mS) for respons
48 Command ‘I’ – Look for Input Data Sent: 3 bytes { U8 Cmd; // ‘I’ U8 Timeout; // Timeout (in mS) for responses U8 Replies; /
49 Command ‘b’ – Get Last MTS Packet passed Sent: 1 bytes { U8 Cmd; // ‘b’ } Responds: Variable (2 bytes minimum) { U8 Len; // Length o
5 Revision History: Rev Date Author Description 1.0 11/20/09 jjf Initial version 1.1 12/02/09 jjf Structure typo fixes in Setup Mode
50 ISO The general flow with ISO Expert Mode (‘e’<3>), is: 1. Select a protocol (ISO 9141 or KWP 2000) 2. Setup filters for the messages y
51 Command ‘F’ – Add a Pass Filter Sent: 7 bytes { U8 Cmd; // ‘F’ U8 Header; // Header to pass on U8 Destination; // Destination address t
52 Command ‘O’ – Output Data and (optionally) look for input Sent: Variable { U8 Cmd; // ‘O’ U8 Timeout; // Timeout (in mS) for
53 Command ‘I’ – Look for Input Data Sent: 3 bytes { U8 Cmd; // ‘I’ U8 Timeout; // Timeout (in mS) for responses U8 DataLen; /
54 Command ‘5’ – Perform standard 5 Baud Initialization Sent: 1 byte { U8 Cmd; // ‘5’ } Responds: 1 byte { U8 Result; // 0=failed
55 Command ‘L’ – Set the Vehicle LED State Sent: 2 bytes { U8 Cmd; // ‘L’ U8 State; // 0 = off // 1 = on } Responds: 1 byte { U8 Res
56 Command 0xFF – Don’t hang up on me! Sent: 1 bytes { U8 Cmd; // 0xFF } Responds: 1 byte { U8 Result; // should be 0xFF
57 ISO Raw The general flow with ISO Raw Expert Mode (‘e’<4>), is: 1. Select a baud rate 2. Output bytes and optionally receive bytes ISO
58 Command ‘O’ – Output Data and (optionally) look for input Sent: Variable { U8 Cmd; // ‘O’ U8 Timeout; // Timeout (in mS) for
59 Command ‘I’ – Look for Input Data Sent: 3 bytes { U8 Cmd; // ‘I’ U8 Timeout; // Timeout (in mS) for responses U8 Replies; /
6 Introduction Welcome to the world of OT-1b/2 Programming! Hopefully, this document and the accompanying sample applications should make the proces
60 Command ‘5’ – Perform standard 5 Baud Initialization Sent: 1 byte { U8 Cmd; // ‘5’ } Responds: 1 byte { U8 Result; // 0=failed
61 Command ‘0’ – Send a 00h at 5 baud on the K line Sent: 1 byte { U8 Cmd; // ‘0’ } Responds: 1 byte { U8 Result; // always 1 } Not
62 Command ‘b’ – Get Last MTS Packet passed Sent: 1 bytes { U8 Cmd; // ‘b’ } Responds: Variable (2 bytes minimum) { U8 Len; // Length o
63 But How Do I Connect?! If you have reached this point, you now have a wealth of information. You know how to read MTS packets, configure the OT-1
64 Tablet’, via serial plug-and-play. This requires fiddling with the Windows device manager to rectify. Perhaps one of the most frustrating problems
65 The interface is byte oriented, and only involves a few calls: Discovery BOOL imsusbCanConnect(BOOL *inuse); // OUT: indicates if the reason fo
66 Send a byte to the device. Returns: TRUE on success, FALSE on failure int imsusbPutBytes(int len, // Number of bytes to write BYTE *d
67 So no host network configuration should normally be necessary, aside from connecting to the ad hoc network above OK, now that the down and dirty
68 // All in BIG Endian !!!! typedef struct { U8 ProtoID[8]; // protocol ID = "IMS Net" U16 OpCode; // == IMSNET_OPCODE_POLL
69 Special Considerations for Network/Wi-Fi Although, in general, network programming with the OT-2 is straightforward, there are some special consi
7 MTS when they see it. So, if you are only connecting through an OT-1b/2, you should never have to worry about the older format. Although a substan
70 you can circumvent it another way. In our own Windows software, we send the bogus MTS Query 0xFF each time we receive an in band packet. These que
71 Samples They say that a line of code is worth a thousand words. I suppose that depends on the code. However, it is generally helpful to have work
72 Appendix A: Normalized PIDs This table gives names, descriptions, units, and ranges to scale MTS samples (0-1023) to. For the ECU mode 1 PID asso
73 "OBD_O2S11", "O2 Sensor(NB) 1-1", "Volts", 0.0, 1.275, "OBD_SHRTFT11","O2 Fuel Trim 1-1&quo
74 "TIMING", "Ignition Timing", "deg", -10.0, 50.0, "MAP3BA", "MAP 3Ba", "PS
75 0x31, "CLR_DIST - Dist. MIL clear", 0x30, "WARM_UPS - Since MIL clear", 0x1F, "RUNTM - Run Time", 0x14,
76 Appendix B – Determining Normalized PID Availability Although it is possible to use the ‘a’ command in Setup Mode to determine if a normalized PI
8 As the outline on the diagram above shows, this SDK covers, generically, how to communicate with Innovate devices via either our universal USB dr
9 MTS Basics (or “Serial 2 revisited”) Regardless of how you physically connect to an OT-1B/2, its default behavior is to continuously send a stream
Commentaires sur ces manuels