ESP8266WebConfig compile error

I loaded the example code and when I compile, I get the error below. No changes were made to the code.
I was able to run the WiFiManager example AutoConnectWithFeedbackLED without any problems.
Any thoughts?

  • Thanks, Peter
Arduino: 1.6.8 (Windows 10), Board: "NodeMCU 1.0 (ESP-12E Module), 80 MHz, 115200, 4M (3M SPIFFS)"

In file included from C:\Users\Peter\Documents\Arduino\libraries\\examples\ESP8266WebConfig\ESP8266WebConfig.ino:7:0:

C:\Users\Peter\Documents\Arduino\libraries\\src/ThingerWebConfig.h: In member function 'virtual bool pson_spiffs_decoder::read(void*, size_t)':

C:\Users\Peter\Documents\Arduino\libraries\\src/ThingerWebConfig.h:40:47: error: invalid conversion from 'uint8_t* {aka unsigned char*}' to 'char*' [-fpermissive]

         file_.readBytes((uint8_t*)buffer, size);


In file included from C:\Users\Peter\Documents\Arduino\libraries\\examples\ESP8266WebConfig\ESP8266WebConfig.ino:1:0:

C:\Users\Peter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\cores\esp8266/FS.h:62:12: error:   initializing argument 1 of 'virtual size_t fs::File::readBytes(char*, size_t)' [-fpermissive]

     size_t readBytes(char *buffer, size_t length)  override {


Using library ESP8266WiFi at version 1.0 in folder: C:\Users\Peter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WiFi 
Using library DNSServer at version 1.1.0 in folder: C:\Users\Peter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\DNSServer 
Using library ESP8266WebServer at version 1.0 in folder: C:\Users\Peter\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.2.0\libraries\ESP8266WebServer 
Using library WiFiManager at version 0.11 in folder: C:\Users\Peter\Documents\Arduino\libraries\WiFiManager 
Using library at version 2.3.0 in folder: C:\Users\Peter\Documents\Arduino\libraries\ 
exit status 1
Error compiling for board NodeMCU 1.0 (ESP-12E Module)

Hi Peter! Thanks for reporting that. This is a small bug. It seems that the ESP8266 interface for reading files changed in the recent versions. I have updated the library but it may take some hours to appear updated in the Arduino IDE.

You can update the fix by your own. Here you have the changes:

Basically it changed the src/ThingerWebConfig.h

From this:

file_.readBytes((uint8_t*)buffer, size);

To this:

file_.readBytes((char*)buffer, size);

It is fixed in Thinger library 2.3.1. This is a really good addition to the library.

  • Peter
1 Like