Programmatic Interface - I/O Commands

These commands allow control over Input and Output streams over Serial ports, TCP or UDP connections. The NetRS has four serial ports, which are always defined. In addition, you can define TCP protcol or UDP protocol ports that can provide services over the Ethernet or over a PPP connection on a serial port. Port Configuration Parameters are available for adjusting the characteristics of the ports.

For those commands that require the specification of an I/O port, these three parameter formats are allowed:
port=SerialPortX where X is 1, 2, 3 or 4.
port=TcpPortXXXX where XXXX is between 1024 and 65535.
port=UdpPortXXXX where XXXX is between 1024 and 65535.

Each ports can be assigned a Service, such as PPP or RT17 data streaming, The service determines what sort of data stream or protocol will be configured on the port. Each service has a set of Service Configuration Parameters that allow configuration of the specific characteristics of that service.

The following commands are available for controlling I/O Ports:

Port Configuration Parameters
Service Configuration Parameters
List of all commands
Programmatic Overview


Show IOstatus

This command returns a multi-line response describing all active IOports. The list will include:

For each active port, the type of data service is indicated. For TCP and UDP ports, the IP address of the remote system is also shown.

Parameters:

No parameters are available.

Response:

<Show IOstatus>
IOport name=SerialPort2 service=met
IOport name=SerialPort3 service=rt17
IOport name=TcpPort9999 service=rt17 remoteIP=192.168.142.7
<end of Show IOstatus>

Show IOports

This command produces a multi-line response that contains a complete listing of all defined I/O ports and their setup parameters.

Parameters:

No parameters are available.

Response:

<Show IOports>

IOport port=SerialPort1 service=ppp baud=115200 flow=None 
       localIP=1.1.1.1 remoteIP=1.1.1.2 connection=Direct

IOport port=SerialPort2 service=Met 
       cmd1=60:0102P9 cmd2=off cmd3=off cmd4=off cmd5=off cmd6=off 
       baud=57600 parity=None flow=None

IOport port=SerialPort3 service=ppp baud=115200 flow=None 
       localIP=192.168.0.1 remoteIP=192.168.0.30 connection=Direct

IOport port=SerialPort4 service=ppp baud=2400 flow=None 
       localIP=192.168.0.1 remoteIP=192.168.0.40 
       connection=Modem 
       reset=Reset init1=Init1 init2=init2 init3=intit3

IOport port=TcpPort5020 service=Ephemerides

IOport port=TcpPort5021 service=Almanacs

IOport port=TcpPort5022 service=SvStatus

IOport port=TcpPort9999 service=RT17 interval=1 measurements=yes 
       positions=no concise=yes iodeslips=no GPSdata=no rawGPS=no 
       rawWAAS=no smoothCode=no smoothCarrier=no

<end of Show IOports>

Show IOport

This command returns a description of an individual I/O port and its setup parameters. The format is the same as a single IOport line in the Show IOports command.

Parameters:

port=portName The port for which data is requested. The name must be of the form:
port=SerialPortX where X is 1, 2, 3 or 4.
port=TcpPortXXXX where XXXX is between 1024 and 65535.
port=UdpPortXXXX where XXXX is between 1024 and 65535.

Response:

IOport port=TcpPort9999 service=RT17 interval=1 measurements=yes 
       positions=no concise=yes iodeslips=no GPSdata=no rawGPS=no 
       rawWAAS=no smoothCode=no smoothCarrier=no

Set IOport

This command is used to create or modify the settings of an I/O port. The port is specified with a 'port=' parameter. Each port is assigned a "service" type, describing what type of data or activity is desired on the port. Depending on the service, numerous other parameters are available to customize the service.

Parameters:

port=portName The port for which data is requested. The name must be of the form:
port=SerialPortX where X is 1, 2, 3 or 4.
port=TcpPortXXXX where XXXX is between 1024 and 65535.
port=UdpPortXXXX where XXXX is between 1024 and 65535.
If the port is a SerialPort or a UdpPort, then other Port Configuration Parameters must be supplied.
service=ServiceName Defines the type of activity desired on this port.
  • PPP - Point to Point Protocol.
    Implements a TCP/IP protocol over a serial port.
  • RT17 - Streams RT17 format data.
  • Binex - Streams Binex format data.
  • RTCM - Provides GPS differential correcitons.
  • CMR - Provides raw GPS measurements for RTK systems.
  • Met - Interfaces to external environmental sensors.
  • Ephemerides Dumps complete set of GPS ephemeris data.
  • Almanacs Dumps complete set of GPS almanac data.
  • SvStatus Dumps information about GPS satellite tracking status.
  • Trimcom Implements an subset of Trimcom I/O protocol.
