Hardware Information: KWP2000 / BDLC card


External D-9 connector pinout

Pin # Channel Assignment
011K
021K-12VTERM
031K-24VTERM
042J1850 BUS
051 and 2V- IN/GND
061L
071L-12VTERM
081L-24VTERM
091V+ IN

BUS termination requirements

ConfigurationTermination
ECU/VehicleNo Additional jumpers
Tester/12V VbatTie pins 2 and 7 to pin 9(Vbat)
Tester/24V VbatTie Pins 3 and 8 to pin 9(Vbat)

Event definitions


The following values may be transmitted as FT_EVENT type GCProtocol frames.
The event value will be in the event field of such a frame.
Note: Please see the include file dev_kwp.h for numeric values of the following symbols.

Note: Please see the documentation on the GM J1850 (DLC) card for info regarding the BDLC channel.

The following event documentation is based on the original version of the KWP card.
Event nameEvent meaning
GKWPWAKEFIVEfive baud wake up seen (Please see NOTE 1)
byte 0 - five baud address (tester)
byte 1 - sync byte (ecu)
byte 2 - first keybyte (ecu)
byte 3 - second keybyte (ecu)
byte 4 - inverted second keybyte (tester)
byte 5 - inverted address (ecu)
byte 6 - status 0 = timing good
GKWPWAKEFASTfast wake up seen
byte 0 - the wake up as interpretted by a uart, i.e. usually 0xf0
byte 1-5 - the start communication request message
byte 6 - the start communication response message
GKWPBUSIDLEintermessage time elapsed since last byte
byte 0,1 - time expired (in units of half milliseconds network byte order)

 

The following event documentation is based on observing the current version of the KWP card.
Event namebyte(s)Event meaning
GKWPWAKEFASTfast wake up seen
0set to zero by the KWP2000 driver
1message status byte; it should be 0x04
2-6the wakeup request message: 3 header bytes, 1 data byte and a checksum
    Format: 0x81 or 0xC1 for physical / logical addressing
    Target address
    Source address
    startCommunication Request Service Id: 0x81
    Checksum
7message status byte; it should be 0x04
8-14the wakeup response message: 3 header bytes, 3 data bytes and a checksum
    Format: 0x83 or 0xC3 for physical / logical addressing
    Target address
    Source address
    startCommunication Positive Response Service Id: 0xC1
    Key byte 1
    Key byte 2
    Checksum
15message status byte; it should be 0x04
16 should be 0x00

Please also see generic events for non card-specific events.


NOTE 1:Any length of data should be tolerated by client. Currently implemented lengths are 1 (i.e. an unsuccessful wake up) and 7. Longer data lengths may occur in the future if more information is appended to this event.

Card-specific IOCTL definitions


These values are used with the CMD_CARD_IOCTL command.
The protocol P and W timing values and their default values are shown on the far right for GKWPSETPTIMES and GKWPSETWTIMES.
Please see the include file dev_kwp.h for numeric values of IOCTLS and data field bit assignments.
Note: Please see the documentation on the GM J1850 (DLC) card for info regarding the BDLC channel.

IOCTL nameFunctionData field length/purpose
GKWPSETPTIMES Set P Times 24 data bytes:(half milliseconds, 'x86' byte order)
Byte 0,1 - P1 rx min
Byte 2,3 - P1 rx max P1 max   (20ms)
Byte 4,5 - P1 tx P1 min   (0ms)
Byte 6,7 - P2 rx min
Byte 8,9 - P2 rx max P2 max   (50ms)
Byte 10,11 - P2 tx P2 min   (25ms)
Byte 12,13 - P3 rx min
Byte 14,15 - P3 rx max P3 max   (5,000ms)
Byte 16,17 - P3 tx P3 min   (55ms)
Byte 18,19 - P4 rx min
Byte 20,21 - P4 rx max P4 max   (20ms)
Byte 22,23 - P4 tx P4 min   (5ms)
GKWPSETWTIMES Set W Times 30 data bytes:(half milliseconds, 'x86' byte order)
Byte 0,1 - W1 rx min
Byte 2,3 - W1 rx max W1 max   (300ms)
Byte 4,5 - W1 tx W1 min   (60ms)
Byte 6,7 - W2 rx min
Byte 8,9 - W2 rx max W2 max   (20ms)
Byte 10,11 - W2 tx W2 min   (5ms)
Byte 12,13 - W3 rx min
Byte 14,15 - W3 rx max W3 max   (20ms)
Byte 16,17 - W3 tx W3 min   (0ms)
Byte 18,19 - W4 rx min
Byte 20,21 - W4 rx max W4 max   (50ms)
Byte 22,23 - W4 tx W4 min   (25ms)
Byte 24,25 - W5 rx min
Byte 26,27 - W5 rx max W5 max   (30,000ms)
Byte 28,29 - W5 tx W5 min   (300ms)
GKWPDOWAKEUP Send wake up0 data bytes:
GKWPGETBITTIME Get Bit Time2 data bytes returned: bit time (microseconds, 'x86' byte order) 0x0060=10,417 bits/sec (10,400 bits/sec nominal)
GKWPSETBITTIME Set Bit Time2 data bytes:bit time (microseconds, 'x86' byte order) 0x0060=10,417 bits/sec (10,400 bits/sec nominal)
GKWPSETNODEADDR Set node address1 data bytes: Node Address
GKWPGETNODETYPE Get node type1 data bytes returned: GKWPMONITOR=0x00, GKWPECU=0x01,GKWPTESTER=0x02
GKWPSETNODETYPE Set node type1 data bytes: GKWPMONITOR=0x00, GKWPECU=0x01,GKWPTESTER=0x02
GKWPSETWAKEUPTYPE Set wake up type to either "fast" or "five baud"1 data bytes: GKWPFAST=0x00,GKWPFIVEBAUD=0x02
GKWPSETTARGADDR Set target address1 data bytes: Address of node to wake up
GKWPSETKEYBYTES Set keybytes2 data bytes: keybytes to send in five baud wake up process
GKWPSETSTARTREQ Set start request5 data bytes: fast wake up start communication request
GKWPSETSTARTRESP Set target address7 data bytes: fast wake up start communication response
GKWPSETPROTOCOL Set protocol type1 data bytes: GKWPKWP2000=0x01, GKWPISO9141FORD=0x02
GKWPGETLASTKEYBYTES Get last key bytes2 data bytes returned: value of keybytes seen in last successful wake up (only currently implement for 5 baud)
GKWPSETLASTKEYBYTES Set last key bytes2 data bytes:value GKWPGETLASTKEYBYTES returns until a successful wake up is seen.


FT_DATA frame stat field definitions:


The following bits may be set in the stat field of FT_DATA messages
Data nameDescription
GKWPSTAT_KLINEMessage on K line (rx and tx)
GKWPSTAT_LLINEMessage on L line (rx and tx)
GKWPSTAT_ERRGeneral bus error (rx only)
GKWPSTAT_CSERRChecksum error (rx only)
GKWPSTAT_CONTENTIONBus contention is detected (rx only)
GKWPSTAT_BLOCKMessage recieved over multiple interrupts (rx only)