Skip to main content
Manfred Dietrich
Associate II
Jan 12, 2017 12:21 PM UTC
Solved

SPWF01SA NTP client

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.
    Gerardo GALLUCCI
    Gerardo GALLUCCIBest answer
    ST Employee
    Jan 12, 2017 6:58 PM UTC
    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
    Jan 12, 2017 6:58 PM UTC
    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
    Jan 12, 2017 8:09 PM UTC

    Posted on January 12, 2017 at 20:09

     

    Hi Gerardo,

    SimpleNTP is accurate enough.

    Thanks for your quick answer.

    Manfred