Prolific PL-6315 User Reference Manual

PL-6315 GPS Receiver Binary Message Protocol
User’s Reference Guide
Document Revision: v0.5 Document Release: July 21, 2009
Prolific Technology Inc.
7F, No. 48, Sec. 3, Nan Kang Rd.
Nan Kang, Taipei 115, Taiwan, R.O.C.
Telephone: +886-2-2654-6363
Fax: +886-2-2654-6161
E-mail: sales@prolific.com.tw
Website: http://www.prolific.com.tw
Revised Date:
July 21, 2009
PL6315_Binary Message Protocol_v0.5.doc
PL-6313 Product Datasheet - 2 - Document Version 0.3
Disclaimer
All the information in this document is subject to change without prior notice. Prolific Technology Inc. does not make any representations or any warranties (implied or otherwise) regarding the accuracy and completeness of this document and shall in no event be liable for any loss of profit or any other commercial damage, including but not limited to special, incidental, consequential, or other damages. Prolific products are not intended for use in medical, life-support devices, or applications involving potential risk of death, personal injury, or severe property damage in case of failure of the product.
Trademarks
The Prolific logo is a registered trademark of Prolific Technology Inc. All brand names and product names used in this document are trademarks or registered trademarks of their respective holders.
Copyrights
Copyright © 2007 Prolific Technology Inc., All rights reserved.
No part of this document may be reproduced or transmitted in any form by any means without the express written permission of Prolific Technology Inc.
Revised Date:
July 21, 2009
PL6315_Binary Message Protocol_v0.5.doc
PL-6313 Product Datasheet - 3 - Document Version 0.3
Table of Contents
1.0 Binary Message Structure.............................................................................. 5
2.0 Binary Input Message Type <F1h> ................................................................ 6
2.1 Restart (01h)......................................................................................................7
2.2 Baud-Rate Configuration (02h).......................................................................... 8
2.3 Set Datum (03h)................................................................................................ 9
2.4 Set NMEA Configuration (04h)......................................................................... 10
2.5 Query Firmware Version (05h)..........................................................................11
2.6 Clock Offset (06h)............................................................................................ 12
2.7 Restore Factory Default (08h).......................................................................... 13
2.8 Read Ephemeris Data (09h)............................................................................ 14
2.9 Load Ephemeris Data (0Ah) ............................................................................ 15
2.10 Read Almanac Data (0Bh)............................................................................... 16
2.11 Load Almanac Data (0Ch)................................................................................ 17
2.12 Set Module ID (0Dh)........................................................................................ 18
2.13 Query Module ID (0Eh).................................................................................... 19
2.14 Set DOP Mask (0Fh) ....................................................................................... 20
2.15 Set Elevation Mask (10h)................................................................................. 21
2.16 DGPS Control (11h)......................................................................................... 22
2.17 1PPS Control (12h).......................................................................................... 23
2.18 Set Output Format (13h).................................................................................. 24
2.19 Power Saving Mode (14h)............................................................................... 25
2.20 Maintain Customized ID (16h).......................................................................... 26
2.21 Query Navigation Parameters (17h) ................................................................ 27
2.22 Query System Settings (18h)........................................................................... 28
2.23 Set Local Time (19h)........................................................................................ 29
2.24 Set Extended Datum (1Bh).............................................................................. 30
2.25 Set Status Led Pattern (1Ch)........................................................................... 31
2.26 Record Trace (1Dh)......................................................................................... 32
2.27 Read Trace Log (1Eh) ..................................................................................... 33
2.28 Maintain Trace (1Fh)........................................................................................ 34
2.29 Set GPIOs (21h).............................................................................................. 35
2.30 Set Receiver Parameters (22h)........................................................................ 36
3.0 Binary Output Message Type <F2h> ........................................................... 37
3.1 Firmware Revision (80h).................................................................................. 38
3.2 Epheremis Data (83h)...................................................................................... 39
Revised Date:
July 21, 2009
PL6315_Binary Message Protocol_v0.5.doc
PL-6313 Product Datasheet - 4 - Document Version 0.3
3.3 Almanac Data (84h) .........................................................................................40
3.4 Module ID (85h)................................................................................................41
3.5 Navigation Parameters (86h)............................................................................42
3.6 System Settings (87h)......................................................................................43
3.7 Packed Trace Record (88h)..............................................................................45
3.9 Extended Trace Buffer Status (8Ah) .................................................................47
3.10 Trace Buffer Test Status (8Ch)..........................................................................48
3.11 Customized ID (8Dh)........................................................................................49
3.12 User Position, Velocity & Time (D0h)................................................................50
3.13 User Satellite Information (D5h).......................................................................51
3.14 User Measurement Information (D6h)..............................................................52
3.15 Extended Trace Record (D4h)..........................................................................53
Appendix A Ellipsoid List .....................................................................................55
Appendix B Datum Reference List.......................................................................56
Document Revision History...................................................................................63
Revised Date:
July 21, 2009
PL6315_Binary Message Protocol_v0.5.doc
PL-6313 Product Datasheet - 5 - Document Version 0.3
1.0 Binary Message Structure
The PL-6315 binary message comprises of binary string with length of up to 255 characters. It has the following format:
Format
%%<Message Start>Message Body><Message End><CR><LF>
Description Value Leading Byte 1 % 25h Leading Byte 2 % 25h
Message Type Message Start Message ID
Message Body
Up to 250 bytes
Message End Checksum Byte <CS> xxh Ending Byte 1 <CR> 0Dh
Ending Byte 2 <LF> 0Ah
Message Start: <Frame Type> <Frame ID>
Message Type: ACK (06h), NAK (15h), Input (F1h), Output (F2h) Message ID: Number between 0x01, 0xEF
Message Body: Contains input parameter or output information related to the particular message.
Message End: Checksum byte. The checksum is calculated by performing exclusive-or, XOR, of all
bytes from <Message Type> till the last byte prior to <Checksum Byte>:
CS = CS ^ <Data Byte>, where initially CS = 0
Sample C-Code for Calculating Checksum
char BIN_ComputeChecksum( char* buf, int len ) { int i;
char chksum; chksum = 0; for (i=0; i<len; i++ ) chksum ^= buf[i]; return sum;
}
Sample Binary Message: The following binary message sets baud-rate to 19200.
25 25 f1 02 00 02 00 00 00 00 00 00 f3 0d 0a
Revised Date:
July 21, 2009
PL6315_Binary Message Protocol_v0.5.doc
PL-6313 Product Datasheet - 6 - Document Version 0.3
2.0 Binary Input Message Type <F1h>
This group of binary messages are used to configure the GPS receiver, or to request information from the GPS receiver. If the receiver carries out the command successfully, ACK binary message is returned; otherwise NAK binary message is returned.
Data Types Used
UINT08: 8bit unsigned integer SINT16: 16bit signed integer UINT16: 16bit unsigned integer SINT32: 32bit signed integer UINT32: 32bit unsigned integer SPFP: 32bit single precision floating point number SINT08: 8bit signed integer DPFP: 64bit double precision floating point number
Byte Ordering
All data is in little-endian format, with low-order byte (LSB) at lower address.
ACK/NAK
An output ACK message indicates GPS accepts the message while NAK indicates GPS cannot execute the command at the moment. However, an error input command will not get any acknowledge message from GPS.
Revised Date:
July 21, 2009
PL6315_Binary Message Protocol_v0.5.doc
PL-6313 Product Datasheet - 7 - Document Version 0.3
2.1 Restart (01h)
Command Restart (01h) String %%<F1h><01h>< Parameter Bytes><CS><CR><LF>
Length 23
Parameters Data (Range)
Type
(Little-endian)
Unit Byte #
Restart Type
0: Hardware Reset (all parameters
below are unused)
1: Initialized Restart
UNT08 - 1
Start Mode
When Restart type is Initialized Restart
1: Hot start 2: Warm start 3: Cold start 4: Test start
5. Hot start with position
6. Warm start with time/position
7. Cold start with aided Time/Position
UINT08 - 2
Year >= 1980 UINT16 - 3 – 4
Month 1 ~ 12 UINT08 - 5
Day 1 ~ 31 UINT08 - 6
Hour 0 ~ 23 UINT08 - 7
Minute 0 ~ 59 UINT08 - 8
(UTC)
Date &
Time
Second 0 ~ 59 UINT08 - 9
Reserved - UINT08 - 10
Latitude
Between – 9000 and 9000
> 0: North Hemisphere < 0: South Hemisphere
SINT16
1/100
degree
11 – 12
(WGS-84)
Initial
Position
Longitude
Between – 18000 and 18000
> 0: East Hemisphere < 0: West Hemisphere
SINT16
1/100
degree
13 – 14
Altitude Between –1000 and 18300 SINT16 Meter 15 – 16
ACK
%%<06h><01h><CS><CR><LF>
Response
NAK
%%<15h><01h><CS><CR><LF>
Description
Force system to restart
Revised Date:
July 21, 2009
PL6315_Binary Message Protocol_v0.5.doc
PL-6313 Product Datasheet - 8 - Document Version 0.3
2.2 Baud-Rate Configuration (02h)
Command Baud-Rate Configuration (02h) String %%<F1h><02h>< Parameter bytes><CS><CR><LF>
Length 15
Parameters Data (Range)
Type
(Little-endian)
Unit Byte #
UART Selection
0: UART1 1: UART2
UNT08 - 1
Baud Rate
0: 4800 1: 9600 2: 19200 3: 38400 4: 57600 5: 115200
UNT08 - 2
All non-used byte should be set to 0 3 - 8
ACK
%%<06h><02h><CS><CR><LF>
Response
NAK
%%<15h><02h><CS><CR><LF>
Description
Configure serial port baud-rate
Revised Date:
July 21, 2009
PL6315_Binary Message Protocol_v0.5.doc
PL-6313 Product Datasheet - 9 - Document Version 0.3
2.3 Set Datum (03h)
Command Set Datum (03h) String %%<F1h><03h>< Parameter bytes><CS><CR><LF>
Length 15
Parameters Data (Range)
Type
(Little-endian)
Unit Byte #
Ellipsoid index See appendix A UINT16 - 1 – 2
Delta X See appendix B SINT16 Meter 3 – 4 Delta Y See appendix B SINT16 Meter 5 – 6 Delta Z See appendix B SINT16 Meter 7 – 8
ACK %%<06h><03h ><CS><CR><LF> Response NAK
%%<15h><03h ><CS><CR><LF>
Description Used to setup datum parameters for position transformation if non-WGS84
datum is required. Refer to Appendix A and B for the parameters to use.
Revised Date:
July 21, 2009
PL6315_Binary Message Protocol_v0.5.doc
PL-6313 Product Datasheet - 10 - Document Version 0.3
2.4 Set NMEA Configuration (04h)
Command Set NMEA Configuration (04h) String
%%<F1h><04h>< Parameter bytes><CS><CR><LF>
Length
15
Parameters Data (Range)
Type
(Little-endian)
Unit Byte #
Configuration flag
Bit7:0: Disable, 1:Enable,
Bit[0..2]: Position digits
Bit[3..5]: Time digits
UINT08 - 1
RMC Interval 0 ~ 255, 0: Disable UINT08 Second 2
VTG Interval 0 ~ 255, 0: Disable UINT08 Second 3
GGA Interval 0 ~ 255, 0: Disable UINT08 Second 4
GSA Interval 0 ~ 255, 0: Disable UINT08 Second 5
GSV Interval 0 ~ 255, 0: Disable UINT08 Second 6
GLL Interval 0 ~ 255, 0: Disable UINT08 Second 7 ZDA Interval 0 ~ 255, 0: Disable UINT08 Second 8
ACK
%%<06h><04h ><CS><CR><LF>
Response
NAK
%%<15h><04h ><CS><CR><LF>
Description
Define the output interval between two consecutive NMEA sentences of the same type. When all values are set to 0, no NMEA message is output. Configuration flag contains decimal digits for position and time
Revised Date:
July 21, 2009
PL6315_Binary Message Protocol_v0.5.doc
PL-6313 Product Datasheet - 11 - Document Version 0.3
2.5 Query Firmware Version (05h)
Command Query Firmware Version (05h) (6315) String
%%<F1h><05h>< Parameter bytes><CS><CR><LF>
Length
9
Parameters Data (Range)
Type
(Little-endian)
Unit Byte #
Firmware type 1: System code UINT08 - 1
CRC
0: No CRC 1: CRC information is requested
UINT08 - 2
ACK %%<06h><05h><CS><CR><LF> NAK
%%<15h><05h><CS><CR><LF>
Response
80h
See message 80h for firmware version information
Description Retrieve version information of the firmware.
When CRC is enabled, it may take up to one second to calculate the CRC value.
Revised Date:
July 21, 2009
PL6315_Binary Message Protocol_v0.5.doc
PL-6313 Product Datasheet - 12 - Document Version 0.3
2.6 Clock Offset (06h)
Command Clock Offset (06h) (6315) String %%<F1h><06h>< Parameter bytes><CS><CR><LF>
Length 11
Parameters Data (Range)
Type
(Little-endian)
Unit Byte #
Clock 0: query SINT32 - 1 - 4
ACK %%<06h><06h><CS><CR><LF> Response NAK
%%<15h><06h><CS><CR><LF>
Description
To query clock offset/ To Set clock offset
Revised Date:
July 21, 2009
PL6315_Binary Message Protocol_v0.5.doc
PL-6313 Product Datasheet - 13 - Document Version 0.3
2.7 Restore Factory Default (08h)
Command Restore Factory Default (08h) (for 2C PL-6315) String %%<F1h><08h>< Parameter bytes><CS><CR><LF>
Length 11
Parameters Data (Range)
Type
(Little-endian)
Unit Byte #
Restoration Key 0x53434C50 UINT32 - 1 - 4
ACK %%<06h><08h><CS><CR><LF> Response NAK
%%<15h><08h><CS><CR><LF>
Description Restore all configurable settings to factory default value.
All user settings will be erased.
Revised Date:
July 21, 2009
PL6315_Binary Message Protocol_v0.5.doc
PL-6313 Product Datasheet - 14 - Document Version 0.3
2.8 Read Ephemeris Data (09h)
Command Read Ephemeris Data (09h) String %%<F1h><09h>< Parameter bytes><CS><CR><LF>
Length 8
Parameters Data (Range)
Type
(Little-endian)
Unit Byte #
PRN
0: all
1~32: Satellite PRN
UINT08 - 1
ACK %%<06h><09h><CS><CR><LF> Response NAK
%%<15h><09h><CS><CR><LF>
Description The Ephemeris data of corresponding PRN will be output sequentially one by
one per second
Revised Date:
July 21, 2009
PL6315_Binary Message Protocol_v0.5.doc
PL-6313 Product Datasheet - 15 - Document Version 0.3
2.9 Load Ephemeris Data (0Ah)
Command Load Ephemeris Data (0Ah) String %%<F1h><0Ah>< Parameter bytes><CS><CR><LF>
Length 129
Parameters Data (Range)
Type
(Little-endian)
Unit Byte #
PRN
1~32: PRN
UINT08
-
1
reserved
-
UINT08
2
Flags
-
UINT08
3
IODE
-
UINT08
4
IODC
-
UINT16
5-6
WN
-
UINT16
7-8
URA
-
SINT08
9
Health
-
UINT08
10
TGD
-
Single float
11-14
TOC
-
SINT32
15-18
AF2
-
Single float
19-22
AF1
-
Single float
23-26
AF0
-
Single float
27-30
Crs
-
Single float
31-34
Delta_n
-
Single float
35-38
Cuc
-
Single float
39-42
M0
-
Double float
43-50
E
-
Double float
51-58
Cus
-
Single float
59-62
TOE
-
SINT32
63-66
A
-
Double float
67-74
Omega0
-
Double float
75-82
Cic
-
Single float
83-86
Cis
-
Single float
87-90
I0
-
Double float
91-98
Omega
-
Double float
99-116
Crc
-
Single float
117-110
OMEGADOT
-
Single float
111-114
IDOT
-
Single float
115-118
AODO
-
SINT16
119-120
CRC
-
UINT16
121-122
ACK %%<06h><0Ah><CS><CR><LF> Response NAK
%%<15h><0Ah><CS><CR><LF>
Description
Load ephemeris into Receiver
Revised Date:
July 21, 2009
PL6315_Binary Message Protocol_v0.5.doc
PL-6313 Product Datasheet - 16 - Document Version 0.3
2.10 Read Almanac Data (0Bh)
Command Read Almanac Data (0Bh) String %%<F1h><0Bh>< Parameter bytes><CS><CR><LF>
Length 8
Parameters Data (Range)
Type
(Little-endian)
Unit Byte #
PRN
0: all
1~32: Satellite PRN
UINT08 - 1
ACK %%<06h><0Bh><CS><CR><LF> Response NAK
%%<15h><0Bh><CS><CR><LF>
Description The Almanac data of corresponding PRN will be output sequentially one by one
per second
Revised Date:
July 21, 2009
PL6315_Binary Message Protocol_v0.5.doc
PL-6313 Product Datasheet - 17 - Document Version 0.3
2.11 Load Almanac Data (0Ch)
Command Load Almanac Data (0Ch) String %%<F1h><0Ch>< Parameter bytes><CS><CR><LF>
Length 57
Parameters Data (Range)
Type
(Little-endian)
Unit Byte #
PRN
1~32: PRN
UINT08
- 1
reserved
-
UINT08
2
Valid
-
UINT08
3
health
-
UINT08
4
WNt
-
UINT16
5 – 6
E
-
Single float
7 – 8
toa
-
UINT32
9 – 12
I0
-
Single float
13 – 16
OMEGADOT
-
Single float
17 – 20
A
-
Single float
21 – 24
OMEGA0
-
Single float
25 – 28
Omega
-
Single float
29 – 32
M0
-
Single float
33 – 36
Af0
-
Single float
37 – 40
Af1
Single float
41 – 44
Wna
UINT16
45 – 48
CRC
UINT16
49 - 50
ACK %%<06h><0Ch><CS><CR><LF> Response NAK
%%<15h><0Ch><CS><CR><LF>
Description
Load Alamanc into receiver
Revised Date:
July 21, 2009
PL6315_Binary Message Protocol_v0.5.doc
PL-6313 Product Datasheet - 18 - Document Version 0.3
2.12 Set Module ID (0Dh)
Command Set Module ID (0Dh) String %%<F1h><0Dh>< Parameter byte><CS><CR><LF>
Length 16
Parameters Data (Range)
Type
(Little-endian)
Unit Byte #
Type 1: Module ID type UINT08 - 1
ID 1~2^32 UINT32 - 2 - 5
Reserved - UINT32 - 6 - 9
ACK %%<06h><0Dh><CS><CR><LF> Response NAK
%%<15h><0Dh><CS><CR><LF>
Description
Setup Module ID.
Revised Date:
July 21, 2009
PL6315_Binary Message Protocol_v0.5.doc
PL-6313 Product Datasheet - 19 - Document Version 0.3
2.13 Query Module ID (0Eh)
Command Query Module ID (0Eh) String %%<F1h><0Eh>< Parameter byte><CS><CR><LF>
Length 8
Parameters Data (Range)
Type
(Little-endian)
Unit Byte #
Type 1: User ID retrieval UINT08 - 1
ACK %%<06h><0Eh><CS><CR><LF> NAK
%%<15h><0Eh><CS><CR><LF>
Response
85h
See message 85h for detail
Description
Retrieve User ID of the module.
Loading...
+ 44 hidden pages