CTM-200 ULCP Remote Configuration Messages

The CTM-200 may be remotely configured by sending it ULCP configuration messages. Configuration messages are sent as UDP packets to port 6100 of the device.

ULCP Message Format

Hex Description
0xPP Packet type – defines the message type:
0x59 = Set output
0x5B = Execute application-specific script
0x50 = NMEA GGA query
0x52 = NMEA RMC query
0x55 = GPS ULCP binary data query
0x56 = Delta-based GPS report query and setting
0x57 = Time-based GPS report query and setting
0xSS Sequence number – incremented for each message.
0xCC Command type:
0x00 = Query
0x01 = Response to query
0x02 = Set
0x03 = response to set
0x06 = Event report
0x00 Async time – not used so set to 0x00
0x00 Error code – not used so set to 0x00
0xLL Message length (number of bytes following the password)
0x0000 Password – default 0x0000
0xDD…….. Data – message body of length defined by message length above

ULCP Remote Configuration Messages

Set Digital Outputs

Request header: 0x59 0xSS 0x02 0x00 0x00 0x08 0x0000
Request message body:
Hex Description
1 byte Output #1: 0x00 = turn off; 0xFF = turn on; 0xNN = turn on for 0xNN x 50 ms, then turn off
1 byte Output #2: 0x00 = turn off; 0xFF = turn on; 0xNN = turn on for 0xNN x 50 ms, then turn off
1 byte Output #3: 0x00 = turn off; 0xFF = turn on; 0xNN = turn on for 0xNN x 50 ms, then turn off
1 byte Output #4: 0x00 = turn off; 0xFF = turn on; 0xNN = turn on for 0xNN x 50 ms, then turn off
0x00000000 Not used

If the command was not successful then no response is sent.
Response header: 0x59 0xSS 0x03 0x00 0x00 0x00 0xNNNN
Where NNNN is the password.
Response message body: None.

Execute Application Specific Script

Request header: 0x5B 0xSS 0x02 0x00 0x00 0x08 0x0000
Request message body:
Hex Description
1 byte 0x00 = Execute application-specific script 0; 0x01 = Execute application-specific script 1
0x00000000000000 Not used

If the command was not successful then no response is sent.
Response header: 0x5B 0xSS 0x03 0x00 0x00 0x00 0xNNNN
Where NNNN is the password.
Response message body: None.

NMEA GGA Query

Request header: 0x50 0xSS 0x00 0x00 0x00 0x00 0x0000
Request message body: None.
If the command was not successful then no response is sent.
Response header: 0x50 0xSS 0x01 0x00 0x00 0x00 0xNNNN
Where NNNN is the password.
Response message body:
Refer to Message Type 80 $GPGGA

NMEA RMC Query

Request header: 0x52 0xSS 0x00 0x00 0x00 0x00 0x0000
Request message body: None.
If the command was not successful then no response is sent.
Response header: 0x52 0xSS 0x01 0x00 0x00 0x00 0xNNNN
Where NNNN is the password.
Response message body:
Refer to Message Type 82 $GPRMC

ULCP Binary Position Query

Request header: 0x55 0xSS 0x00 0x00 0x00 0x00 0x0000
Request message body: None.
If the command was not successful then no response is sent.
Response header: 0x55 0xSS 0x01 0x00 0x00 0x18 0xNNNN
Where NNNN is the password.
Response message body:
Refer to Message Type 85 ULCP binary format GPS data message - GPSULCPP0S.

Wireless Link Data Count Query

Request header: 0x5C 0xSS 0x00 0x00 0x00 0x08 0x0000
Request message body: None.
If the command was not successful then no response is sent.
Response header: 0x55 0xSS 0x01 0x00 0x00 0xLL 0xNNNN
Where LL is the length - dependent on the Modem ID string length, NNNN is the password.
Response message body:
Refer to Message Type 92, ULCP binary format, Wireless Link TX/RX Data Count with Modem ID - ULCPLINKDATACOUNT.

Time Based Reporting

