Binary

Binary messages are strictly machine readable format. They are ideal for applications where the amount of data transmitted is fairly high. Due to the inherent compactness of binary as opposed to ASCII data, messages are much smaller. The smaller message size allows a larger amount of data to be transmitted and received by the receiver’s communication ports. The structure of all binary messages follows the general conventions as noted here:

  1. Basic format of:

    • Header: 3 Sync bytes plus 25-bytes of header information. The header length is variable as fields may be appended in the future. Always check the header length.

    • Data: variable

    • CRC: 4 bytes

  2. The 3 Sync bytes will always be:

    Byte Hex Decimal

    First

    AA

    170

    Second

    44

    68

    Third

    12

    18

  3. The CRC is a 32-bit CRC (see 32-Bit CRC for the CRC algorithm) performed on all data including the header.

  4. The header is in the format shown in Table: Binary Message Header Structure.

Example

To convert the command RTKTIMEOUT 60 to binary, populate the following fields in the header:

Sync1, Sync2, Sync3, Header length, Message ID, Port Address, and Message Length.

Always use THISPORT (0xC0) for the port address.

The binary header for this command is:

The full binary command is:

Binary Message Header Structure

Field

Field Name

Field Type

Description

Binary Bytes

Binary Offset

Ignored on Input

1

Sync

Uchar

Hexadecimal 0xAA

1

0

N

2

Sync

Uchar

Hexadecimal 0x44

1

1

N

3

Sync

Uchar

Hexadecimal 0x12

1

2

N

4

Header Length

Uchar

Length of the header

1

3

N

5

Message ID

Ushort

This is the Message ID number of the log (see the command or log descriptions for the Message ID values of individual commands or logs)

2

4

N

6

Message Type

Char

Bits 0-4 = Measurement source1

Bits 5-6 = Format

00 = Binary

01 = ASCII

10 = Abbreviated ASCII, NMEA

11 = Reserved

Bit 7 = Response bit (see Message Responses)

0 = Original Message

1 = Response Message

1

6

N

7

Port Address

Uchar

See Table: Detailed Port Identifier (decimal values >=32 may be used) (lower 8-bits only) 2

1

7

N 3

8

Message Length

Ushort

The length in bytes of the body of the message, not including the header nor the CRC

2

8

N

9

Sequence

Ushort

Used for multiple related logs. It is a number that counts down from N-1 to 0 where N is the number of related logs and 0 means it is the last one of the set. Most logs only come out one at a time in which case this number is 0

2

10

N

10

Idle Time

Uchar

Time the processor is idle, calculated once per second. Take the time (0 – 200) and divide by two to give the percentage of time (0 – 100%). 0% indicates the processor is fully occupied. Other values indicate the availability of the processor to take on tasks.

1

12

Y

11

Time Status

Enum

Indicates the quality of the GPS reference time (see Table: GPS Reference Time Status).

1 4

13

N 5

12

Week

Ushort

GPS reference week number

2

14

N

13

ms

GPSec

Milliseconds from the beginning of the GPS reference week

4

16

N

14

Receiver Status

Ulong

32-bits representing the status of various hardware and software components of the receiver (see Table: Receiver Status)

4

20

Y

15

Reserved

Ushort

Reserved for internal use

2

24

Y

16

Receiver
S/W Version

Ushort

A value (0 - 65535) representing the receiver software build number

2

26

Y

Detailed Port Identifier

ASCII Port Name

Hex Port Value

Decimal Port Value

Description

NO_PORTS

0

0

No ports specified

COM1

20

32

COM1

COM2

40

64

COM2

COM3

60

96

COM3

SPECIAL

a0

160

Unknown port

THISPORT

c0

192

Current COM port

FILE

e0

224

Port for logging to a file

USB1

5a0

1440

USB1

USB2

6a0

1696

USB2

USB3

7a0

1952

USB3

AUX

8a0

2208

AUX port

COM4

ba0

2976

COM4

ETH1

ca0

3232

ETH1

IMU

da0

3488

IMU

ICOM1

fa0

4000

ICOM1

ICOM2

10a0

4256

