Skip to main content
Manfred Dietrich
Associate II
January 12, 2017
Solved

SPWF01SA NTP client

  • January 12, 2017
  • 2 replies
  • 1062 views
Posted on January 12, 2017 at 13:21

Hi,

Is there a sample implementation of a NTP client to get the time from a timeserver?

I use the SPWF01SA together with a STM32F401.

BR,

Manfred

#spwf01-ntp
    This topic has been closed for replies.
    Best answer by Gerardo GALLUCCI
    Posted on January 12, 2017 at 19:58

    Hi Manfred,

    if SimpleNTP is enough, you can open a simple UDP socket  (AT+S.SOCKON) and write (AT+S.SOCKW) a 48 byte requesto to server. Than expect a 48 byte reply, and read (AT+S.SOCKR) it. 

    http://ceng393.cankaya.edu.tr/uploads/files/file/ntp_project-1.pdf

     a simple flow.

    2 replies

    Gerardo GALLUCCI
    Gerardo GALLUCCIBest answer
    ST Employee
    January 12, 2017
    Posted on January 12, 2017 at 19:58

    Hi Manfred,

    if SimpleNTP is enough, you can open a simple UDP socket  (AT+S.SOCKON) and write (AT+S.SOCKW) a 48 byte requesto to server. Than expect a 48 byte reply, and read (AT+S.SOCKR) it. 

    http://ceng393.cankaya.edu.tr/uploads/files/file/ntp_project-1.pdf

     a simple flow.
    Manfred Dietrich
    Associate II
    January 12, 2017

    Posted on January 12, 2017 at 20:09

     

    Hi Gerardo,

    SimpleNTP is accurate enough.

    Thanks for your quick answer.

    Manfred