You are on page 1of 11

SIM508 GPS Command Examples

SIM508_AN_01_V1.01

SIM508 GPS Command Examples

Document Title: Version: Date: Status: Document Control ID:

SIM508 GPS Command Examples 1.01 2007-3-27 Release SIM508_AN_01_V1.01

General Notes Simcom offers this information as a service to its customers, to support application and engineering efforts that use the products designed by Simcom. The information provided is based upon requirements specifically provided to Simcom by the customers. Simcom has not undertaken any independent search for additional relevant information, including any information that may be in the customers possession. Furthermore, system validation of this product designed by Simcom within a larger electronic system remains the responsibility of the customer or the customers system integrator. All specifications supplied herein are subject to change. Copyright This document contains proprietary technical information which is the property of SIMCOM Limited., copying of this document and giving it to others and the using or communication of the contents thereof, are forbidden without express authority. Offenders are liable to the payment of damages. All rights reserved in the event of grant of a patent or the registration of a utility model or design. All specification supplied herein are subject to change without notice at any time. Copyright SIMCOM Limited. 2007

SIM508_AN_01_V1.01

27.03.2007

SIM508 GPS Command Examples

Contents
Contents ............................................................................................................................................3 Version History.................................................................................................................................4 1 Set Push-To-Fix (PTF) Mode.........................................................................................................5 2 Set Continue Mode(Full Power Mode) ..........................................................................................8 3 Set UART protocol and Baud rate .................................................................................................9 4 CheckSum software .....................................................................................................................10

SIM508_AN_01_V1.01

27.03.2007

SIM508 GPS Command Examples

Version History
Date 2007-03-27 Version 01.01 Description of change Origin Author KEN

SIM508_AN_01_V1.01

27.03.2007

SIM508 GPS Command Examples

1 Set Push-To-Fix (PTF) Mode


