SIM800 Series_NTP_Application Note_V1.03
About Document
Version History
Version Date
1.00
1.01
2013-10-29
2014-06-30
Owner
Jumping
Jumping
1.02
1.03
2019-12-10
2020-06-15
Jumping
Yizhe.Tan
/Wenjie.Lai
What is new
Original
Chapter Scope, Add projects
Chapter 3.1,Modify network time synchronizati--on
Add note.
Chapter Scope
All
Scope
This document presents the AT command of NTP operation and application examples. This document can
apply to SIM800 series modules with NTP function.
www.simcom.com 3 / 9
SIM800 Series_NTP_Application Note_V1.03
Contents
About Document .................................................................................................................... 3
Version History ...................................................................................................................................... 3
Scope .................................................................................................................................................... 3
Contents ................................................................................................................................. 4
Introduction ...................................................................................................................... 5
1
1.1 Purpose of the document ............................................................................................................ 5
1.2 Related documents ..................................................................................................................... 5
1.3 Conventions and abbreviations ................................................................................................... 5
2 NTP Introduction .............................................................................................................. 6
2.1 NTP Function .............................................................................................................................. 6
2.2 SNTP Function ............................................................................................................................ 6
3 AT Command .................................................................................................................... 7
3.1 AT+CNTPCID Set GPRS Bearer Profile’s ID ............................................................................ 7
3.2 AT+CNTP Synchronize Network Time ...................................................................................... 7
4 NTP Expamples ................................................................................................................ 9
4.1 Network Time Synchronize ......................................................................................................... 9
www.simcom.com 4 / 9
SIM800 Series_NTP_Application Note_V1.03
1 Introduction
1.1 Purpose of the document
Based on module AT command manual, this document will introduce NTP application process.
Developers could understand and develop application quickly and efficiently based on this document.
1.2 Related documents
[1] SIM800 Series_AT Command Manual
1.3 Conventions and abbreviations
Abbreviations
EVB
NTP
TE
TA
DTE
DCE
ME
MS
Description
Evaluation Board
Network Time Protocol
Terminal Equipment
Terminal Adapter
Data Terminal Equipment or plainly “the application” which is running on an
embedded system
Data Communication Equipment or facsimile DCE(FAX modem, FAX board)
Mobile Equipment
Mobile Station
www.simcom.com 5 / 9
SIM800 Series_NTP_Application Note_V1.03
2 NTP Introduction
2.1 NTP Function
Network Time Protocol (NTP) is used to make computer time synchronization protocol, which allows the
computer to its server or clock source (such as quartz, GPS, etc.) do synchronization, it can provide
high-precision time correction (LAN with standard deviation of less than 1 millisecond between, WAN tens
of milliseconds), and can be accessed by way of confirmation encryption protocol to prevent malicious
attacks
2.2 SNTP Function
SNTP: Simple Network Time Protocol.
SNTPV4 adapted from the NTP is mainly used to synchronize computer clocks in the Internet. SNTP for
NTP function without full use of the situation. Compare previous NTP and SNTP versions, SNTPV4
introduction does not change the original NTP specification and implementation process, it is a further
improvement of NTP support in a simple, stateless remote procedure calls to perform accurate and reliable
mode of operation, which is similar to in the UDP / TIME protocol.
Currently SIM800 series modules only support SNTP function module.
www.simcom.com 6 / 9
SIM800 Series_NTP_Application Note_V1.03
3 AT Command
SIM800 series modules provide NTP AT command as follows:
AT Command
AT+CNTPCID
AT+CNTP
Description
Set GPRS bearer profile’s ID
Synchronize network time
3.1 AT+CNTPCID Set GPRS Bearer Profile’s ID
AT+CNTPCID Set GPRS Bearer Profile’s ID
Test Command
AT+CNTPCID=?
Response
+CNTPCID: (range of supporded s)
OK
Parameters
See Write Command
Response
+CNTPCID:
OK
Parameters
See Write Command
Response
OK
If error is related to ME functionality:
ERROR
Parameters
Bearer profile identifier, refer to AT+SAPBR
Note
Read Command
AT+CNTPCID?
Set Command
AT+CNTPCID=
Reference
3.2 AT+CNTP Synchronize Network Time
www.simcom.com 7 / 9
SIM800 Series_NTP_Application Note_V1.03
AT+CNTP Synchronize Network Time
Test Command
AT+CNTP=?
Read Command
AT+CNTP?
Write Command
AT+CNTP=[,