Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNTP serwer start after wifi connection. #2695

Closed
TomaszKn opened this issue Nov 12, 2023 · 6 comments
Closed

SNTP serwer start after wifi connection. #2695

TomaszKn opened this issue Nov 12, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@TomaszKn
Copy link

TomaszKn commented Nov 12, 2023

The Problem

My ESP always start on old date 1970, even if I have set TimeServer (0.pl.pool.ntp.org).
After 4 hour date do not change to now.

Version

v15.3.0 (Commit: 3fbff0a)

Logfile

[0d00h00m00s] 1970-01-01T08:08:43 <INF> [MAIN] =================================================
[0d00h00m00s] 1970-01-01T08:08:43 <INF> [MAIN] ==================== Start ======================
[0d00h00m00s] 1970-01-01T08:08:43 <INF> [MAIN] =================================================
[0d00h00m00s] 1970-01-01T08:08:43 <INF> [MAIN] PSRAM size: 8388608 byte (8MB / 64MBit)
[0d00h00m00s] 1970-01-01T08:08:43 <INF> [MAIN] Total heap: 4376891 byte
[0d00h00m04s] 1970-01-01T08:08:47 <INF> [MAIN] Camera info: PID: 0x26, VER: 0x42, MIDL: 0x7f, MIDH: 0xa2
[0d00h00m04s] 1970-01-01T08:08:47 <INF> [SDCARD] Basic R/W check started...
[0d00h00m05s] 1970-01-01T08:08:48 <INF> [SDCARD] Basic R/W check successful
[0d00h00m05s] 1970-01-01T08:08:49 <INF> [SNTP] TimeServer: 0.pl.pool.ntp.org
[0d00h00m05s] 1970-01-01T08:08:49 <INF> [SNTP] Configuring NTP Client...
[0d00h00m05s] 1970-01-01T09:08:49 <INF> [SNTP] Time zone set to CET-1CEST,M3.5.0,M10.5.0/3
[0d00h00m05s] 1970-01-01T09:08:49 <INF> [SNTP] The local time is unknown, starting with 1970-01-01 09:08:49
[0d00h00m05s] 1970-01-01T09:08:49 <INF> [SNTP] Once the NTP server provides a time, we will switch to that one
[0d00h00m05s] 1970-01-01T09:08:49 <INF> [MAIN] CPU frequency: 160 MHz
[0d00h00m06s] 1970-01-01T09:08:49 <INF> [SDCARD] Folder/file presence check started...
[0d00h00m06s] 1970-01-01T09:08:49 <INF> [SDCARD] Folder/file presence check successful
[0d00h00m06s] 1970-01-01T09:08:49 <INF> [MAIN] Tag: 'v15.3.0', Release: v15.3.0 (Commit: 3fbff0a), Date/Time: 2023-07-22 09:42, Web UI: Release: v15.3.0 (Commit: 3fbff0a)
[0d00h00m06s] 1970-01-01T09:08:50 <INF> [MAIN] Reset reason: Via esp_restart
[0d00h00m06s] 1970-01-01T09:08:50 <INF> [WLANINI] SSID: XX
[0d00h00m07s] 1970-01-01T09:08:50 <INF> [WLANINI] Password: XXXXXXXX
[0d00h00m07s] 1970-01-01T09:08:50 <INF> [WLANINI] IP-Address: 192.168.010.026
[0d00h00m07s] 1970-01-01T09:08:50 <INF> [WLANINI] Gateway: 192.168.010.001
[0d00h00m07s] 1970-01-01T09:08:50 <INF> [WLANINI] Netmask: 255.255.255.0
[0d00h00m07s] 1970-01-01T09:08:50 <INF> [WLANINI] RSSIThreshold: -75
[0d00h00m07s] 1970-01-01T09:08:50 <INF> [MAIN] WLAN config loaded, init WIFI...
[0d00h00m07s] 1970-01-01T09:08:50 <INF> [WIFI] Manual interface config -> IP: 192.168.010.026, Gateway: 192.168.010.001, Netmask: 255.255.255.0
[0d00h00m07s] 1970-01-01T09:08:50 <INF> [WIFI] No DNS server, use gateway
[0d00h00m07s] 1970-01-01T09:08:50 <INF> [WIFI] Set hostname to: watermeter
[0d00h00m07s] 1970-01-01T09:08:50 <INF> [WIFI] Init successful
[0d00h00m10s] 1970-01-01T09:08:53 <INF> [WIFI] Connected to: xx, RSSI: -65
[0d00h00m10s] 1970-01-01T09:08:53 <INF> [WIFI] Assigned IP: 192.xx
[0d00h00m27s] 1970-01-01T09:09:10 <INF> [MAIN] Device info: CPU cores: 2, Chip revision: 100
[0d00h00m27s] 1970-01-01T09:09:10 <INF> [MAIN] SD card info: Name: SD16G, Capacity: 14784MB, Free: 3987MB
[0d00h00m29s] 1970-01-01T09:09:12 <INF> [MAIN] Initialization completed successfully
[0d00h00m31s] 1970-01-01T09:09:14 <INF> [LOGFILE] Set log level to WARNING
[0d00h01m16s] 1970-01-01T09:09:59 <WRN> [MAINCTRL] Time server is configured, but time is not yet set!
[0d00h06m16s] 1970-01-01T09:14:59 <WRN> [MAINCTRL] Time server is configured, but time is not yet set!
[0d00h11m16s] 1970-01-01T09:19:59 <WRN> [MAINCTRL] Time server is configured, but time is not yet set!

Expected Behavior

No response

Screenshots

No response

Additional Context

No response

@TomaszKn TomaszKn added the bug Something isn't working label Nov 12, 2023
@friedpa
Copy link

friedpa commented Nov 13, 2023

I cannot find 0.pl.pool.ntp.org -> try 0.pool.ntp.org

@TomaszKn
Copy link
Author

TomaszKn commented Nov 13, 2023

I cannot find 0.pl.pool.ntp.org -> try 0.pool.ntp.org

I test:

ping 0.pool.ntp.org
PING 0.pool.ntp.org (109.205.49.8) 56(84) bytes of data.
64 bytes from 0.ntp.beyond.pl (109.205.49.8): icmp_seq=1 ttl=59 time=13.9 ms
64 bytes from 0.ntp.beyond.pl (109.205.49.8): icmp_seq=2 ttl=59 time=15.7 ms
and
ping 0.pl.pool.ntp.org
PING 0.pl.pool.ntp.org (212.160.106.226) 56(84) bytes of data.
64 bytes from ntp2.tp.pl (212.160.106.226): icmp_seq=1 ttl=57 time=9.04 ms
64 bytes from ntp2.tp.pl (212.160.106.226): icmp_seq=2 ttl=57 time=10.7 ms

Both servers seem to be OK.
I think the problem is somewhere else.

@friedpa
Copy link

friedpa commented Nov 13, 2023

Try out if your Router provide NTP. Just insert the IP Address of the Gateway e.g. 192.168.10.1
We had a couple of problems with DNS for the NTP Server. You could try to insert the IP Address directly, e.g. 109.205.49.8

@TomaszKn
Copy link
Author

Try out if your Router provide NTP. Just insert the IP Address of the Gateway e.g. 192.168.10.1 We had a couple of problems with DNS for the NTP Server. You could try to insert the IP Address directly, e.g. 109.205.49.8

Setting NTP server by IP resolve problem.
My suggestion to append this annotation to doc.

@friedpa
Copy link

friedpa commented Nov 13, 2023

I am glad it is working, please close the issue. Thx!

@TomaszKn
Copy link
Author

Thanks for your time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants