SNTP AT command set ================================================== This section describes the driver SNTP instruction set. The instruction set has different adaptations for different modules. Please go to the next step for details::doc:`../instruction/other/firmware_differences`。 - :ref:`AT+SNTPTIME `:Example Query the SNTP time - :ref:`AT+SNTPTIMECFG `:Example Query and set the SNTP time zone and server - :ref:`AT+SNTPINTV `:Example Query and set the SNTP refresh interval .. _cmd-SNTPTIME: AT+SNTPTIME:Example Query the SNTP time ------------------------------------------ explain ^^^^ - SNTP This function is disabled by default and needs to be started using AT+SNTPTIMECFG after networking. If this function is not enabled, the local RTC time is queried inquiry command ^^^^^^^^ **command:** :: AT+SNTPTIME? **response:** :: +SNTPTIME: :: OK parameter ^^^^ - ****:week[Mon,Tue,Wed,Thu,Fri,Sat,Sun] - ****:month[Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec] - ****:day - ****:hour - ****:minute - **** :second - **** :year example ^^^^ :: AT+SNTPTIMECFG=1,8//Enable sntp OK AT+SNTPTIME?//Query the time after the synchronization is successful +SNTPTIME:Wed May 03 10:49:41 2023 OK .. _cmd-SNTPTIMECFG: AT+SNTPTIMECFG Query the time after the synchronization is successful. Query and set the SNTP time zone and server ------------------------------------------ Set command ^^^^^^^^ **command:** :: AT+SNTPTIMECFG=,[,,,] **response:** :: OK parameter ^^^^ - ****:SNTP Refresh service status Settings; 0 is closed. 1 Start - ****:Time zone. The value ranges from -12 to +14 - ****:SNTP server domain name, if the default value is "cn.ntp.org.cn", "ntp.sjtu.edu.cn", "us.pool.ntp.org". example ^^^^ :: AT+SNTPTIMECFG=1,8,cn.ntp.org.cn OK inquiry command ^^^^^^^^ **command:** :: AT+SNTPTIMECFG? **response:** :: +SNTPTIMECFG:,[,,,] OK parameter ^^^^ - ****:response time - ****:Whether the SNTP refresh service is started. 0 is not running; 1 Running - ****:Time zone. The value ranges from -12 to +14 - ****:SNTP server domain name example ^^^^ :: AT+SNTPTIMECFG? +SNTPTIMECFG:1,8,"cn.ntp.org.cn","ntp.sjtu.edu.cn","us.pool.ntp.org" OK .. _cmd-SNTPINTV: AT+SNTPINTV Example Query and set the SNTP refresh interval ------------------------------------------ Set command ^^^^^^^^ **command:** :: AT+SNTPINTV= **response:** :: OK parameter ^^^^ - ****:The value ranges from 15 to 4,294,967, expressed in seconds example ^^^^ :: AT+SNTPINTV=15 OK inquiry command ^^^^^^^^ **command:** :: AT+SNTPINTV? **response:** :: +SNTPINTV: OK interval second:Refresh interval, unit S parameter ^^^^ - ****: second:Refresh interval, unit S example ^^^^ :: AT+SNTPINTV? +SNTPINTV:3600 OK