gmag11 / ESPNtpClient

High accuracy NTP library for ESP32 and ESP8266
MIT License
118 stars 25 forks source link

Can this library be used with native ESP8266 Ethernet drivers such as lwIP_enc28j60? #27

Closed Nourbakhsh-Rad closed 2 years ago

Nourbakhsh-Rad commented 2 years ago

Hi @gmag11 Can this library be used with native ESP8266 Ethernet drivers such as lwIP_enc28j60?

For testing this purpose, I used ESP12-E with ENC28j60 ethernet module, and changed these parameters in src / ESPNtpClient.cpp :

  1. WiFi.localIP() ---> my device IP
  2. WiFi.isConnected() ---> true
  3. WiFi.reconnect() ---> no change!

and I activated DEBUG ....

Everything looks good! But the UDP packet is not sent and returns error code -4 Do you have an opinion on this? Thanks a lot ...

gmag11 commented 2 years ago

Hi, did you succeeded using ethernet?

Nourbakhsh-Rad commented 2 years ago

Hi, did you succeeded using ethernet?

Hi, With DHCP everything is OK ( LwIP_Ethernet and WiFi ) It seems the UDP services dos not work properly with LwIP_Ethernet and static IP

https://github.com/esp8266/Arduino/issues/8415#issue-1083259309

Can you change this library for using LwIP_Ethernet?

gmag11 commented 2 years ago

I have no ENC28J60 adapter to test. Do you know what changes would be needed. If so you can make a pull request.

Nourbakhsh-Rad commented 2 years ago

I have no ENC28J60 adapter to test. Do you know what changes would be needed. If so you can make a pull request.

After solving the UDP problem, I will try to do this