ICOM2

ICOM3

11a0

4512

ICOM3

NCOM1

12a0

4768

NCOM1

NCOM2

13a0

5024

NCOM2

NCOM3

14a0

5280

NCOM3

ICOM4

15a0

5536

ICOM4

WCOM1

16a0

5792

WCOM1

COM5

17a0

6048

COM5

COM6

18a0

6304

COM6

BT1

19a0

6560

Bluetooth device

COM7

1aa0

6816

COM7

COM8

1ba0

7072

COM8

COM9

1ca0

7328

COM9

COM10

1da0

7584

COM10

CCOM1

1ea0

7840

CAN COM1

CCOM2

1fa0

8096

CAN COM2

CCOM3

20a0

8352

CAN COM3

CCOM4

21a0

8608

CAN COM4

CCOM5

22a0

8864

CAN COM5

CCOM6

23a0

9120

CAN COM6

ICOM5

26a0

9888

ICOM5

ICOM6

27a0

10144

ICOM6

ICOM7

28a0

10400

ICOM7

SCOM1

29a0

10656

SCOM1

SCOM2

2aa0

10912

SCOM2

SCOM3

2ba0

11168

SCOM3

SCOM4

2ca0

11424

SCOM4

The ports available vary based on the receiver.

Virtual Ports

Virtual ports can be used to create groups of logs which are all sent to the same physical port.

To remove logging to virtual ports, the virtual port must be specified or the _ALL port must be used. For example:

LOG COM2_1 BESTPOS ONTIME 1

LOG COM2_2 TRACKSTAT ONTIME 10

Logs on the virtual ports will not be cleared by UNLOGALL COM2. To clear the logs COM2_1, COM2_2 or COM2_ALL must be used.

Detailed Port Identifier – Virtual Ports

ASCII Port Name

Hex Port Value

Decimal Port Value

Description

COM1_ALL

1

1

All virtual ports for COM1

COM2_ALL

2

2

All virtual ports for COM2

COM3_ALL

3

3

All virtual ports for COM3

THISPORT_ALL

6

6

All virtual ports for the current port

FILE_ALL

7

7

All virtual ports for logging to file

ALL_PORTS

8

8

All virtual ports for all ports

USB1_ALL

d

13

All virtual ports for USB1

USB2_ALL

e

14

All virtual ports for USB2

USB3_ALL

f

15

All virtual ports for USB3

AUX_ALL

10

16

All virtual ports for the AUX

COM4_ALL

13

19

All virtual ports for COM4

ETH1_ALL

14

20

All virtual ports for ETH1

IMU_ALL

15

21

All virtual ports for IMU

ICOM1_ALL

17

23

All virtual ports for ICOM1

ICOM2_ALL

18

24

All virtual ports for ICOM2

ICOM3_ALL

19

25

All virtual ports for ICOM3

NCOM1_ALL

1a

26

All virtual ports for NCOM1

NCOM2_ALL

1b

27

All virtual ports for NCOM2

NCOM3_ALL

1c

28

All virtual ports for NCOM3

ICOM4_ALL

1d

29

All virtual ports for ICOM4

WCOM1_ALL

1e

30

All virtual ports for WCOM1

COM1_1

21

33

COM1, virtual port 1

. . .

COM1_31

3f

63

COM1, virtual port 31

COM2_1

41

65

COM1, virtual port 1

. . .

COM2_31

5f

95

COM2, virtual port 31

COM3_1

61

97

COM3, virtual port 1

. . .

COM3_31

7f

127

COM3, virtual port 31

SPECIAL_1

a1

161

Unknown port, virtual port 1

. . .

SPECIAL_31

bf

191

Unknown port, virtual port 31

THISPORT_1

c1

193

Current COM port, virtual port 1

. . .

THISPORT_31

df

223

Current COM port, virtual port 31

FILE_1

e1

225

Virtual port 1 for logging to file

. . .

FILE_31

ff

255

Virtual port 31 for logging to file

USB1_1

5a1

1441

USB1, virtual port 1

. . .

USB1_31

5bf

1471

USB1, virtual port 31

