How to get NTP time using an Arduino and ESP-01 via Hardserial or Softserial?

Hello,

I'm already using NTPClient library and a Wemos or NodeMCU board without any problem.

But now, I want to simply connect an Arduino UNO to an ESP-01 via hardserial or softserial, and get time from an NTP server (preferably using the mentioned library).

I've searched all the net but I couldn't find any comprehensive code to do it. All the codes are using the shields. But I want to use the cheap ESP-01 for the project.

one option
flash AT firmware into esp-01. the AT Lobo version of AT 1.7, because it can return the time as epoch
and then use my WiFiEspAT library in Uno

or use Robin’s Serial Input Basics to communicate between the 2.

the esp8266 has SNTP in SDK. no need to use the NTPClient library

Many thanks for your replies.

Is there any solution I could fetch time using the default ESP-01 firmware?
Actually I'm not going to change the firmware, because I want to use remotexy at the same time and it won't work with any other firmware.

mohsen1981:
Many thanks for your replies.

Is there any solution I could fetch time using the default ESP-01 firmware?
Actually I'm not going to change the firmware, because I want to use remotexy at the same time and it won't work with any other firmware.

my recommendation uses AT firmware. the latest classic (NonOS SDK) version. only it is a custom build which can return the time as epoch