-
Notifications
You must be signed in to change notification settings - Fork 75
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
Beta 3.0.2 version fails with ESP32 #105
Comments
Thank you @bill-orange . I'll try to reproduce it. |
@gmag11 Thanks. Something else to consider is an enhancement to provide Excel time as well as Unix time. The call would be something like:
I don't know if there is a big demand for this, but it is something to consider. |
It happens to me as well, and I think I identified the cause. On line 291 of NTPClientLib.cpp, you check if the IPAddress is 0. On the esp8266, the == operand takes in the uint32_t address that you compare against, so it's fine. But on the esp32, the == operand takes in const uint8_t* addr, a pointer to the address. So when you pass 0 as the argument, it tries to access the memory at address 0, and fails. |
@Clickau Line 289 in my 3.02 version, but, yes, that is probably it. |
I managed it by replacing "(uint32_t)(0)" with "INADDR_NONE"! //if (ntpServerIPAddress == (uint32_t)(0)) { |
I have also fixed it by changing that line to: if (((uint32_t)ntpServerIPAddress) == (uint32_t)(0)) { |
Fixed on 1d81889 |
I just tested the latest beta on a Wemos ESP32 (probably counterfeit). I get a kernal panic at NTP.begin().
Here's the dump.
Here's the test code.
Thanks for all the hard work on this stuff.
The text was updated successfully, but these errors were encountered: