-
Notifications
You must be signed in to change notification settings - Fork 638
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
bootloop connecting to ntp #682
Comments
also this log may help: [013129] [NTP] Error: NTP server not reachable Exception (0): ctx: sys
ets Jan 8 2013,rst cause:4, boot mode:(3,2) wdt reset |
You can put gpio0 to GND at runtime. This will reset the device. There are different modes depending on the duration of holding the pin to GND, but factory reset should be around 5 or 10 seconds. |
It seems this problem is related to 2.4.0 firmware, I downgraded to 2.3.0 and the bootloop problem solved. but still ntp can not sync |
@bluexp1 can you try different ntpclient version? I was too having similar issue with Core 2.4.0, maybe updated client will handle this better. Running this right now with bogus ip and it seems fine --- a/code/platformio.ini
+++ b/code/platformio.ini
@@ -30,1 +30,2 @@ lib_deps =
- https://github.com/gmag11/NtpClient.git#28af3a5
+ https://github.com/gmag11/NtpClient.git#2d51f686
+ ESPAsyncUDP |
Any update on this? @bluexp1, note that currently ESPurna uses a forked version of the NtpClient library. https://github.com/xoseperez/NtpClient.git#0016a59 |
Sorry for late reply, I tested 1.13.1 compiled binaries but the problem still exists, How can I make sure it is not related to the network? |
The ESPurna binaries are compiled against 2.3.0. According to a previous message from you it should work. |
I tested in windows using NTP tool from the same network, and there is not any network problem. |
Can you also check mqtt connection with "test.mosquitto.org"? edit: nvm tethering What I was seeing may or may not be connected though. I did some cable management recently and repositioned some network devices, so it became |
Mqtt is working fine and I am already using static ip for esp, |
Try with different ntp server outside lan? Original logs included only one possible ip for 'pool.ntp.org' If NtpClient is doing something wrong, try out sdk client: https://github.com/esp8266/Arduino/blob/master/libraries/esp8266/examples/NTP-TZ-DST/NTP-TZ-DST.ino As last resort, there is LWIP debug (might be incomplete, but i think it will be enough to enable it): |
@xoseperez on possible solutions for this
edit: correction: sntp is supported in 2.3.0, but got some quirks. and it also does not support TZ data like the new one does. |
The "ntpclient" example project is working fine with "pool.ntp.org" server, so it seems that the problem is not my network. |
SDK's SNTP from previous comment or NtpClient one?. If SDK - completely different operation model. If NtpClient - slightly different settings. Which reminds me of one thing I did not think about previously: espurna/code/espurna/config/general.h Line 1044 in daf7864
Can you try changing this to 2000? Maybe also 3000 if previous did not work. And can you also please try |
I used ntpclient example project from arduino example projects. |
Also see gmag11/NtpClient#60 I blanked on version requirements, last checking only with esp32 and latest esp8266 git. ESPAsyncUDP uses And btw, about configTime. It is still available on Core 2.3.0. Need to verify that periodic syncing is working though, as I got some notes mentioning that it may not trigger (no source, will look into in) |
Hi, AsyncUDP version is working for ESP8266 but not for ESP32. That's the reason because I've not released it. |
Size being one consern, some preliminary testing with Locally, using I'd still strongly consider moving core base up. 3.0 SDK support is coming with configurable sleep mode, so it could also be enabled again; signed Updater/OTA coming; lwip2 instead of lwip1.4; AsyncUDP as a feature at all to maybe use multicast for local brokerless control etc. This should be a separate issue though. |
This will mean two-step upgrades for everyone. |
sliding into OT: Not necessarily, as the biggest .bins are with light support. Or web, for that matter. And generic relay modules like One of the fat ones - Or, another option is to disable debug: Extending HTTP API + implementing v2 changes would soften the need for web. |
Closing via #2132 |
I've released a new library whose focus is using internal time functions on ESP8266 and ESP32. It uses same interface concept as NTPClientLib with little modifications and additions but is more robust because it uses built in LWIP udp communication instead AsyncUDP library. Have a look here: https://github.com/gmag11/ESPNtpClient |
This is the log from 1.12.5a:
`connected with m.t, channel 1
ip:192.168.1.10,mask:255.255.255.0,gw:192.168.1.1
ip:192.168.1.10,mask:255.255.255.0,gw:192.168.1.1
wifi evt: 0
wifi evt: 3
:ur 1
[004581] [WIFI] MODE STA -------------------------------------
[004585] [WIFI] SSID m.t
[004589] [WIFI] IP 192.168.1.10
[004593] [WIFI] MAC 2C:3A:E8:39:10:69
[004598] [WIFI] GW 192.168.1.1
[004602] [WIFI] DNS 8.8.8.8
[004606] [WIFI] MASK 255.255.255.0
[004610] [WIFI] HOST ESPURNA_391069
[004613] [WIFI] BSSID 50:2B:73:26:40:59
[004616] [WIFI] CH 1
[004619] [WIFI] RSSI -60
[004621] [WIFI] ----------------------------------------------
[004640] [MDNS] OK
[005646] [MQTT] MQTT brokers found: 0
[hostByName] request IP for: pool.ntp.org
[hostByName] Host: pool.ntp.org IP: 194.225.50.25
:ur 1
[008327] [NTP] Error: NTP server not reachable
[hostByName] request IP for: pool.ntp.org
[hostByName] Host: pool.ntp.org IP: 194.225.50.25
:ur 1
[009839] [NTP] Error: NTP server not reachable
[hostByName] request IP for: pool.ntp.org
[hostByName] Host: pool.ntp.org IP: 194.225.50.25
:ur 1
[011356] [NTP] Error: NTP server not reachable
[hostByName] request IP for: pool.ntp.org
[hostByName] Host: pool.ntp.org IP: 194.225.50.25
ets Jan 8 2013,rst cause:4, boot mode:(3,2)
wdt reset
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v4ceabea9
~ld`
Also I'd like to know how I can factory reset device when flashing esp?
The text was updated successfully, but these errors were encountered: