zhouhan0126 / WIFIMANAGER-ESP32

wifimanager-esp32
MIT License
411 stars 136 forks source link

WIfiManager on ESP32 is not working #22

Open shahidare opened 6 years ago

shahidare commented 6 years ago

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 = "{v}"; ^ 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 commented 6 years ago

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 = "<!DOCTYPE html><html lang=\"en\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1, user-scalable=no\"/>{v}"; ^ 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 = "<!DOCTYPE html><html lang=\"en\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1, user-scalable=no\"/>{v}"; ^ 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 commented 6 years ago

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 commented 6 years ago

I did that but then wifi manager was not functioning for me.

On Mon, 5 Nov 2018 at 2:51 PM, lacneto notifications@github.com wrote:

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.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/zhouhan0126/WIFIMANAGER-ESP32/issues/22#issuecomment-435806609, or mute the thread https://github.com/notifications/unsubscribe-auth/AH98xaCtg1_OZk-YCu0JG87BNGisT1FRks5usAMOgaJpZM4X5ehr .

lacneto commented 6 years ago

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 commented 6 years ago

For now I am using asyc version and it is working. ( other than wifi reset )

I did tired the usual hacks but it doesn’t seem to be working. I am using Mac for the arduino. I believe I have to try it with other machines as I can see it has worked for many people.

Thank you for the help.

On Mon, 5 Nov 2018 at 4:25 PM, lacneto notifications@github.com wrote:

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

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/zhouhan0126/WIFIMANAGER-ESP32/issues/22#issuecomment-435833945, or mute the thread https://github.com/notifications/unsubscribe-auth/AH98xQcUvLsdVze2c5KfaM4EqZz2Vzreks5usBkGgaJpZM4X5ehr .

komputerboy commented 5 years ago

@lacneto Thanks, It solved my problem

CraigH78 commented 5 years ago

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

DaveCalaway commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 3 years ago

It is very useful!

viniandrs commented 3 years ago

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 :)