Download as pdf or txt
Download as pdf or txt
You are on page 1of 20

Quectel Function Introduction

Time Synchronization

2014.11.20

© Quectel Wireless Solutions Co., Ltd. All rights reserved www.quectel.com


Contents

What is Time Synchronization?

Application of Time Synchronization

How to Synchronize Time?

Synchronize Time with Quectel Modules

page 2 www.quectel.com
What is Time Synchronization?

» Time Synchronization
The computer or device clock should be kept
consistent with standard time. Time source is
provided by the base station, a server, GPS or set
manually set.
In modern computer network time, synchronization
is critical because every aspect of managing,
securing, planning, and debugging a network
involves determining when events happen. Time
also provides the only frame of reference between
all devices on the network. Without synchronized
time, accurately correlating log files between these
devices is difficult, even impossible.

page 3 www.quectel.com
Contents

What is Time Synchronization?

Application of Time Synchronization

How to Synchronize Time?

Synchronize Time with Quectel Modules

page 4 www.quectel.com
Application of Time Synchronization

PDA Personal Located Transportation


Management

page 5 www.quectel.com
Contents

What is Time Synchronization?

Application of Time Synchronization

How to Synchronize Time?

Synchronize Time with Quectel Modules

page 6 www.quectel.com
How to Synchronize Time?

NITZ

GPS

General Quectel NTP


Method
RTC

RTC

page 7 www.quectel.com
How to Synchronize Time?

General Method

Time Synchronization with GPS

Get accurate time information after GPS receives


satellites

Unable to obtain precise time if GPS signal is


ineffective

page 8 www.quectel.com
How to Synchronize Time?

General Method

Time Synchronization with RTC

Get reliable system time

Usually power supply with battery back-up

There might be timing errors caused by chip


temperature drift

Affected by hardware, RTC cannot be guaranteed to


use for long time if power cut.

page 9 www.quectel.com
How to Synchronize Time?

Quectel Methods

Compared with traditional methods, there are several ways to realize time
synchronization by Quectel modules:

 NITZ(Network Identity and Time Zone): This function needs the support of
local GSM network and it will not generate GPRS data traffic.

 NTP(Network Time Protocol): If local GSM network does not support NITZ,
you can choose this method

 RTC (Real-Time Clock). In addition, if the device is equipped with a backup


battery, you can also realize time synchronization with RTC. In this case, the
system clock can be initialized by RTC at system startup.

page 10 www.quectel.com
How to Synchronize Time?

Time Synchronization with NITZ

 Introduction  Advantages
• Get mobile end-user • High-precision time
time through network correction
operators
• Does not generate
• GMT GPRS data traffic
NITZ • It takes 9s to get time
after start-up

 AT Commands  Requirement
• AT+QNITZ=1 • This function needs
the support of local
• AT+CTZU=1 or 3
GSM network
• The setting of these two
commands can be auto
saved. It is no need to use
AT&W.

page 11 www.quectel.com
How to Synchronize Time?

AT commands
AT+QNITZ=1 // Enable to update time zone via NITZ
automatically
OK
AT+CTZU=1 or 3 // Enable to synchronize RTC via GSM network
OK (1: GMT time; 3: Local time)
**********Restart the module or switch CFUN ********************

RDY // Take effect after restarting module on


the initial setup
+CFUN: 1
+CPIN: READY
Call Ready

+QNITZ: “14/11/20,07:09:54+32,0” // Report time after receiving network


time message

AT+CCLK? //Query current clock, AT+CTZU=3


+CCLK: “14/11/20,15:10:06+32”
OK

page 12 www.quectel.com
How to Synchronize Time?

Time Synchronization with NTP Server

 Introduction  Advantages
• Connect to network time • High-precision time correction
server
• Enable time self-synchronization
• GMT without time zone by AT command
• No restrictions on any
NTP Server hardware or external
environment

 Requirement
 AT Commands
• AT+QNTP =“IP”, port • Generate GPRS data traffic

• AT+CCLK="04/01/01,00:0
0:02+32"

page 13 www.quectel.com
How to Synchronize Time?

AT commands
AT+CCLK="04/01/01,00:00:02+32“ // Setup time zone
OK

AT+CGREG?
+CGREG: 0,1 // Registered to GPRS network
OK

AT+QNTP=“IP”, port //Synchronize the local time via NTP


OK
+QNTP: 0 //Successfully synchronize the local time

AT+CCLK? //Query current local time


+CCLK: “14/11/20,17:01:14+32”
OK

AT+QIDEACT //Deactivate GPRS PDP context


DEACT OK

page 14 www.quectel.com
How to Synchronize Time?

Recommended optional NTP server address:

WINDOWS 2008 NTP: time.windows.com

The official U.S. time : time.nist.gov

page 15 www.quectel.com
How to Synchronize Time?

Comparison of Several Methods for Time Synchronization

GPS RTC NTP NITZ

About 15s for


First time to get As soon as
getting the 10s typ. 9s typ.
time information /s start up
satellites

No delay Based on
Accuracy /s (Good signal) operating time
>2s <1s

page 16 www.quectel.com
Contents

What is Time Synchronization?

Application of Time Synchronization

How to Synchronize Time?

Synchronize Time with Quectel Modules

page 17 www.quectel.com
Recommended Process

Power on

Take effect after restarting Enable to synchronize GMT via


module on the initial setup GSM network (AT+QNITZ=1) Note: Timeout is 5s after query CREG
return 1.
Update GMT or local
time to RTC? Synchronize time via NTP server:
Update local time to RTC Update GMT time to RTC AT+CPIN?
AT+CSQ
AT+CTZU=3 AT+CTZU=1 AT+CREG?
AT+CGREG?
No
AT+QICSGP=1,”APN”
QNITZ
Restart the module or AT+QIREGAPP
response
Switch CFUN AT+QIACT
AT+QILOCIP
AT+CCLK=“time + time zone”
Does Local network AT+QNTP=“IP”, port
operator support NITZ? AT+QIDEACT

Response: +QNITZ: <time string>


Query current time Response: +QNTP: 0
AT+CCLK?

page 18 www.quectel.com
Synchronize Time with Quectel Modules

The following figure shows a step-by-step procedure to synchronize time


with Quectel module.

Time Source NTP server / NITZ Quectel module Hardware


Indicator

page 19 www.quectel.com
Thank you

page 20 www.quectel.com

You might also like