Data Sheet
!
5. TCP/IP-Related AT Commands
5.2.22. AT+CIPSNTPCFG—Sets the Configuration of SNTP
5.2.23. AT+CIPSNTPTIME—Checks the SNTP Time
5.2.24. AT+CIPDNS_CUR—Sets User-defined DNS Servers; Configuration Not Saved in the Flash
Commands
Query Command:
AT+CIPSNTPCFG?
Set Command:
AT+CIPSNTPCFG=<enable>[,<timezone>][,<SNTP
server0>,<SNTPserver1>,<SNTPserver2>]
Response
+CIPSNTPCFG:<enable>,<timezone>,<SN
TPserver1>[,<SNTPserver2>,<SNTP
server3>]
OK
OK
Parameters
• <enable>:
‣
0: SNTP is disabled;
‣
1: SNTP is enabled.
• <timezone>: time zone; range: [-11,13]; if SNTP is enabled, the <timezone> has to be set;
• <SNTPserver0>: optional parameter indicating the first SNTP server;
• <SNTPserver1>: optional parameter indicating the second SNTP server;
• <SNTPserver2>: optional parameter indicating the third SNTP server.
Example
AT+CIPSNTPCFG=1,8,"cn.ntp.org.cn","ntp.sjtu.edu.cn","us.pool.ntp.org"
Note
If the <SNTP server> parameters are not set, servers "cn.ntp.org.cn","ntp.sjtu.edu.cn",
"us.pool.ntp.org" will be used by default.
Query
Command
AT+CIPSNTPTIME?
Response
+CIPSNTPTIME:<time>
OK
Parameters
<time>: SNTP time
For example,
+CIPSNTPTIME:ThuAug0414:48:052016
OK
Example
AT+CWMODE=1//setstationmode
AT+CWJAP="DemoAP","password"//connecttorouter,accesstheinternet
AT+CIPSNTPCFG=8//settimezone
AT+CIPSNTPTIME?//gettime
Commands
Query Command:
AT+CIPDNS_CUR?
Function: Get the current DNS server.
Set Command:
AT+CIPDNS_CUR=<enable>[,<DNSserver0>,<DNSserver1>]
Function: Set user-defined DNS servers.
Espressif
! /!54 58
2017.05