snt_example_main not working

notsmart
Posts: 1
Joined: Tue Mar 08, 2022 10:25 am

snt_example_main not working

Postby notsmart » Tue Mar 08, 2022 10:31 am

Hi there

It is my first time programming esp32 using ESP IDF extension on visual code.

I wanted to synch the time through NTP server.
Before writing my own code, I wanted to test it with the sntp_example_main.c

I only changed the Wi-Fi Credentials to my own, then build, flashed the code.
It is running without any error messages, but there is no result. The time not synching.
The event "sntp_set_time_sync_notification_cb" does nothing.

Now, I don't know, what am I doing wrong? Did I forget to enable something?

This is what I get to see in the terminal.

I (5570) example: Initializing SNTP
I (5570) example: List of configured NTP servers:
I (5580) example: server 0: pool.ntp.org
I (5580) example: Waiting for system time to be set... (1/15)
I (7590) example: Waiting for system time to be set... (2/15)
I (9590) example: Waiting for system time to be set... (3/15)
I (11590) example: Waiting for system time to be set... (4/15)
I (13590) example: Waiting for system time to be set... (5/15)
I (15590) example: Waiting for system time to be set... (6/15)
I (17590) example: Waiting for system time to be set... (7/15)
I (19590) example: Waiting for system time to be set... (8/15)
I (21590) example: Waiting for system time to be set... (9/15)
I (23590) example: Waiting for system time to be set... (10/15)
I (25590) example: Waiting for system time to be set... (11/15)
I (27590) example: Waiting for system time to be set... (12/15)
I (29590) example: Waiting for system time to be set... (13/15)
I (31590) example: Waiting for system time to be set... (14/15)
I (33590) wifi:state: run -> init (0) <<<<(sleep mode starts)
I (33590) wifi:pm stop, total sleep time: 27993058 us / 29548531 us

Who is online

Users browsing this forum: Bing [Bot] and 194 guests