USB2_1

6a1

1967

USB2, virtual port 1

. . .

USB2_31

6bf

1727

USB2, virtual port 31

USB3_1

7a1

1953

USB3, virtual port 1

. . .

USB3_31

7bf

1983

USB port 3, virtual port 31

AUX_1

8a1

2209

AUX port, virtual port 1

. . .

AUX_31

8bf

2239

AUX port, virtual port 31

COM4_1

ba1

2977

COM4, virtual port 1

. . .

COM4_31

bbf

3007

COM4, virtual port 31

ETH1_1

ca1

3233

ETH1, virtual port 1

. . .

ETH1_31

cbf

3263

ETH1, virtual port 31

IMU_1

da1

3489

IMU, virtual port 1

. . .

IMU_31

dbf

3519

IMU, virtual port 31

ICOM1_1

fa1

4001

ICOM1, virtual port 1

. . .

ICOM1_31

fbf

4031

ICOM1, virtual port 31

ICOM2_1

10a1

4257

ICOM2, virtual port 1

. . .

ICOM2_31

10bf

4287

ICOM2, virtual port 31

ICOM3_1

11a1

4513

ICOM3, virtual port 1

. . .

ICOM3_31

11bf

4543

ICOM3, virtual port 31

NCOM1_1

12a1

4769

NCOM1, virtual port 1

. . .

NCOM1_31

12bf

4799

NCOM1, virtual port 31

NCOM2_1

13a1

5025

NCOM2, virtual port 1

. . .

NCOM2_31

13bf

5055

NCOM2, virtual port 31

NCOM3_1

14a1

5281

NCOM3, virtual port 1

. . .

NCOM3_31

14bf

5311

NCOM3, virtual port 31

ICOM4_1

15a1

5537

ICOM4, virtual port 1

. . .

ICOM4_31

15bf

5567

ICOM4, virtual port 31

WCOM1_1

16a1

5793

WCOM1, virtual port 1

. . .

WCOM1_31

16bf

5823

WCOM1, virtual port 31

COM5_ALL

16c0

5824

All virtual ports for COM5

COM6_ALL

16c1

5825

All virtual ports for COM6

BT1_ALL

16c2

5826

All virtual ports for the Bluetooth device

COM7_ALL

16c3

5827

All virtual ports for COM7

COM8_ALL

16c4

5828

All virtual ports for COM8

COM9_ALL

16c5

5829

All virtual ports for COM9

COM10_ALL

16c6

5830

All virtual ports for COM10

CCOM1_ALL

16c7

5831

All virtual ports for CCOM1

CCOM2_ALL

16c8

5832

All virtual ports for CCOM2

CCOM3_ALL

16c9

5833

All virtual ports for CCOM3

CCOM4_ALL

16ca

5834

All virtual ports for CCOM4

CCOM5_ALL

16cb

5835

All virtual ports for CCOM5

CCOM6_ALL

16cc

5836

All virtual ports for CCOM6

ICOM5_ALL

16cf

5839

All virtual ports for ICOM5

ICOM6_ALL

16d0

5840

All virtual ports for ICOM6

ICOM7_ALL

16d1

5841

All virtual ports for ICOM7

SCOM1_ALL

16d2

5842

All virtual ports for SCOM1

SCOM2_ALL

16d3

5843

All virtual ports for SCOM2

SCOM3_ALL

16d4

5844

All virtual ports for SCOM3

SCOM4_ALL

16d5

5845

All virtual ports for SCOM4

COM5_1

17a1

6049

COM5, virtual port 1

. . .

COM5_31

17bf

6079

COM5, virtual port 31

COM6_1

18a1

6305

COM6, virtual port 1

. . .

COM6_31

18bf

6335

COM6, virtual port 31

BT1_1

19a1

6561

Bluetooth device, virtual port 1

. . .

BT1_31

19bf

6591

Bluetooth device, virtual port 31

COM7_1

1aa1

6817

COM7, virtual port 1

. . .

COM7_31

1abf

6847

COM7, virtual port 31

COM8_1

1ba1

7073

COM8, virtual port 1

. . .