The remaining parameters are dependent on the type of service selected. Click on the service links above to see which parameters are appropriate for the desired service.

Response:

OK: IOport port=TcpPort9999 service=RT17 interval=1 measurements=yes 
           positions=no concise=yes iodeslips=no GPSdata=no rawGPS=no 
           rawWAAS=no smoothCode=no smoothCarrier=no

Delete IOport

This command deactivates a specified port and removes its definition from the NetRS.

Only TCP and UDP ports can be deleted. To deactivate a Serial port stream, use 'Set IOport' to set its service type to PPP.

Parameters:

port=portName The port to be deleted. The name must be of the form:
port=TcpPortXXXX where XXXX is between 1024 and 65535.
port=UdpPortXXXX where XXXX is between 1024 and 65535.
all=yes Deletes ALL TCP and UDP ports.

Responses:

OK: IOport portName is deleted.

OK: All TCP and UDP IOports have been deleted.

Show RefStation

This command returns the current parameters defining the Reference Station setup. These values are used by CMR or RTCM output streams.

Note that two forms of response are possible, selected by the optional 'style' parameter. If Style is 'llh' then Latitude, Longitude and Height will be sent for the reference station position. If Style is 'xyz' then the position will be sent using ECEF coordinates X, Y and Z.

Parameters:

style=llh Style is either 'llh' (Lat/Lon/Height), or 'xyz'. Controls the format in which the reference station position is returned. If not specified, the default is 'llh'.

Response:

RefStation lat=37.388923181 lon=-122.036700958 height=1.234500 
           RtcmId=20 CmrId=21 Name='Rtcm2' 
           Description='A Descriptive Phrase'

RefStation x=-2691513.5954 y=-4301188.9436 z=3851777.1431 
           RtcmId=20 CmrId=21 Name='Rtcm2' 
           Description='A Descriptive Phrase'

Set RefStation

This command modifies the settings for the Reference Station. These values are used by CMR or RTCM output streams.

Parameters:

lat=37.388923181 Reference station Latitude in decimal degrees.
lon=-122.036700958 Reference station Longitude in decimal degrees.
height=234.567 Reference station Height above sea level in meters.
x=-2691513.5954 Reference station ECEF X coordinate in meters.
y=-4301188.9436 Reference station ECEF Y coordinate in meters.
z=3851777.1431 Reference station ECEF Z coordinate in meters.
rtcmid=20 RTCM numeric identifier. Maximum value is 1023.
cmrid=21 CMR numeric identifier. Maximum value is 31.
name=Rtcm2 RTCM station name. Use single-quotes around the name if it contains spaces.
description='A verbose string' RTCM station description. Use single-quotes around the string if it contains spaces.

Response:

OK: RefStation lat=37.388923181 lon=-122.036700958 height=1.234500 
               RtcmId=20 CmrId=21 Name='Rtcm2' 
               Description='A verbose string'

OK: RefStation x=-2691513.5954 y=-4301188.9436 z=3851777.1431 
               RtcmId=20 CmrId=21 Name='Rtcm2' 
               Description='A verbose string'

Port Configuration Parameters

The three types of Input/Output Ports each have their own unique characteristics. These characteristics must be specified when creating or modifying a port, using parameters to the Set Port command.


Serial Ports

Serial ports have controls over the rate at which bits are transmitted, the parity used on transmitted bytes, and the handshaking form that is used to control the flow of data.

Parameters:

port=SerialPortX   The Serial Port.
baud=38400 The bit transmission rate. Acceptable values are:
  • 2400
  • 4800
  • 9600
  • 19200
  • 38400
  • 57600
  • 115200
This is a required parameter when creating or modifying a SerialPort.
parity=none Parity can be one of:
  • none
  • even
  • odd
Parity control is not available if the port's service type is PPP. Otherwise, Parity is a required parameter when creating or modifying a SerialPort.
flow=none Flow control can be one of.
  • none
  • hardware
  • xonxoff
Flow control is not available on SerialPort1. If 'flow' is specified on that port, it must be 'none'.
FlowControl is a required parameter on all Serial Ports except SerialPort1.
XonXoff flow control is not supported on SerialPorts running the PPP service.


TCP Ports

Ports that use the TCP protocol have no port-specific configuration setup parameters.

Parameters:

port=TcpPortXXXX   The TCP Port .


UDP Ports

