Can't make the SNTP module work #6304
Replies: 1 comment
-
Posted at 2019-09-19 by Robin Wed 2019.09.18 While I'm not able to provide any direct help here @perbu posting your code might assist others. This article would be of benefit also: Posted at 2019-09-19 by perbu Thanks for the suggestion. So, for what it is worth, here are some more details about my setup: The code is pretty simple, it is the example from the module documentation:
.env looks like this:
Ideally what I'd would like to have is some sort of debugger, but I've not seen those working on the esp8266 - but there might be a way to enable the debugger which I've yet to find. I'm currently considering importing the SNTP module into the IDE and printf-debug it. We'll see how that goes. Cheers, Per. Posted at 2019-09-19 by perbu For fun I tried to push the code to an ESP32-WROVER-B-module I had lying around and it worked perfectly. I'll be happy to work some more on the issue if anyone can suggest a direction. But if nothing else, I've found out how I can get my clock project to the next phase. :-) Cheers, Per. Posted at 2019-09-19 by @MaBecker maybe you like to try this too setTime via webserver Posted at 2019-09-21 by perbu That is a nice tip, @MaBecker. Thanks! Posted at 2019-09-21 by @MaBecker and more more, as you are running on ESP8266 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2019-09-18 by perbu
Hi.
I'm making a watch so I needed an accurate time source. I've found the SNTP module which seems to do just that. However, it always times out and I'm not sure how to proceed to figure out why it doesn't work.
The SNTP module is based on @hapi/sntp so I tried running that module on my laptop against the same NTP service and it works fine. Both the laptop and the MCU are on the same network.
Any tips on how to proceed to debug this?
TIA,
Per.
Beta Was this translation helpful? Give feedback.
All reactions