Codgos de Falhas Sinotruk
Codgos de Falhas Sinotruk
Codgos de Falhas Sinotruk
TMC RP1210A
Noregon Addendum
Noregon Systems
January 5, 2001
Published by
This document contains proprietary information that is the exclusive property of Noregon Systems, Inc. All
rights are reserved. No part of this document may be reproduced in any manner without the express written
permission of Noregon Systems.
User’s Guide
Noregon Systems, Inc. 20001—Issued January 5, 2001
Table of Contents
General 3
Scope.......................................................................................................................... 3
Noregon Notes............................................................................................................. 3
Protocols Supported.................................................................................................... 3
Supported J1708 Converters.......................................................................................4
Operating Systems Supported.....................................................................................4
Supported Serial Ports................................................................................................. 4
Windows NT 4.0 Serial Services..................................................................................4
Serial Mouse................................................................................................... 5
Plug-N-Play................................................................................................................. 5
Installation 6
Diskette Install................................................................................................ 6
CD-ROM Install............................................................................................... 6
RP1210A Extensions 7
Network Non-Specific Commands...............................................................................7
RP1210_Reset_Device...................................................................................8
RP1210_Set_All_Filter_States_To_Pass........................................................8
RP1210_Set_All_Filter_States_To_Discard....................................................8
NSI_Request_Queue_Stats............................................................................9
NSI_Reset_Queue_Stats................................................................................9
NSI_Request_Bus_Stats..............................................................................10
NSI_Reset_Bus_Stats..................................................................................10
NSI_Get_Hardware_Status..........................................................................10
NSI_Set_Block_Wait_time............................................................................11
NSI_GetVersionInfo......................................................................................11
J1708 Commands...................................................................................................... 12
RP1210_Set_Message_Filtering_For_J1708...............................................12
NSI_Clear_J1708_Filter................................................................................12
RP1210_Set_J1708_Mode...........................................................................12
RP1210_Echo_Transmitted_Messages........................................................13
RP1210_Set_Message_Receive..................................................................13
Glossary of Terms 20
Reference Documents 21
Appendix A 22
Using the Noregon or Haldex PLC/J1708 Adapter.....................................................22
Device Identification Number........................................................................22
Protocol......................................................................................................... 22
Scope
This document provides a description of extensions to the TMC (The Maintenance Council) RP1210A for
Windows Communication Application Program Interface (API) for the family of J1708 converters as specified by
Noregon Systems, Inc. Specifically, this document will refer to this class of device-supported API as the RP1210A
Standalone API. The additional functionality presented in this document in no way supersedes or alters the
implementation of required RP1210A functionality.
Noregon Notes
· This document describes the Noregon implementation of the RP1210A API. The API is RP1210A-
compliant, but every attempt has been made to maintain backward compatibility with both RP1210
version 1.0 and the previous Noregon extensions to the version 1.0 product. The API version described in
this document contains both version 1.0 compatibility and complete RP1210A functionality. The
compatibility and new features are identified throughout this document.
· It is highly recommended that a J1708 converter device be connected to the PC before issuing a connect
command for that device. Not following this protocol will result in loss of RP1210A functionality. It is
recommended that all physical disconnections from the PC to the truck network occur on the truck data
link side.
Protocols Supported
The Noregon Standalone API supports the following protocols:
· J1708/J1587
· PLC (Noregon or Haldex PLC/J1708 Adapter)1
1
See Appendix A for details on how to connect using the Noregon or Haldex PLC/J1708 Adapter.
Noregon Standalone RP1210A API User’s Guide 3
Supported J1708 Converters
Noregon Systems has tested and supports the following RS-232-to-J1708 converters:
1. Kent-Moore
2. Navistar
3. B&B J1708P12
4. B&B SAER2323
5. Detroit Diesel
6. Dana
7. Allison Shaw Box (Windows 9X only)
8. Noregon PLC/J1708 AdapterError: Reference source not found
9. Haldex PLC/J1708 AdapterError: Reference source not found
· Windows 2000
· Windows NT 4.0 (Service Pack 3, 4)
· Windows ME
· Windows 98
· Windows 95
2
Some serial ports on earlier model PCs do not supply enough power to support the converter. In this case, the
user should use an external power supply. Refer to the device’s specification for proper connections.
3
See footnote 1.
4
This includes Palm-Pilot software running within the Windows taskbar.
5
To perform the serial port check, the “Serial” service provided by Microsoft must be running.
4 Noregon Standalone RP1210A API User’s Guide
Serial Mouse
Windows NT 4.0 serial services will be disabled to establish a logical RP1210A connection. However, the Noregon
Standalone API will not hinder the functionality of a serial mouse connected to another port. Care should be taken
as to prevent a logical RP1210A connection to the same serial port of which the serial mouse is connected. If
such a connection has been established, the user will lose all serial mouse functionality and must reboot the PC
to restore the serial mouse.
Serial mouse use under Windows 2000 is not recommended. Currently, once a logical RP1210A connection has
been established followed by a logical disconnect, the serial mouse becomes disabled. The user must reboot the
PC to restore the serial mouse.
Plug-N-Play
The J1708 devices supported by the Noregon Standalone API are non Plug-n-Play. Therefore, caution should be
taken when using these devices for Windows 2000. Specifically, Windows 2000 can mistake the J1708 device as
a serial mouse when booting your PC. If this happens, RP1210A connections to that serial port will fail. The user
will receive a “Could not load serial driver because the driver is currently in use! “ error. To prevent this from
occurring, power down the J1708 device when booting the PC. This will stop the serial port from receiving J1708
messages, which gets mistaken as serial mouse inputs.
Diskette Install
1. Insert the diskette with the Standalone API installation program into the floppy drive. Click the Start
button on the taskbar to display the menu. Select the Run menu item to display the Run dialog box.
2. Enter <DRIVE>:\setup in the command line textbox (where <DRIVE> is the letter corresponding to your
floppy drive) and click the OK button. Or, use Windows Explorer to browse the diskette for “setup.exe”.
Once found, double-click the file.
3. The setup program displays a setup progress indicator.
4. Click the Next button on the Welcome dialog. The Software License Agreement dialog displays.
5. Read the terms of the license and click Yes if you agree to the terms of the license.
6. Enter the desired installation directory and click Next.
7. Click the “Finish” button once installation has completed.
CD-ROM Install
1. Insert the Standalone API CD-ROM into the target machine.
2. The auto-run will begin the installation process.
3. The setup program displays a setup progress indicator.
4. Click the Next button on the Welcome dialog. The Software License Agreement dialog displays.
5. Read the terms of the license and click Yes if you agree to the terms of the license.
6. Enter the desired installation directory and click Next.
7. Click the Finish button once installation has completed.
This section describes all of the extensions and clarifications that Noregon has made to the RP1210A API.
nCommandNumber RP1210_Reset_Device
nClientID The identifier for the client that wants to perform the
reset device command.
fpchClientCommand Empty buffer. Can be set to null.
nMessageSize Always set to a value of zero.
RP1210_Set_All_Filter_States_To_Pass
Clears all filters to allow all messages to pass. See TMC Recommended Practice RP1210A Windows
Communications API for more details.
nCommandNumber RP1210_Set_All_Filters_States_to_Pass
nClientID The identifier for the client that wants to clear all filters
within the filter list.
fpchClientCommand Empty buffer. Can be set to null.
nMessageSize 0
The RP1210_Clear_All_Filters was an RP1210 Version 1 command that is still supported. Users are
encouraged to use the new RP1210_Set_All_Filter_States_To_Pass definition instead.
RP1210_Set_All_Filter_States_To_Discard
This command sets all message filter states to discard. In this implementation, the Disallow All Network
Messages command has two effects on filters:
nCommandNumber RP1210_Set_All_Filters_States_to_Pass
nClientID The identifier for the client that wants to clear all filters
within the filter list.
fpchClientCommand Empty buffer. Can be set to null.
nMessageSize 0
nCommandNumber NSI_Request_Queue_Stats
PCS_Request_Queue_Stats
nClientID The identifier for the client that wants to get the software
statistics.
fpchClientCommand Pointer to a buffer (allocated by the client application)
that returns the statistics. Each number is four bytes
and is transmitted LSB first.
nMessageSize 68
Data Description
Byte
1-4 The largest size allocated for the receive queue.
5-8 Current number of items in the receive queue.
9-12 The largest number of items in the receive queue.
13-16 The current size allocated for the receive queue.
17-20 The largest amount of space used in the receive queue.
21-24 The number of times the receive queue was filled.
25-28 The total number of items queued in the receive queue.
29-32 The total number of bytes queued in the receive queue.
33-36 The largest size allocated for the transmit queue.
37-40 Current number of items in the transmit queue.
41-44 The largest number of items in the transmit queue.
45-48 The current size allocated for the transmit queue.
49-52 The largest amount of space used in the transmit queue.
53-56 The number of times the transmit queue was filled.
57-60 The total number of items queued in the transmit queue.
61-64 The total number of bytes queued in the transmit queue.
65-68 The time since the connection was made.
nCommandNumber NSI_Reset_Queue_Stats
PCS_Reset_Queue_Stats
nClientID The identifier for the client that wants to reset software
statistics.
fpchClientCommand Null pointer.
nMessageSize 0
nCommandNumber NSI_Request_Bus_Stats
PCS_Request_ Bus_Stats
nClientID The identifier for the client that wants to get the software
statistics.
fpchClientCommand Pointer to a buffer (allocated by the client application)
that returns the bus statistics. Each number is four
bytes and is transmitted LSB first.
nMessageSize 32
Data Description
Byte
1-4 Total number of messages received.
5-8 Total number of messages transmitted.
9-12 Elapsed time from startup or last bus reset.
13-16 Total number of bytes received from startup or last bus reset.
17-18 The current transmit buffer utilization for the J1708 driver (percentage).
19-20 Maximum transmit buffer utilization for the J1708 driver (percentage).
21-22 The current received buffer utilization for the J1708 driver (percentage).
23-24 Maximum received buffer utilization for the J1708 driver (percentage).
25-28 Total number of messages received with bad checksum values.
29-32 Total number of collisions detected.
NSI_Reset_Bus_Stats
A Noregon RP1210A extension used to reset the bus statistics for the J1708 driver. It is highly recommended
that all implementations of this extension utilize the NSI_Reset_Bus_Stats command. The PCS_Reset_
Bus_Stats is provided for backwards compatibility.
nCommandNumber NSI_Reset_Bus_Stats
PCS_Reset_ Bus_Stats
nClientID The identifier for the client that wants to reset software
statistics.
fpchClientCommand Null pointer.
nMessageSize 0
NSI_Get_Hardware_Status
A Noregon RP1210A extension used to retrieve the hardware status of the device. This command is the same
as the RP1210 function RP1210_GetHardwareStatus (see the RP1210_GetHardwareStatus section above).
It is highly recommended that the developer use the RP1210_GetHardwareStatus function to retrieve the
device’s current status.
nCommandNumber NSI_Set_Block_Wait_Time
nClientID The identifier for the client that wants to change the
maximum wait time.
fpchClientCommand The wait time is determined by the first and second
bytes of the array. That is, the product of the first and
second bytes determines the new wait time. The
following depicts an example of changing the wait time
to twenty milliseconds (20):
fpchClientCommand[0] = 0x02;
fpchClientCommand[1] = 0x0A;
RP1210_Set_Message_Filtering_For_J1708
Sets up (or adds) a message filter (MID) to the lower-level driver filter list. All incoming messages are
discarded with the exception of the ones associated within the filter list. See TMC Recommended Practice
RP1210A Windows Communications API for more details.
nCommandNumber RP1210_Set_Message_Filtering_For_J1708
nClientID The identifier for the client that wants to set one or more
filters.
fpchClientCommand Pointer to a buffer (allocated by the client application)
containing a list of MID(s) to be added for filtering.
nMessageSize 1 - 256 bytes (one byte per filter)
The Set_J1708_Filter was an RP1210 Version 1 command that is still supported. Users are encouraged to
use the new RP1210_Set_Message_Filtering_For_J1708 definition instead.
NSI_Clear_J1708_Filter
This is a Noregon extension used to remove one or more MID’s from the list of MID filters. It is highly
recommended that all implementations of this extension utilize the NSI_Clear_J1708_Filter command. The
PCS_Clear_J1708_Filter is provided for backwards compatibility.
nCommandNumber NSI_Clear_J1708_Filter
PCS_Clear_J1708_Filter
nClientID The identifier for the client that wants to clear one or
more filters.
fpchClientCommand Pointer to a buffer (allocated by the client application)
containing a list of MID(s)to be removed from filtering.
nMessageSize 1 - 256 bytes (one byte per filter)
RP1210_Set_J1708_Mode
Toggles the mode of the J1708 interface from Converted (Cooked) to Raw mode. See TMC Recommended
Practice RP1210A Windows Communications API for more details.
nCommandNumber RP1210_Set_J1708_Mode
nClientID The identifier for the client that wants to set the interface
mode.
fpchClientCommand Pointer to a buffer (allocated by the client application)
containing:
0x01 Converted mode
0x00 Raw mode
fpchClientCommand[0] = 0x01;
or
fpchClientCommand[0] = 0x00;
nMessageSize 1
RP1210_Echo_Transmitted_Messages
Toggles the echo transmit messages for the client application. See TMC Recommended Practice RP1210A
Windows Communications API for more details.
nCommandNumber RP1210_Echo_Transmitted_Messages
nClientID The identifier for the client that wants to clear one or
more filters.
fpchClientCommand Pointer to a buffer (allocated by the client application)
containing:
0x01 to turn echo on
0x00 to turn echo off
nMessageSize 1
RP1210_Set_Message_Receive
Enables or disables the reception of message to the specified client application. See TMC Recommended
Practice RP1210A Windows Communications API for more details.
nCommandNumber RP1210_Set_Message_Receive
nClientID The identifier for the client that wants to clear one or
more filters.
fpchClientCommand Pointer to a buffer (allocated by the client application)
containing:
0x01 to turn the receive on
0x00 to turn the receive off
fpchClientCommand[0] = 0x01;
or
fpchClientCommand[0] = 0x00;
nMessageSize 1
This section lists RP1210A functions that deviate from the original TMC Recommended Practice RP1210A
Windows Communications API specifications.
RP1210_GetHardwareStatus
This function is defined for compatibility purposes only. Return value for this function will be
ERR_COMMAND_NOT_SUPPORTED (143).
Device Drivers
The standalone API requires the installation of the following kernel driver files:
Operating System Driver Filename Install Directory
Windows 95, 98 and ME SJ1708.vxd %windir%\System
Windows NT 4.0 Sj1708nt.sys %windir%\system32\drivers
Windows 2000 SJ1708.sys %windir%\system32\drivers
Windows 2000 Nserial.sys %windir%\system32\drivers
Windows NT 4.0 and Windows 2000
To make the NT and 2000 kernel drivers visible to Windows, the drivers must first be registered under the specific
path:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\*.sys
The *.sys represents the name of the driver being registered. The simplest way to register the *.sys files is to run
the “regini.exe” utility. The following shows how to run the utility from a DOS command prompt:
regini Filename.INI
The initialization file specified within the command-line contains the information to register a driver. Once the
drivers have been registered, the user must reboot the target machine. The following depicts the contents of the
Filename.INI file:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\*.sys
Start
DWORD:0x0000002
A value of 2 makes the driver start automatically. During development, it is recommended to use a Start value
of 3, which makes the driver start manually.
Type
DWORD:0x0000001
A value of 1 identifies the driver as a kernel-mode driver.
Group
" Extended Base"
Any Kernel mode driver listed in the table above, must be a member of the Group " Extended Base".
ErrorControl
DWORD:0x0000001
A value of 1 lets the system continue to boot even if the driver fails, but it shows an error message if the driver
fails to load.
The information file Nmsport.inf must reside in the user’s %windir%\inf directory.
There is one dynamic link library and it should reside in the %windir% directory:
NSIRP32.DLL
Server Files
There is one server file and it should reside in the %windir% directory:
NSISVR.EXE
Programming Files
These may be used to statically link to the NSIRP32.DLL:
NSIRP32.LIB
· NSIRP32.H
Sample Application
· NSI32.EXE
A sample 32-bit Visual Basic Application which demonstrates operation of the 32-bit API.
Note: The VB Application is provided ‘as is’ and is intended only to assist the customer in the validation of
the API installation and operation and is not supported as part of the project release. To run the VB
Application on Windows 9x, the file OLEAUT32.DLL is necessary.
Documentation
· Standalone API User’s Guide.doc This document.
· README.TXT The latest information available upon release.
Acronym Description
ANSI American National Standards Institute.
API Application Program Interface.
DLL Dynamic Link Library.
J2497 Power line carrier for commercial vehicles
J1587 A mapping of messages that lies on top of the J1708 standard.
J1708 A 9600-baud transport protocol used for vehicle communications.
PC Personal Computer.
PLC Power Line Carrier
RP Recommended Practice. For example, RP1210 is Recommended Practice for a Windows
Vehicular Communications API. See TMC.
RP1210 Recommended Practice RP1210 for a Windows Communications API.
RP1210A The most current RP, RP1210 for a Windows Communications API.
TM Trade Mark.
TMC The Maintenance Council.
The following describes some of the basic procedures for connecting and using the Noregon or Haldex
PLC/J1708 Adapter.
The device identification number (refer to as Device ID) for the Noregon and Haldex PLC/J1708 Adapter has been
assigned the values fifteen (15) and sixteen (16) within the NSIRP32.INI file. When connecting to comport one (1),
use Device ID fifteen. Likewise, when connecting to comport two (2) use Device ID sixteen.
Protocol
As stated earlier, the Noregon and Haldex PLC/J1708 Adapter support either the PLC or J1708 protocols. To
connect using the PLC protocol, assign the value “PLC” as the protocol string for protocol name with the
RP1210_ClientConnect function.
When connected, the user must set the J1708 interface connection to Raw Mode. Refer to the TMC
Recommended Practice RP1210A Windows Communications API for information concerning Raw and
Converted modes.