Ports that use the UDP protocol have a single configuration parameter, UdpTimeout. UDP output ports have no way of directly determining whether the client on the other end of a connection is still listening. So all UDP streams require the client to periodically send a KeepAlive packet in order to keep the stream active. UdpTimeout specifies the number of seconds that a stream will be kept active without receiving a KeepAlive request.

Parameters:

port=UdpPortXXXX   The UDP Port .
udpTimeout=60 The maximum time that is allowed between received KeepAlive packets before a UDP connection is cancelled.
If this parameter is not specified in a Set Port command, the udpTimeout defaults to 10 seconds.

Service Configuration Parameters

Every defined Serial, TCP or UDP port is associated with a service, which defines how the port will behave, what data it will stream, etc. Some services are only supported on specific port types. May optional parameters are only appropriate for specific services. The table below summarizes each service type and provides a link to a section that gives a complete description of the parameters associated with that service.
PPP Point to Point Protocol.
Implements a TCP/IP protocol over a serial port.
Only available on Serial Ports.
RT17 A Streaming protocol containing raw GPS measurements and other data.
Available on all port types.
Binex A Streaming protocol containing raw GPS measurements and other data.
Available on all port types.
RTCM A Streaming protocol containing GPS differential corrections.
Available on all port types.
CMR A Streaming protocol containing GPS carrier phase measurements for use in RTK systems.
Available on all port types.
Met A protocol for interacting with external environmental sensors.
Only available on serial ports.
Ephemerides A query service that responds with a complete binary dump of the GPS ephemeris data.
Only available on TCP ports.
Almanacs A query service that responds with a complete binary dump of the GPS almanac data.
Only available on TCP ports.
SvStatus A query service that responds with a binary dump of Satellite status information.
Only available on TCP ports.
Trimcom An interactive command protocol for use in remote control systems.
Only available on TCP ports.
This protocol is deprecated and should not be used for new designs.

PPP Parameters

This service implements a TCP/IP interface over a serial port. It is only available on Serial Ports. The parameters available for this port allow configuration of the serial port characteristics, modem interface commands, and the parameters needed for PPP itself.

Note that the Serial Port control parameters for PPP ports are a limited subset of the normal values available on serial ports.

Parameters:

port=SerialPortName The serial port to use
service=PPP The service assigned to this port.
baud=38400 The bit transmission rate. Acceptable values are:
  • 2400
  • 4800
  • 9600
  • 19200
  • 38400
  • 57600
  • 115200
This is a required parameter when creating or modifying a SerialPort.
flow=none Flow control can be one of.
  • none
  • hardware
Flow control is not available on SerialPort1. If 'flow' is specified on that port, it must be 'none'.
FlowControl is a required parameter on all Serial Ports except SerialPort1.
XonXoff flow control is not supported on SerialPorts running the PPP service.
localIP=192.168.0.1 The IP address used on the NetRS end of the PPP link.
remoteIP=192.168.0.20 The IP address used on the remote end of the PPP link.
connection=modem The type of connection protocol used by the PPP system.
direct Used if the serial port is directly connected to the Computer on the other end of the PPP link.
modem Used if the connection is going through a modem to reach the remote computer. For modem connections, the init1, init2, init3, and reset parameters can be specified to allow the PPP system to properly control the modem connection.
init1=InitString
init2=InitString
init3=InitString
reset=ResetString
These parameters define initialization and reset strings used by the PPP system when interacting with a Modem, that is, when the Connection parameter is 'modem'. They are not allowed when Connection is 'direct'. The strings cannot have embedded spaces.

RT17 Stream Parameters

RT17 is a Streaming protocol containing raw GPS measurements and other data. This service is available on all port types.

Parameters:

port=PortName The IOport to use. RT17 streaming is is supported on all port types.
service=RT17 The service assigned to this port.
interval=10 This is the interval (in seconds) between measurement and/or position records in the stream. Valid values are:
  0.1 1 10 60
  0.2 2 15 300
  0.5 5 30 600
