This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

MDK, SNTP Client, Timeout in case of error?

Hi,

I would like know the timeout between netSNTPc_GetTime() and netSNTPc_cb_t(seconds) where seconds = 0 (error case) when the ip address of SNTP server is bad.

No information in the Doxygen documentation : https://www.keil.com/pack/doc/mw/Network/html/group__starting__sntp.html

(and how to change it?)

Regards,

Julien MÊME

Parents
  • the API netSNTPc_GetTime() internally uses UDP socket to send the request to the SNTP server. There are totally 3 times of retry. And each time has a different timeout, namely 1 sec, 2 sec and 4 sec. 

    Follow this page http://www.keil.com/support/docs/3982.htm to enable the network debug output, so that you will see the output like "Retransmitting request", "Timeout, Server not responding". And based on the timestamp for each output, you can see clearly how much timeout it actually is.

Reply
  • the API netSNTPc_GetTime() internally uses UDP socket to send the request to the SNTP server. There are totally 3 times of retry. And each time has a different timeout, namely 1 sec, 2 sec and 4 sec. 

    Follow this page http://www.keil.com/support/docs/3982.htm to enable the network debug output, so that you will see the output like "Retransmitting request", "Timeout, Server not responding". And based on the timestamp for each output, you can see clearly how much timeout it actually is.

Children
No data