"server" represents the name of a GM server.
Substitute a below upper case word in place of "server" in function call. Words after the equal sign or a description, do not include in the function call.
ENGINE = Powertrain or Vehicle Control Module (PCM) or (VCM)
TRANS = Transmission Controller (TCM)
TRANSFER = Active Transfer Case
ABS28 = Anti Lock Brake System (ABS) server number 28 note: most vehciles will ues number 28
ABS29 = Anti Lock Brake System (ABS) sever number 29
TRACTION = Traction Control System (TCS)
DAMP = Real Time Damping
BODY = Body Control Module (BCM)
INSTMOD = Instrument Panel Module (IPM)
REAR = Rear Integrated Module (RIM)
SENSING = Sensing Diagnostic Module or Air Bag (SDM)
INSTCLUST = Instrument Panel Cluster (IPC)
DRIVERINFO = Driver Information Display
HEADUP = Head Up Display (HUD)
BATTERY = Battery Pack Control Module
RADIO = Radio
AMP = Amplifier
CD = Compact Disk (CD) changer
CELL = Cellular Phone
NAV = Navigation
ONSTAR = On Star
HVAC = Heating, Ventilation and Air Condition(HVAC) Control Module
CLIMATE = Climate control module
DRIVEDOOR = Driver door module
PASSDOOR = Passenger door module
MEMSEAT = Memory seat module
SEAT = Seat control module
TILT = Tilt telescope module
MIRROR = Memory mirror module
FUNCTION = Remote Function Actuator
THEFT = Vehicle Theft Deterrent (VTD)
IMMOBILE = Vehicle Immobilizer Module
Example to request enhanced trouble codes for GM engine call DTCGM_ENGINE_MIL=get|
Example to clear enhanced trouble codes in GM Radio call CLEARGM_RADIO=get|
MIL is a abbreviation for Malfunction Warning Light. These or codes that have commanded the light on.
HISTORY will report past trouble codes.
PENDING will report trouble codes that are presently failing.
Exmaple to request enhanced trouble codees for GM engine call DTCGM_ENGINE_MIL=get|
The return DataList value will contain the enhanced GM trouble code number in SAE format Pxxxx, Bxxxx, Cxxxx, or Uxxxx
followed by a status description. Typical the status description will be same for all codes returned and can be a sentence with up to 320 characters.
It is recommended to allocate the LPCTSTR DataList to 2048 bytes to allow for multiple trouble codes with different status descriptions
e=OMGetData(TEXT(\"ABOUT=get\"),Values,NULL);
ABOUT= Rev3 11-15-04, OBD Network DAQ API Copyright 1995-2004 Alex C. Peper Car Code www.obd-2.com. Refererences: 1) Data Acquistion API Copyright 2001-2002 Keith Leinenbach One Man And A Cat Software onecatweb.com. 2) SAE. 3) ISO. 4) EPA. Not responsible for any damages|
Used to obtain driver information, call back not available
e=OMGetData(TEXT(\"SECURITY=set test|\"),Values,NULL);
SECURITY=test|
Will return all data list requests with a default values, does not use car network or require password
e=OMGetData(TEXT(\"SECURITY=set xxx|\"),Values,NULL);
SECURITY=ok|
SECURITY=violation|
required to obtain vehicle network access, xxx is a assigned password, call back not available
e=OMGetData(TEXT(\"SECURITY=get|\"),Values,NULL);
SECURITY=ok|
SECURITY=test|
SECURITY=violation|
returns curent security status
e=OMGetData( TEXT("PORT_NUM=get|"),Values,NULL );
PORT_NUM=x|
returns current serial com port number x as set. Default is 1
e=OMGetData( TEXT("PORT_NUM=set x |"),Values,NULL );
PORT_NUM=x|
sets serial com port number to x
e= 10 if error
Note: not called in sample program uses defualt com port 1
e=OMGetData( TEXT("PORT_BAUD=set 19200|"),Values,NULL );
PORT_BAUD=19200|
e= 11 error return number TEXT("Comm Port baud"), //11
Use only 19200 baud rate for Tricom
e=OMGetData( TEXT("LOGIN_VPW=get|LOGIN_PWM=get|LOGIN_91412=get|"),Values,NULL );
requests network type, above will check all 3 until one is found
if PWM network is found will return
LOGIN_PWM=True|
if none of above example is found will return
LOGIN_PWM=False|LOGIN_PWM=False|LOGIN_91412=False|
Response time minimum = 250 ms maximum = 12 sec.
e=Error return numbers
TEXT("Route Box no response"), //15
No vehcile power to router, serial gateway not connected, client serial inteface not correct
TEXT("Route Box invalid response"), //16
Client serial inteface not correct, gateway checksum error.
TEXT("Network invalid response"), //17
Unsupported network message, router crc or checksum error.
e=OMGetData( TEXT("DTC03=get"),Values,NULL );
DTC03=,P0143,P0146,|
DTC03=,0000,| //Server response for no codes
DTC03=No Client Response| //no connection
DTC03=No Server Response| //Possible server response for no codes
requsets legislated mode 03 diagnostic trouble codes.
returns list of code numbers with ,delimeters,
response time 400 - 1200 ms
e=OMGetData( TEXT("DTC07=get"),Values,NULL );
DTC07=,P0143,P0146,|
DTC03=,0000,| //Server response for no codes
DTC07=No Client Response| //no connection
DTC07=No Server Response| //Possible server response for no codes
requsets legislated mode 07 pending diagnostic trouble codes.
returns list of code numbers with , delimeters
response time 400 - 1200 ms
e=OMGetData( TEXT("CLEAR04=get"),Values,NULL );
CLEAR04=True|
CLEAR04=No Client Response| //no connection
CLEAR04=No Server Response| //resend if low bandwidth, try with engine off
requests legislated mode 04 code clear
returns True if vehicle server acknowleged
response time 400 - 1200 ms
e=OMGetData( TEXT("DTCGM_ENGINE_HISTORY=get"),Values,NULL );
e=OMGetData( TEXT("DTCGM_ENGINE_MIL=get"),Values,NULL );
e=OMGetData( TEXT("DTCGM_ENGINE_PENDING=get"),Values,NULL );
DTCGM_ENGINE_HISTORY=P0143,enhanced GM status report sentence,|
DTCGM_ENGINE_MIL=P0143,enhanced GM status report sentence,P0146,another sentence|
DTCGM_ENGINE_PENDING=P0143,PO146,enhanced GM status report sentence,|
Requests enhanced GM trouble code for a named server and status type
Returns enhanced GM trouble code number with a status report.
e=OMGetData( TEXT("CLEARGM_ENGINE=get"),Values,NULL );
CLEARGM_ENGINE=True|
CLEAR04=No Client Response| //no connection
CLEAR04=No Server Response| //resend if low bandwidth, try with engine off
Requests enhanced GM code clear for a named server
returns True if vehicle server acknowledged
response time 400 - 1200 ms
e=OMGetData( TEXT("LOGOUT=set|"),(LPTSTR)Values,NULL );
LOGOUT=True|
LOGOUT=False|
Logs off network if required and closes serial com port
typedef void (WINAPI * OMCallback) (LPTSTR,int); TCHAR *Error[19] = { TEXT("No Errors"), //0 TEXT("Comm Port error 55. Port already open"), //1 TEXT("Comm Port open I/O"), //2 TEXT("Comm Port set time outs"), //3 TEXT("Comm Port set buffers"), //4 TEXT("Comm Port purge buffers"), //5 TEXT("Comm Port get state"), //6 TEXT("Comm Port close I/O"), //7 TEXT("Comm Port send"), //8 TEXT("Comm Port recv."), //9 TEXT("Comm Port number"), //10 TEXT("Comm Port baud"), //11 TEXT("Comm Port reserved"), //12 TEXT("Datalist size under 5"), //13 TEXT("Datalist size over 255"), //14 TEXT("Route Box no response"), //15 TEXT("Route Box invalid response"), //16 TEXT("Network invalid response"), //17 TEXT("Invalid stream size") //18 }; extern "C" int __declspec(dllexport) WINAPI OMGetCaps( LPTSTR Capabilities ); extern "C" int __declspec(dllexport) WINAPI OMGetData( LPCTSTR DataList, LPTSTR Values, OMCallback Callback );