logo elektroda
logo elektroda
X
logo elektroda

[esp8266] How to configure AT+CIPSNTPTIME and AT+CIPSNTPCFG to read NTP time?

BARVX 1077 1
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 17391110
    BARVX
    Level 6  
    Has anyone managed to read the time using the AT+CIPSNTPTIME and AT+CIPSNTPCFG commands ? If so, which ntp servers did he use because it keeps throwing me 00:00:00 on 1 January 1970
  • ADVERTISEMENT
  • #2 17684903
    kolgreen
    Level 16  
    BARVX wrote:
    Has anyone managed to read the time using AT+CIPSNTPTIME and AT+CIPSNTPCFG commands ? If so, which ntp servers did he use because it keeps throwing me 00:00:00 January 1, 1970
    .

    Apparently all you need to do is set the time zone.
    Example:
    AT+CIPSNTPCFG=1.8

    Or simultaneously time zone with NTP servers:
    AT+CIPSNTPCFG=1,8, "cn.ntp.org.cn", "ntp.sjtu.edu.cn", "us.pool.ntp.org"

    Then you give a moment of time for the ESP, and then you check-in.
    ESP must be set in station mode.
ADVERTISEMENT