Setup:
Request header: 0x57 0xSS 0x02 0x00 0x00 0x18 0x0000
Request message body:
Hex Description
4 bytes Report destination IP address: xx.xx.xx.xx If 0.0.0.0 is set then use the IP address of this incoming setup message
4 bytes Report source IP address (the modems IP address): xx.xx.xx.xx
2 bytes Report destination UDP Port number. If 0 is set then use the port number of this incoming setup message
2 bytes Report source UDP port number: set to 6100
2 bytes Report time. Range 1 to 65535 seconds. 0 disables time based reporting
1 byte Control flags:
Bit 0 is used to make time based reporting active: 1 = active; 0 = inactive (switch off the start-up reporting)
Bit 1 is used to save this configuration to NV memory, but currently not supported: 0 = do not save; 1 = save to NV memory.
Bit 2 is used to select the report destination IP address:
when bit2 is 1 = use the IP address(destination UDP Port number) configured above;
when bit2 is 0 = use the IP address(fixed UDP Port number 6101) of this incoming setup message.
Bit 3 is used to select the message mode: 1 = ASCII mode (no ULCP header); 0 = with ULCP header
1 byte Number of messages to report
8 bytes Message list: up to 8 messages may be specified. Refer to the above list of possible messages

If the command was not successful then no response is sent.
Response header: 0x57 0xSS 0x03 0x00 0x00 0x18 0xNNNN
Where NNNN is the password.
Response message body: the message body as defined above

Query:
Request header: 0x57 0xSS 0x00 0x00 0x00 0x00 0x0000
Request message body: None.
If the command was not successful then no response is sent.
Response header: 0x57 0xSS 0x01 0x00 0x00 0x18 0xNNNN
Where NNNN is the password.
Response message body: the message body as defined above

Delta Position Based Reporting

Setup:
Request header: 0x56 0xSS 0x02 0x00 0x00 0x18 0x0000
Request message body:

Hex Description
4 bytes Report destination IP address: xx.xx.xx.xx If 0.0.0.0 is set then use the IP address of this incoming setup message
4 bytes Report source IP address (the modems IP address): xx.xx.xx.xx
2 bytes Report destination UDP Port number. If 0 is set then use the port number of this incoming setup message
2 bytes Report source UDP port number: set to 6100
2 bytes Report distance: range 1 to 65535 metres – 0 disables distance based reporting
2 bytes Maximum report time: sets a timer to send reports if the unit has not moved the set distance
2 bytes Minimum report time: sets a minimum time between reports
1 byte Control flags:
Bit 0 is used to make time based reporting active: 1 = active; 0 = inactive (switch off the start-up reporting)
Bit 1 is used to save this configuration to NV memory, but currently not supported: 0 = do not save; 1 = save to NV memory.
Bit 2 is used to select the report destination IP address:
when bit2 is 1 = use the IP address(destination UDP Port number) configured above;
when bit2 is 0 = use the IP address(fixed UDP Port number 6101) of this incoming setup message.
Bit 3 is used to select the message mode: 1 = ASCII mode (no ULCP header); 0 = with ULCP header
1 byte Number of messages to report
8 bytes Message list: up to 8 messages may be specified. Refer to the above list of possible messages

If the command was not successful then no response is sent.
Response header: 0x56 0xSS 0x03 0x00 0x00 0x18 0xNNNN
Where NNNN is the password.
Response message body: the message body as defined above

Query:
Request header: 0x56 0xSS 0x00 0x00 0x00 0x00 0x0000
Request message body: None.
If the command was not successful then no response is sent.
Response header: 0x56 0xSS 0x01 0x00 0x00 0x18 0xNNNN
Where NNNN is the password.
Response message body: the message body as defined above


Examples

1. Set all OUTPUT ports(1~4) on
Send the following packet to the modem through the UDP port number 6100
0x59 01 02 00 00 08 00 00 FF FF FF FF 00 00 00 00

The response packet will come from the UDP port number 6101


2. Set Delta Position Based Reporting
Destination IP/Port: 192.168.1.20:2000
Time period: every 5(min)~10(max) seconds
Distance: every 7 metre
Message Type: $GPGGA(0x50) and $GPRMC(0x52) in ASCII mode

Send the following packet to the modem through the UDP port number 6100
0x56 00 02 00 00 00 00 00 C0 A8 01 14 00 00 00 00
D0 07 D4 17 07 00 0A 00 05 00 0D 02 50 52 00 00
00 00 00 00

The response packet will come from the UDP port number 6101