Summarized from RP1210.DOC (TMC Recommended Practice)
RP1210 defines a standardized Windows Communication API for PC-to-vehicle datalink communications. It was established by The Maintenance Council (TMC) for vehicle ECU communication and control under Microsoft Windows operating systems.
This API defines the interface between vehicle data links and PC application software. It supports:
Application Software
|
v
RP1210 API DLL
|
v
Hardware Driver
|
v
Physical Adapter (CMC Card, Serial Translator, USB Adapter)
|
v
Vehicle Data Link (J1708 Bus / CAN Bus)
|
v
Engine ECM
| Mode | Description |
|---|---|
| Converted Mode | Default. Multiple clients supported. Checksums handled by driver. |
| Raw Mode | Single client. Raw data passed without checksum processing. |
Sending: Application calls RP1210_SendMessage -> API DLL queues message -> Hardware transmits on bus
Receiving: Hardware receives from bus -> API DLL buffers message -> Application calls RP1210_ReadMessage
short FAR PASCAL RP1210_ClientConnect(
HWND hwndClient, // Window handle for notifications
short nDeviceId, // Device identifier from INI file
char *fpchProtocol, // Protocol string: "J1708", "J1939", "CAN"
long txBufferSize, // Transmit buffer size (0 = default)
long rcvBufferSize, // Receive buffer size (0 = default)
short nIsAppPacketizingInMsgs // J1939 only: 0=API handles, 1=app handles
);
Returns: Client ID (0-127) on success, error code (128+) on failure.
When a connection is established, no filters are set and the driver passes all messages.
short FAR PASCAL RP1210_ClientDisconnect(short nClientID);
Returns: 0 on success, error code on failure.
short FAR PASCAL RP1210_SendMessage(
short nClientID, // Client identifier
char *fpchMessage, // Message buffer
short nMessageSize, // Message size in bytes
short nNotifyStatusOnTx,// Notification flag
short nBlockOnSend // 0=non-blocking, 1=blocking
);
J1708:
| Byte | Content |
|---|---|
| 0 | Message priority |
| 1+ | Message data (no checksum - driver adds it in Converted Mode) |
J1939:
| Bytes | Content |
|---|---|
| 0-2 | Parameter Group Number (PGN), little-endian |
| 3 | Priority/How-to-send |
| 4 | Destination address |
| 5 | Source address |
| 6+ | Data payload |
CAN:
| Byte | Content |
|---|---|
| 0 | Frame type: 0x00=Standard (11-bit), 0x01=Extended (29-bit) |
| 1-4 | CAN ID (MSB first) |
| 5+ | Data payload |
short FAR PASCAL RP1210_ReadMessage(
short nClientID, // Client identifier
char *fpchMessage, // Buffer for received message
short nBufferSize, // Buffer size
short nBlockOnRead // 0=non-blocking, 1=blocking
);
Returns: Number of bytes read, or 0 if no message (non-blocking), or error code (128+).
J1708:
| Bytes | Content |
|---|---|
| 0-3 | Timestamp (milliseconds) |
| 4 | Echo flag (1 if sent by this client) |
| 5+ | Message data (no checksum in Converted Mode) |
J1939:
| Bytes | Content |
|---|---|
| 0-3 | Timestamp |
| 4 | Echo flag |
| 5-7 | PGN (little-endian) |
| 8 | Priority |
| 9 | Source address |
| 10 | Destination address |
| 11+ | Data payload |
short FAR PASCAL RP1210_SendCommand(
short nCommandNumber, // Command to execute
short nClientID, // Client identifier
char *fpchCommand, // Command data
short nMessageSize // Command data size
);
| Command | Name | Description |
|---|---|---|
| 0 | Reset Device | Reset physical device (single client only) |
| 1 | Set All Filters to Pass | Allow all messages through |
| 2 | Set Filter (J1939) | Filter by PGN |
| 3 | Set Filter (CAN) | Filter by CAN ID with mask |
| 4 | Set Filter (J1708) | Filter by MID |
| 5 | Set J1708 Mode | Toggle Converted/Raw mode |
| 6 | Echo Mode | Enable/disable message echo |
| 7 | Set All Filters to Discard | Block all messages |
| 8 | Set Baud Rate | Change bus speed |
| 19 | Protect J1939 Address | Claim and protect a J1939 address |
Located in the Windows directory, lists available RP1210 drivers:
[RP1210Support]
APIImplementations=MCOM32NT,DD121032,DM121032
[MCOM32NT]
FunctionLibrary=MCOM32NT
APIVersionNumber=2.00
[DD121032]
FunctionLibrary=DD121032
APIVersionNumber=2.00
Each driver has its own INI file (e.g., MCOM32NT.INI) defining:
| Code | Name | Description |
|---|---|---|
| 128 | ERR_DLL_NOT_INITIALIZED | DLL not loaded |
| 129 | ERR_INVALID_CLIENT_ID | Bad client ID |
| 130 | ERR_CLIENT_ALREADY_CONNECTED | Already connected |
| 131 | ERR_CLIENT_AREA_FULL | Too many clients |
| 142 | ERR_HARDWARE_NOT_RESPONDING | No response from adapter |
| 143 | ERR_COMMAND_NOT_SUPPORTED | Command not implemented |
| 144 | ERR_INVALID_MSG_ID | Invalid message ID |
| 146 | ERR_WINDOW_HANDLE_REQUIRED | Window handle needed |
| 147 | ERR_CANNOT_SET_PRIORITY | Priority not settable |
| 151 | ERR_BUS_OFF | CAN bus-off state |
| 156 | ERR_CLIENT_DISCONNECTED | Client was disconnected |
| 157 | ERR_ADDRESS_CLAIM_FAILED | J1939 address claim failed |
| 158 | ERR_ADDRESS_NEVER_CLAIMED | Never issued address claim |
DIF uses RP1210 specifically for J1708/J1587 communication:
RP1210_ClientConnect with protocol "J1708"RP1210_SendCommand(3, ...) to enable all MID filtering (allow Engine #1 PIDs)RP1210_ReadMessage (blocking)extractdata.cpp using J1587 PID definitionsRP1210_SendMessage with appropriate priority and MID| Driver | Hardware |
|---|---|
| MCOM32NT | CMC MultiCom-II card |
| DD121032 | Dearborn (beige) serial translator |
| DM121032 | Dearborn Multilink serial translator |