Innovate-motorsports OT-2 SDK User Manual

Browse online or download User Manual for Measuring instruments Innovate-motorsports OT-2 SDK. Innovate Motorsports OT-2 SDK User Manual

  • Download
  • Add to my manuals
  • Print
  • Page
    / 76
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 0
1
Innovate Motorsports
OT-1b/2 SDK
Version 1.3
Disclaimer: Information in this document is being provided as-is without any
warranty/guarantee of any kind. Innovate Motorsports has taken all reasonable
measures to ensure the quality, reliability, and accuracy of the information in this
document. But if you corrupt an ECU, melt the casing off your computer, or
experience some other terrible calamity, it is not our problem. Feel free to let us
know, we might enjoy laughing at your misfortune, but please do not sue us. You
have been warned!
Page view 0
1 2 3 4 5 6 ... 75 76

Summary of Contents

Page 1 - Version 1.3

1 Innovate Motorsports OT-1b/2 SDK Version 1.3 Disclaimer: Information in this document is being provided as-is without any warranty/guarantee

Page 2 - Table of Contents

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

Page 3

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

Page 4

12 Second, ‘Commands’: Third, and finally, the more complicated ‘Query’: So, for MTS “In Band” communication (normal), the Host receives two k

Page 5 - Revision History:

13 Packets in General As covered above, in ‘in band’ (normal) MTS communication, hosts receive two types of packets, data, and query responses. The

Page 6 - Introduction

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

Page 7

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

Page 8 - Prerequisites