measurements=yes 'Yes' or 'no' to indicate whether GPS measurement records should be included in the stream. This defaults to 'yes' if not specified.
positions=no 'Yes' or 'no' to indicate whether GPS position records should be included in the stream. This defaults to 'no' if not specified.
concise=no 'Yes' or 'no' to indicate whether the concise (compressed) format should be used. This defaults to 'no' if not specified.
iodeslips=no 'Yes' or 'no' to indicate whether records should be included containing satellite IODE values and cycle slip counts. This defaults to 'no' if not specified.
gpsdata=no 'Yes' or 'no' to indicate whether records should be included containing decoded GPS satellite data. This defaults to 'no' if not specified.
rawgps=no 'Yes' or 'no' to indicate whether records should be included containing raw GPS satellite data. This defaults to 'no' if not specified.
rawwaas=no 'Yes' or 'no' to indicate whether records should be included containing raw GPS satellite data. This defaults to 'no' if not specified.
smoothcarrier=no 'Yes' or 'no' to indicate whether GPS carrier phase measurements should be smoothed. This defaults to 'no' if not specified.
smoothcode=no 'Yes' or 'no' to indicate whether GPS code phase measurements should be smoothed. This defaults to 'no' if not specified.

Binex Stream Parameters

Binex is a streaming protocol containing raw GPS measurements and other data. This service is available on all port types.

Parameters:

port=PortName The IOport to use. Binex streaming is is supported on all port types.
service=Binex The service to assign to this port.
interval=10 This is the interval (in seconds) between measurement and/or position records in the stream. Valid values are:
  0.1 1 10 60
  0.2 2 15 300
  0.5 5 30 600
smoothing=no 'Yes' or 'no' to indicate whether code and carrier phase measurements should be smoothed.

RTCM Stream Parameters

A Streaming protocol containing GPS differential corrections. Available on all port types.

Parameters:

port=PortName The IOport to use. RTCM streaming is is supported on all port types.
service=RTCM The service to assign to this port.
version=2.3 Indictes which version of the RTCM standard should be use for this stream. Possible values are:
  • 2.1
  • 2.2
  • 2.3
style=dgps Describes an application, which implies the types of records to be transmitted. Possible values are:
DGPS Includes record types 1, 3, 22, and 59.
If version is 2.3, also includes type 24.
RTK Includes record types 3, 18, and 19.
If version is 2.1 or 2.2, also includes types 22 and 59.
If version is 2.3, also includes types 23 and 24.
DGPS_RTK Includes record types 1, 3, 18, 19, 22, and 59.
If version is 2.3, also includes types 23 and 24.
Custom:1,22,23+24,59.3   This style allows a choice of individual record types, although some come as pairs. The choice is made by using a comma-separated list of record types. Valid values are:
  • '1'
  • '2'
  • '3'
  • '18+19'
  • '22'
  • '23+24' (only available with version 2.3).
  • '59.3'
  • '59.13'

CMR Stream Parameters

A Streaming protocol containing GPS carrier phase measurements for use in RTK systems.
Available on all port types.

Parameters:

port=PortName The IOport to use. RTCM streaming is is supported on all port types.
service=CMR The service to assign to this port.
style=standard Selects from two styles of CMR format. Value is either 'standard' or 'CmrPlus'.

Met Stream Parameters

A protocol for interacting with external environmental sensors.
Only available on serial ports.

Parameters:

port=SerialPortName The serial port to use.
service=met The service to assign to this port.
cmd1=once:0102P0
cmd2=60:0102P9
cmd3=off
..
cmd6=off
Cmd1 through Cmd6 are the encoded commands to be sent to the external sensors over the serial port. Each command is formatted as
    time:string
and consists of a timing specification and a command string, separated by a colon, ' : '.

The timing specification indicates the time interval (in minutes) between sendings of the command string. The time can be '0' or 'once' to indicate that the command should be activated once-only whenever a new data logging session is started.

Inactive commands are set to "off" instead of a 'time:string'.

Ephemerides Service Parameters

A query service that responds with a complete binary dump of the GPS ephemeris data. This service is only available on TCP ports.

Parameters:

port=TcpPortXXXX The TCP port to use for this service.
service=ephemerides The service to assign to this port.
There are no other configuration parameters for this service.

Almanac Service Parameters

A query service that responds with a complete binary dump of the GPS almanac data. This service is only available on TCP ports.

Parameters:

port=SerialPortName The serial port to use
service=almanacs The service to assign to this port.
There are no other configuration parameters for this service.

SvStatus Service Parameters

A query service that responds with a binary dump of satellite status information. This service is only available on TCP ports.

Parameters:

port=SerialPortName The serial port to use
service=svstatus The service to assign to this port.
There are no other configuration parameters for this service.

Trimcom Service Parameters

An interactive command protocol for use in remote control systems. This service is only available on TCP ports.

This protocol is deprecated and should not be used for new designs.

Parameters:

port=SerialPortName The serial port to use
service=trimcom The service to assign to this port.
There are no other configuration parameters for this service.