COM8_31

1bbf

7103

COM8, virtual port 31

COM9_1

1ca1

7329

COM9, virtual port 1

. . .

COM9_31

1cbf

7359

COM9, virtual port 31

COM10_1

1da1

7585

COM10, virtual port 1

. . .

COM10_31

1dbf

7615

COM10, virtual port 31

CCOM1_1

1ea1

7841

CAN COM1, virtual port 1

. . .

CCOM1_31

1ebf

7871

CAN COM1, virtual port 31

CCOM2_1

1fa1

8097

CAN COM2, virtual port 1

. . .

CCOM2_31

1fbf

8127

CAN COM2, virtual port 31

CCOM3_1

20a1

8353

CAN COM3, virtual port 1

. . .

CCOM3_31

20bf

8383

CAN COM3, virtual port 31

CCOM4_1

21a1

8609

CAN COM4, virtual port 1

. . .

CCOM4_31

21bf

8639

CAN COM4, virtual port 31

CCOM5_1

22a1

8865

CAN COM5, virtual port 1

. . .

CCOM5_31

22bf

8895

CAN COM5, virtual port 31

CCOM6_1

23a1

9121

CAN COM6, virtual port 1

. . .

CCOM6_31

23bf

9151

CAN COM6, virtual port 31

ICOM5_1

26a1

9889

ICOM5, virtual port 1

. . .

ICOM5_31

26bf

9919

ICOM5, virtual port 31

ICOM6_1

27a1

10145

ICOM6, virtual port 1

. . .

ICOM6_31

27bf

10175

ICOM6, virtual port 31

ICOM7_1

28a1

10401

ICOM7, virtual port 1

. . .

ICOM7_31

28bf

10431

ICOM7, virtual port 31

SCOM1_1

29a1

10657

SCOM1, virtual port 1

. . .

SCOM1-31

29bf

10687

SCOM1, virtual port 31

SCOM2_1

2aa1

10913

SCOM2, virtual port 1

. . .

SCOM2_31

2abf

10943

SCOM2, virtual port 31

SCOM3_1

2ba1

11169

SCOM3, virtual port 1

. . .

SCOM3_31

2bbf

11199

SCOM3, virtual port 31

SCOM4_1

2ca1

11425

SCOM4, virtual port 1

. . .

SCOM4_31

2cbf

11455

SCOM4, virtual port 31

COM1_ALL, COM2_ALL, COM3_ALL, COM4_ALL, COM5_ALL, THISPORT_ALL, FILE_ALL, ALL_PORTS, USB1_ALL, USB2_ALL, USB3_ALL, AUX_ALL, ETH1_ALL, ICOM1_ALL, ICOM2_ALL, ICOM3_ALL, ICOM4_ALL, ICOM5_ALL, ICOM6_ALL, ICOM7_ALL, CCOM1_ALL, CCOM2_ALL, CCOM3_ALL, CCOM4_ALL, CCOM5_ALL, CCOM6_ALL, NCOM1_ALL, NCOM2_ALL, NCOM3_ALL, SCOM1_ALL, SCOM2_ALL, SCOM3_ALL, SCOM4_ALL and WCOM1_ALL are only valid for the UNLOGALL command.

Table: Available Port Types provides examples of where each port type might be used.

Available Port Types

Port Type

Description

Example of where it might be used

AUX

Auxiliary "serial" ports

An additional UART serial port available only on certain platforms

BTx

Bluetooth ports

These ports are used to connect over Bluetooth devices, when the receiver is equipped with a BT device

COMx

Serial Port

UART serial ports. Used when there is a physical RS-232 or RS-422 connection to the receiver

ICOMx

Internet ports

These ports are used when establishing TCP or UDP connections to the receiver over a network

NCOMx

NTRIP ports

These ports are used when establishing NTRIP connections to the receiver over a network

SCOMx

Script ports

Ports used by the Scripted User Interface (i.e. Lua)

USBx

USB "serial" ports

When the receiver is connected to an external host through USB, these ports are available

WCOMx

Web Server port

Ports used by Web Server applications, for receivers equipped with a web server