Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIfiManager on ESP32 is not working #22

Open
shahidare opened this issue Oct 25, 2018 · 13 comments
Open

WIfiManager on ESP32 is not working #22

shahidare opened this issue Oct 25, 2018 · 13 comments

Comments

@shahidare
Copy link

Hi,

I am trying to run the Autoconnect example from the wifimanager esp32.

I am getting the following error:

In file included from /Users/Sid/Documents/Arduino/libraries/WIFIMANAGER-ESP32-master/examples/AutoConnect/AutoConnect.ino:14:0:
/Users/Sid/Documents/Arduino/libraries/WIFIMANAGER-ESP32-master/WiFiManager.h:36:22: error: 'const char HTTP_HEAD []' redeclared as different kind of symbol
const char HTTP_HEAD[] PROGMEM = "<title>{v}</title>";
^
In file included from /Users/Sid/Library/Arduino15/packages/esp32/hardware/esp32/1.0.0/libraries/WebServer/src/WebServer.h:30:0,
from /Users/Sid/Documents/Arduino/libraries/WIFIMANAGER-ESP32-master/examples/AutoConnect/AutoConnect.ino:12:
/Users/Sid/Library/Arduino15/packages/esp32/hardware/esp32/1.0.0/libraries/WebServer/src/HTTP_Method.h:10:3: note: previous declaration 'HTTPMethod HTTP_HEAD'
HTTP_HEAD = 0b00100000,
^
Multiple libraries were found for "WiFi.h"
Used: /Users/Sid/Library/Arduino15/packages/esp32/hardware/esp32/1.0.0/libraries/WiFi
Not used: /Applications/Arduino.app/Contents/Java/libraries/WiFi
Multiple libraries were found for "DNSServer.h"
Used: /Users/Sid/Library/Arduino15/packages/esp32/hardware/esp32/1.0.0/libraries/DNSServer
Not used: /Users/Sid/Documents/Arduino/libraries/DNSServer---esp32-master
Multiple libraries were found for "WebServer.h"
Used: /Users/Sid/Library/Arduino15/packages/esp32/hardware/esp32/1.0.0/libraries/WebServer
Not used: /Users/Sid/Documents/Arduino/libraries/WebServer-esp32-master
exit status 1
Error compiling for board Node32s.

@aphex008
Copy link

Same here on lolin d32

Compiling .pioenvs/lolin_d32/src/main.cpp.o
In file included from src/main.cpp:21:0:
lib/WIFIMANAGER-ESP32-master/WiFiManager.h:36:22: error: 'const char HTTP_HEAD []' redeclared as different kind of symbol
const char HTTP_HEAD[] PROGMEM = "<html lang="en"><meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/><title>{v}</title>";
^
In file included from /Users/darius/.platformio/packages/framework-arduinoespressif32/libraries/WebServer/src/WebServer.h:30:0,
from src/main.cpp:19:
/Users/darius/.platformio/packages/framework-arduinoespressif32/libraries/WebServer/src/HTTP_Method.h:10:3: note: previous declaration 'HTTPMethod HTTP_HEAD'
HTTP_HEAD = 0b00100000,
^
Compiling .pioenvs/lolin_d32/libba5/WebServer/detail/mimetable.cpp.o
Compiling .pioenvs/lolin_d32/lib52d/WIFIMANAGER-ESP32-master/WiFiManager.cpp.o
In file included from lib/WIFIMANAGER-ESP32-master/WiFiManager.cpp:13:0:
lib/WIFIMANAGER-ESP32-master/WiFiManager.h:36:22: error: 'const char HTTP_HEAD []' redeclared as different kind of symbol
const char HTTP_HEAD[] PROGMEM = "<html lang="en"><meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"/><title>{v}</title>";
^
In file included from /Users/darius/.platformio/packages/framework-arduinoespressif32/libraries/WebServer/src/WebServer.h:30:0,
from lib/WIFIMANAGER-ESP32-master/WiFiManager.h:21,
from lib/WIFIMANAGER-ESP32-master/WiFiManager.cpp:13:
/Users/darius/.platformio/packages/framework-arduinoespressif32/libraries/WebServer/src/HTTP_Method.h:10:3: note: previous declaration 'HTTPMethod HTTP_HEAD'
HTTP_HEAD = 0b00100000,
^

@lacneto
Copy link

lacneto commented Nov 5, 2018

I was having the same HTTP_HEAD problem and the solution was simpler than it looked. I just edited the WiFiManager.h files and WifiManager.cpp replacing (HTTP_HEAD) with (HTTP_HEADER) and there was no more compilation problem.

@shahidare
Copy link
Author

shahidare commented Nov 5, 2018 via email

@lacneto
Copy link

lacneto commented Nov 5, 2018

Do you using libraries WebServer and DNSServer the same autor?
https://github.com/zhouhan0126/WebServer-esp32
https://github.com/zhouhan0126/DNSServer---esp32
Try it use this libraries together and see if working.
For me to be working perfectly.

Regards

@shahidare
Copy link
Author

shahidare commented Nov 5, 2018 via email

@komputerboy
Copy link

@lacneto
Thanks, It solved my problem

@CraigH78
Copy link

CraigH78 commented Feb 1, 2019

@lacneto
HTTP_HEAD to HTTP_HEADER worked for me also. Thank you!

@DaveCalaway
Copy link

In the Arduino IDE i must edited the file "WiFiManager.h" as @lacneto said. But i don't understand why this appends.

In case someone uses Platform IO, you just edit the platformio.ini adding:

lib_deps =
  https://github.com/zhouhan0126/WIFIMANAGER-ESP32.git
  https://github.com/zhouhan0126/DNSServer---esp32.git
  https://github.com/zhouhan0126/WebServer-esp32.git

@sMr1dul
Copy link

sMr1dul commented Jul 22, 2020

just add __ to the HTTP_HEAD[] variable in WifiManager.h and replace HTTP_HEAD to __HTTP_HEAD in WiFiManager.cpp. in arduino WifiManager library.
1
2

@netphantm
Copy link

I was having the same HTTP_HEAD problem and the solution was simpler than it looked. I just edited the WiFiManager.h files and WifiManager.cpp replacing (HTTP_HEAD) with (HTTP_HEADER) and there was no more compilation problem.

Had to do this, also on an ESP8266, works now.

@MorhafJAela
Copy link

I was having the same HTTP_HEAD problem and the solution was simpler than it looked. I just edited the WiFiManager.h files and WifiManager.cpp replacing (HTTP_HEAD) with (HTTP_HEADER) and there was no more compilation problem.

It is very useful!
thanks

@scarrrr316
Copy link

It is very useful!

@viniandrs
Copy link

I was having the same HTTP_HEAD problem and the solution was simpler than it looked. I just edited the WiFiManager.h files and WifiManager.cpp replacing (HTTP_HEAD) with (HTTP_HEADER) and there was no more compilation problem.

After I did this it worked for me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests