The use of the ESP8266 in the world of IoT

User avatar
By Bebeno
#84100 Hi everybody.
I am new on this forum. I would like to ask you for help how solved my problem.
I am working on my another project and now it is first time when i use NTP for current time.
My problem is that ESP does not get data from server when is connected on home WIFI router. I can not find out what can be wrong with my router and settings because when I connected ESP8266 to my phone hotspot everything worked well. It means that problem is in my WIFI router which is running on TOMATO firmware.

Can somebody help me how to find out what is wrong and how to solved it?

Thanks a lot .
User avatar
By QuickFix
#84118 I think you'd better ask this question in the TOMATO community. :?
User avatar
By Bebeno
#84132 Hi guys.
Thanks for answer.
QuikFix - The reason why I asked for help on this form is that problem with time synchro has only ESP8266 . Windows computer does not have this problem and Android phone as well. Only ESP8266.

davydnorris - I am trying code what is as example in library.
Thisone.

Code: Select all#include <ESP8266WiFi.h>
#include <EasyNTPClient.h>
#include <WiFiUdp.h>

const char *ssid     = "Ivan Hotspot";
const char *password = "bebeno28";

WiFiUDP udp;
EasyNTPClient ntpClient(udp, "pool.ntp.org", ((2*60*60)+(30*60))); // IST = GMT + 5:30

void setup(){
  Serial.begin(115200);
  WiFi.begin(ssid, password);
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  if(WiFi.status() == WL_CONNECTED) Serial.println("Connected");
}

void loop() {
  Serial.println(ntpClient.getUnixTime()); 
  delay(5000); // wait for 5 seconds before refreshing.
}


And this is answer what I got throught serial port.

.......Connected
0
0
0
0


Thanks a lot for help.