khoih-prog / EthernetWebServer

This is simple yet complete WebServer library for AVR, AVR Dx, Portenta_H7, Teensy, SAM DUE, SAMD21/SAMD51, nRF52, STM32, RP2040-based, etc. boards running Ethernet shields. The functions are similar and compatible to ESP8266/ESP32 WebServer libraries to make life much easier to port sketches from ESP8266/ESP32. Coexisting now with `ESP32 WebServer` and `ESP8266 ESP8266WebServer` libraries. Ethernet_Generic library is used as default for W5x00 with custom SPI
MIT License
178 stars 49 forks source link

NTP Server not working on teensy 4.1 #16

Closed jimmie11 closed 3 years ago

jimmie11 commented 3 years ago

Thank you for your efforts in continuing to update the library.

I tried the NTP example. The Teensy 4.1 gets an IP address but does not receive a response from the NTP server.

I tried changing the timeserver address to "129.6.15.28", but still no response.

khoih-prog commented 3 years ago

Can you test it without using EthernetWebServer to be sure this is the issue of NativeEthernet Library.

I don't think this issue has anything to do with this Library.

I actually haven't connected my Teensy 4.1 to run NativeEthernet Library yet.

jimmie11 commented 3 years ago

Sure, will try it now and report.

BTW, while the example webserver_NativeEthernet works, the Advanced example does not. In the Advanced example, the board does get an address but the server never responds.

On Sat, Dec 5, 2020 at 2:40 PM Khoi Hoang notifications@github.com wrote:

Can you test it without using EthernetWebServer https://github.com/khoih-prog/EthernetWebServer to be sure this is the issue of NativeEthernet Library https://github.com/vjmuzik/NativeEthernet.

I don't think this issue has anything to do with this Library.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/khoih-prog/EthernetWebServer/issues/16#issuecomment-739361524, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG5ZBN5UZNSFBHXYTV5WRKTSTKEDRANCNFSM4UOYJ5GA .

khoih-prog commented 3 years ago

As I haven't worked on Teensy for a quite some time, and still has no NativeEthernet to test on Teensy 4.1, it'll take much longer time to figure out what wrong with the NativeEthernet Library and why the AdvancedWebServer_NativeEthernet example is not working.

If you can simplify the sketch, by not using this EthernetWebServer lib, to be sure this is the issue of NativeEthernet Library as I suspect. Then post an issue in Teensy forum.

I'll order some parts to enable NativeEthernet on my Teensy 4.1, but it'll take some time. You're on your own now to help find out what's wrong.

jimmie11 commented 3 years ago

OK, thanks, will try and update you.

I tried an NTP example with the NativeEthernet library and it is also NOT working. Apparently there is a bug ...

https://forum.pjrc.com/threads/64253-Teensy-4-1-UDP-and-web-server-drop-packets?p=258298

On Sat, Dec 5, 2020 at 2:59 PM Khoi Hoang notifications@github.com wrote:

As I haven't worked on Teensy for a quite some time, and still has no NativeEthernet to test on Teensy 4.1, it'll take much longer time to figure out what wrong with the NativeEthernet Library https://github.com/vjmuzik/NativeEthernet and why the AdvancedWebServer_NativeEthernet example https://github.com/khoih-prog/EthernetWebServer/tree/master/examples/AdvancedWebServer_NativeEthernet is not working.

If you can simplify the sketch, by not using this EthernetWebServer lib https://github.com/khoih-prog/EthernetWebServer, to be sure this is the issue of NativeEthernet Library]( https://github.com/vjmuzik/NativeEthernet) as I suspect. Then post an issue in Teensy forum.

I'll order some parts to enable NativeEthernet on my Teensy 4.1, but it'll take some time. You're on your own now to help find out what's wrong.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/khoih-prog/EthernetWebServer/issues/16#issuecomment-739380344, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG5ZBN6FS2QGWJ6GAAKQFNLSTKGKNANCNFSM4UOYJ5GA .

khoih-prog commented 3 years ago

The NativeEthernet Library is still new and buggy. Try our best to help make it better for everybody.

If urgent, I think you can try using the Ethernet, EthernetLarge, Ethernet2/3 options for the Teensy 4.1 W5x00

jimmie11 commented 3 years ago

The NTP example is working with the Teensy 4.1

I tried multiple NTP servers but the only one that worked was time.google.com.

I have attached an example the uses the NativeEthernet library and also works with "time.google.com" NTP.zip

khoih-prog commented 3 years ago

Can't download the NTP.zip as Chrome blocks complaining some virus, etc. Can you post the code directly here.

khoih-prog commented 3 years ago

It's possible the issue with AdvancedWebServer_NativeEthernet example has some relation with your recent issue Teensy-4-1-Ethernet-Error-client-availableForWrite? and more.

khoih-prog commented 3 years ago

Hi @jimmie11

Could you please try again using QNEthernet library ?

In case you haven't tried it, have a quick look at this very good New lwIP-based Ethernet library for Teensy 4.1


Major Releases v1.6.0

  1. Add support to QNEthernet Library for Teensy 4.1 built-in Ethernet
  2. Update examples with new features