khoih-prog / WiFiWebServer

This is simple yet complete WebServer library for AVR, Portenta_H7, Teensy, SAM DUE, SAMD, STM32, RP2040-based, etc. boards running WiFi modules/shields (WiFiNINA, CYW43439, U-Blox W101, W102, etc.). The functions are similar and compatible to ESP8266/ESP32 WebServer libraries to make life much easier to port sketches from ESP8266/ESP32. Now using WiFiMulti_Generic library
MIT License
104 stars 21 forks source link

Problem using ESP8266 nodeMCU 1.0 #20

Closed neckkola closed 1 year ago

neckkola commented 1 year ago

Describe the bug

When using the esp8266 nodemcu 1.0 board, with the esp core installed and 1.9.3 of WiFiWebServer, on compile the WifiWebServer reports "#error Unknown or unsupported board" and fails.

Using Arduino 2.0 rc 9.3. Installed the esp core. The board is recognized and is selected correctly.

Steps to Reproduce

Sample sketch to reproduce with nodemcu 1.0 (ESP-12E) selected as board.

include

include

void setup() { // put your setup code here, to run once: } void loop() { // put your main code here, to run repeatedly: }

Expected behavior

I am making the assumption as the documentation says that the ESP8266 is supported, it should work without modifications.

Actual behavior

The compile fails. I am able to make it work by modifying the WiFiWebServer.hpp to include the following at line 166:

elif (ESP8266)

define USE_WIFI_NINA false

// To use the default WiFi library here

define USE_WIFI_CUSTOM true


Arduino IDE version: 2.0 rc9.3
ESP32 Core Version  3.0.2
OS: Windows 11 Home
khoih-prog commented 1 year ago

Hi @neckkola

Thanks for reporting the problem. I just forgot about popular ESP32/ESP8266 recently and therefore the unintended error message.

Please change

https://github.com/khoih-prog/WiFiWebServer/blob/1c28df110fb3624122adbebbcc2d427399b96045/src/WiFiWebServer.hpp#L167-L171

as follows

#elif !(ESP32 || ESP8266) 

  #error Unknown or unsupported board

#endif

I'll fix the issue very soon for next release.

neckkola commented 1 year ago

Thank you so much and for a great product. Have a wonderful day.

khoih-prog commented 1 year ago

Hi @neckkola

The new WiFiWebServer releases v1.9.4 has just been published.


Releases v1.9.4

  1. Restore support to ESP32 and ESP8266. Check Problem using ESP8266 nodeMCU 1.0 #20