Closed williamsulzer closed 3 years ago
Thanks for your encouraging words.
Can you try using the WebServer examples such as
to see if the problem disappears. If so, check your code. It's possible you need to add some delay() somewhere or your code prevent some parts of the library from running.
You can also post a reproducible sketch to verify and debug.
Check How to create a Minimal, Reproducible Example
I actually don't have MKR1000 to test, only the similar Nano-33-IoT.
Good Luck,
Thanks for the input! After some testing, I am able to make the original version of HelloServer work by adding a 1ms delay in the implementation of clientHandle after this line. I'm not sure why this fixes it or if delays need to be introduced in other parts of the library, but I'll keep playing with it.
I'm excited to start using the library in my project! Thanks again!
Good to know.
It might be better to use yield() than delay(1) to be more efficient and avoid wasting time doing nothing.
Try to see if the MKR1000 core supports it.
insert this at https://github.com/khoih-prog/WiFiWebServer/blob/23215024c85eb0410a3cfd7aa790156f28a0a201/src/WiFiWebServer-impl.h#L198 before switch statement NOTE:Yield() doesnt work, so its a bit of a bodge!!
#if defined TimeAlarms_h
Alarm.delay(1);
#else
delay(1);
#endif
#endif
Hi, really great library! I am experiencing a strange issue where the handleClient doesn't seem to function when the _WIFILOGLEVEL identifier is set to 0 through 3. When the identifier is set to 4, everything works as expected.
With the identifier set to 0-3, I get the following output to serial:
Starting HelloServer on SAMD MKR1000 with WiFi101 using WiFi101 Library Connecting to WPA SSID: HTTP server started @
I can ping the device and it seems to be executing loop(). When using a browser to navigate to the server, the browser returns ERR_EMPTY_RESPONSE. No info is logged to Serial, and I can confirm that handleRoot or any other handler never gets called.
Very strange! Any ideas?