PTF mode is disabled after reset and can be enabled by inputting GPS command. See SIM508_GPS_COMMAND_V1.01 Reference Manual for detailed information. The following two commands for switching into different power state: Set Trickle-Power Parameters - Message ID 151 Set Low Power Acquisition Parameters - Message ID 167 Switch Continue mode to PTF mode, you must input GPS command. Example 1: A0A2000997000100C8000000C80228B0B3 A0A2000FA70002BF200000EA60000000F0000003C2B0B3 (Low Power Acquisition Parameters: Max Off Time: 0002BF20 //180000ms=180s Max Search Time: 0000EA60 //60000ms=60s Push-to-Fix Period: 000000F0 //240s) Input above commands on SIRF binary UART, GPS receiver will enter into sleep mode soon and wakeup every 240s. When the signal is too weak to fix a position in the max searching time 60s, the GPS receiver will then enter into sleep mode for 120s (180s-60s).

SIM508_AN_01_V1.01

27.03.2007

SIM508 GPS Command Examples

Figure 1 Example 2: A0A2000997000100C8000000C80228B0B3 A0A2000FA70000753000009C400000003C00000264B0B3 (Low Power Acquisition Parameters: Max Off Time: 00007530 //30000ms=30s Max Search Time: 00009C40 //40000ms=40s Push-to-Fix Period: 0000003C //60s) Input above commands on SIRF binary UART, GPS receiver will enter into sleep mode soon and wakeup every 60s. When the signal is too weak to fix a position in the max searching time 40s such as indoor, the GPS receiver will then enter into sleep mode for 30s.

SIM508_AN_01_V1.01

27.03.2007

SIM508 GPS Command Examples

Figure 2 If the time set by Max Search Time elapses and no fix is obtained, the receiver will enter into sleep mode. The sleep time depend on Max Search Time and Max Off Time Parameters which are set by Low Power Acquisition command. If Max Search Time >= Max Off Time, the sleep time when position cant fixed = Max Off Time; If Max Search Time < Max Off Time, the sleep time when position cant fixed = (Max Off Time Max Search Time). If a valid position fix is obtained in the Max Search Time, the receiver will then go to sleep, the sleep time when position is fixed = (PTF period real searching time). When the receiver reactivates, a hot start is commanded. The change of low power sets are keep into SRAM, all changes will lose if no GPS_VRTC supplied

SIM508_AN_01_V1.01

27.03.2007

SIM508 GPS Command Examples

2 Set Continue Mode (Full Power Mode)


Return to continue mode, for example: A0A2000997000003E8000000C8024AB0B3 A0A2000FA700007530000493E000000708000002D2B0B3 Input above commands after wakeup, GPS receiver will go back to Continue mode. User can wakeup the GPS receiver by two methods: 1 Pull high GPS_WAKEUP (Pin62), GPS receiver will be waked up at the positive edge. 2 Implement a RESET action on GPS_M-RST (Pin 66). After wakeup it will execute a new PTF cycle. Note: In-advertent triggering of GPS_WAKEUP pin while in the fully powered state will cause the chip to crash. So you can justify the system power state by checking GPS_VCC_RF (pin 76, internal RF power supply). When the GPS receiver is in sleep state, GPS_VCC_RF keeps in low level. If the receiver has been externally awakened using the GPS_WAKEUP pin, communication activity must occur within 5 seconds, otherwise, the chip will go back into the sleep mode GPS_WAKEUP pin is a CMOS signal from 0 to 2.85V.If Pulling up this pin to high level for minimum of 62us , the GPS receiver will be waked up.

SIM508_AN_01_V1.01

27.03.2007

SIM508 GPS Command Examples

3 Set UART protocol and Baud rate


SIRF command: Set UART Configuration - Message ID 165 NEMA command: 100Set Serial Port // Set UART-A NEMA 4800 and UART-B SIRF 57600 A0A20031A5000101000012C008010000000100000000E1000801000000FF0505000000000000 000000FF0505000000000000000000047FB0B3 // Set UART-A NEMA 57600 and UART-B: none A0A20031A50001010000E1000801000000010505000000000000000000FF05050000000000000 00000FF050500000000000000000003AEB0B3 // Set UART-A SIRF 9600 and UART-B NEMA 4800 A0A20031A5000000000025800801000000010101000012C00801000000FF05050000000000000 00000FF05050000000000000000000443B0B3 Note: The two UART port cant use the same protocol, so you can set UART-A NEMA and UART-B SIRF;UART-A SIRF and UART-B NEMA ;UART-A SIRF and UART-B none ..,but if both UART-A and UART-B set SIRF or NEMA will cause a command error. If SIM508 UART-A use SIRF protocol and UART-B use NEMA protocol , the MCU connect UART-B and you want UART-B change to SIRF protocol by inputting NEMA command ,it cant implement this because UART-A now using SIRF protocol. If UART-A has used SIRF 57600 and UART-B used NEMA 4800, you want UART-A change to NEMA 4800 for a short time, you can implement following procedure: //Change UART-A protocol from SIRF to NEMA 4800, UART-B: none A0A20031A5000101000012C00801000000010505000000000000000000FF05050000000000000 00000FF0505000000000000000000039FB0B3 //Change current protocol form NEMA to SIRF 57600 $PSRF100,0,57600,8,1,0*37 .. ..//Execute some application //Set UART-A SIRF 57600 and UART-B NEMA 4800 A0A20031A50000000000E1000801000000010101000012C00801000000FF0505000000000000 000000FF0505000000000000000000047FB0B3 The change of UART sets are keep into SRAM, all changes will lose if no GPS_VRTC supplied

SIM508_AN_01_V1.01

27.03.2007

SIM508 GPS Command Examples

4 CheckSum software
Checksum software can be used to compute the SIRF and NEMA command checksum. Run checksum.exe and select NEMA radio button, in data domain, type the NEMA message in turn: start region, data sequence region. Click Compute button, then the checksum will be generated automatically.

$PSRF100, 0,57600,8,1,0

// Start region // Data sequence region

For example, type $PSRF100,0,57600,8,1,0 and click the Compute button, the whole command will be $PSRF100,0,57600,8,1,0*37 Open the checksum command and select SIRF radio button, in data domain, type the SIRF message in turn: start sequence region, payload length region and payload region. Click the Compute button, then the checksum will be generated automatically.

A0A2 0009 97000003E8000000C8

// Start Sequence // Payload Length // Payload

For example type A0A2000997000003E8000000C8 and click Compute button, the whole command will be A0A2000997000003E8000000C8024AB0B3
SIM508_AN_01_V1.01 10 27.03.2007

Contact us: Shanghai SIMCom Ltd. Add: SIM Technology Building, No. 700, Yishan Road, Shanghai,P. R. China 200233 Tel: +86 21 5427 8900 Fax: +86 21 5427 6035 URL: www.sim.com

You might also like