16 000 Lambda valid, lambda value contains lambda reading in .001 lambda increments Offset by .5 lambda (0x000 = .5 lambda, 0x3FF = 1.523 lam

Page 9 - Basic Scheme

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

Page 10

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

Page 11

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

Page 12

2 Table of Contents Revision History:...

Page 13 - Packets in General

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

Page 14 - Data Packets

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.

Page 15 - ‘New’ Lambda/AFR Channels

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

Page 16

23 Command ‘S’ - Get Setup Mode Header Sent: 1 byte { U8 Cmd; // ‘S’ } Responds: 15 bytes { U8 VersionH; // Firmware version MSB

Page 17 - Response Packets

24 Command ‘j’ – Get OBD-II Connection Status Sent: 1 byte { U8 Cmd; // ‘j’ } Responds: 33 bytes { U8 Status; // Connection Status

Page 18

25 Command ‘k’ – Get OBD-II Diagnostic Trouble Codes (DTCs) Sent: 1 byte { U8 Cmd; // ‘k’ } Responds: 33 bytes { U8 Count; // Number

Page 19 - Commands

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

Page 20 - Get to the Good Stuff!

27 Command ‘t’ – Get Basic Emissions Status Sent: 1 byte { U8 Cmd; // ‘t’ } Responds: 5 bytes { U8 Count; // char count (norm. 4) //

Page 21

28 Command ‘C’ – Set Device Configuration Sent: 37 bytes { U8 Cmd; // ‘C’ U8 Channels; // Number of channels (16 max) U8 Protocol; // OBD

Page 22 - Setup Mode Commands

29 Command ‘M’ – Set ‘My’ (temporary) Device Configuration Sent: 37 bytes { U8 Cmd; // ‘M’ U8 Channels; // Number of channels (16 max) U8

Page 23

3 Command ‘O’ – Output Data and (optionally) look for input ...42 Command ‘I’ – Look for Input Data ...

Page 24

30 Command ‘w’ – Get Wi-Fi Settings Sent: 1 byte { U8 Cmd; // ‘w’ } Responds: 16 bytes { U8 HWAddr[6]; // MAC Address U32 IPAddr;

Page 25

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

Page 26

32 Understanding OT-1b/2 Device Configuration To fully understand the Device Configuration (which can be obtained with the ‘c’ command, and set with

Page 27

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

Page 28

34 Now that we understand ‘Normalized PIDs’ and ‘Priority’, let’s look at the response to the ‘Get Configuration’ (‘c’) command again: Responds: 3

Page 29

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

Page 30

36 Expert Modes As mentioned earlier, Expert Modes are entered using the ‘e’ command from Setup Mode. They are specialized ‘sub modes’, each dedicat

Page 31

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

Page 32

38 Special Considerations Entering Expert Modes Before entering an Expert Mode, the OT-1b/2 firmware cleanly suspends the thread that normally does

Page 33

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

Page 34

4 IMS USB under Windows...64 Other Platforms ...

Page 35 - Benefits of In Band Mode

40 Command ‘r’ – Get the Protocol Rate Sent: 1 byte { U8 Cmd; // ‘r’ } Responds: 1 byte { U8 Result; // Current rate // 1 = 250 Kbit

Page 36 - Expert Modes

41 Command ‘f’ – Clear all Pass Filters Sent: 1 byte { U8 Cmd; // ‘f’ } Responds: 1 byte { U8 Result; // Should be 0 } Notes: Clear a

Page 37

42 Command ‘e’ – Clear all Handshake Filters Sent: 1 byte { U8 Cmd; // ‘e’ } Responds: 1 byte { U8 Result; // Should be 0 } Notes: Cl

Page 38

43 Command ‘I’ – Look for Input Data Sent: 3 bytes { U8 Cmd; // ‘I’ U8 Timeout; // Timeout (in mS) for responses U8 Replies; /

Page 39

44 Command ‘b’ – Get Last MTS Packet passed Sent: 1 bytes { U8 Cmd; // ‘b’ } Responds: Variable (2 bytes minimum) { U8 Len; // Length o

Page 40

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)

Page 41

46 Command ‘F’ – Add a Pass Filter Sent: 7 bytes { U8 Cmd; // ‘F’ U8 Header; // Header to pass on U8 Destination; // Destination address t

Page 42

47 Command ‘O’ – Output Data and (optionally) look for input Sent: Variable { U8 Cmd; // ‘O’ U8 Timeout; // Timeout (in mS) for respons

Page 43

48 Command ‘I’ – Look for Input Data Sent: 3 bytes { U8 Cmd; // ‘I’ U8 Timeout; // Timeout (in mS) for responses U8 Replies; /

Page 44

49 Command ‘b’ – Get Last MTS Packet passed Sent: 1 bytes { U8 Cmd; // ‘b’ } Responds: Variable (2 bytes minimum) { U8 Len; // Length o

Page 45

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

Page 46

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

Page 47

51 Command ‘F’ – Add a Pass Filter Sent: 7 bytes { U8 Cmd; // ‘F’ U8 Header; // Header to pass on U8 Destination; // Destination address t

Page 48

52 Command ‘O’ – Output Data and (optionally) look for input Sent: Variable { U8 Cmd; // ‘O’ U8 Timeout; // Timeout (in mS) for

Page 49

53 Command ‘I’ – Look for Input Data Sent: 3 bytes { U8 Cmd; // ‘I’ U8 Timeout; // Timeout (in mS) for responses U8 DataLen; /

Page 50

54 Command ‘5’ – Perform standard 5 Baud Initialization Sent: 1 byte { U8 Cmd; // ‘5’ } Responds: 1 byte { U8 Result; // 0=failed

Page 51

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

Page 52 -

56 Command 0xFF – Don’t hang up on me! Sent: 1 bytes { U8 Cmd; // 0xFF } Responds: 1 byte { U8 Result; // should be 0xFF

Page 53

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

Page 54

58 Command ‘O’ – Output Data and (optionally) look for input Sent: Variable { U8 Cmd; // ‘O’ U8 Timeout; // Timeout (in mS) for

Page 55

59 Command ‘I’ – Look for Input Data Sent: 3 bytes { U8 Cmd; // ‘I’ U8 Timeout; // Timeout (in mS) for responses U8 Replies; /

Page 56

6 Introduction Welcome to the world of OT-1b/2 Programming! Hopefully, this document and the accompanying sample applications should make the proces

Page 57 - ISO Raw

60 Command ‘5’ – Perform standard 5 Baud Initialization Sent: 1 byte { U8 Cmd; // ‘5’ } Responds: 1 byte { U8 Result; // 0=failed

Page 58

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

Page 59

62 Command ‘b’ – Get Last MTS Packet passed Sent: 1 bytes { U8 Cmd; // ‘b’ } Responds: Variable (2 bytes minimum) { U8 Len; // Length o

Page 60

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

Page 61

64 Tablet’, via serial plug-and-play. This requires fiddling with the Windows device manager to rectify. Perhaps one of the most frustrating problems

Page 62

65 The interface is byte oriented, and only involves a few calls: Discovery BOOL imsusbCanConnect(BOOL *inuse); // OUT: indicates if the reason fo

Page 63 - But How Do I Connect?!

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

Page 64 - IMS USB under Windows

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

Page 65

68 // All in BIG Endian !!!! typedef struct { U8 ProtoID[8]; // protocol ID = "IMS Net" U16 OpCode; // == IMSNET_OPCODE_POLL

Page 66 - IMS NET (Wi-Fi)

69 Special Considerations for Network/Wi-Fi Although, in general, network programming with the OT-2 is straightforward, there are some special consi

Page 67

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

Page 68

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

Page 69 - Performance

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

Page 70 - Debugging

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

Page 71 - Samples

73 "OBD_O2S11", "O2 Sensor(NB) 1-1", "Volts", 0.0, 1.275, "OBD_SHRTFT11","O2 Fuel Trim 1-1&quo

Page 72 - Appendix A: Normalized PIDs

74 "TIMING", "Ignition Timing", "deg", -10.0, 50.0, "MAP3BA", "MAP 3Ba", "PS

Page 73 - Common non-OBD IMS Inputs:

75 0x31, "CLR_DIST - Dist. MIL clear", 0x30, "WARM_UPS - Since MIL clear", 0x1F, "RUNTM - Run Time", 0x14,

Page 74

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

Page 75

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

Page 76

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

Comments to this Manuals

No comments