tonyp7 / esp32-wifi-manager

Captive Portal for ESP32 that can connect to a saved wireless network or start an access point where you can connect to existing wifis.
MIT License
664 stars 217 forks source link

STA Mode server does not host my webpage #48

Closed AdityaGawali closed 5 years ago

AdityaGawali commented 5 years ago

I have included the wifi manager in my code and what my code does is it hosts a webpage but when I try to open the webpage in my browser it shows your webpage instead of mine even though I am on a home network where esp should be connected as station hosting the webpage.

Also, how can I retrieve the ssid and password from your code so I can manually start my station code thus solving the above-mentioned problem

tonyp7 commented 5 years ago

You cannot run two different web servers on the same port. You have two choices here:

AdityaGawali commented 5 years ago

I change my port to 81 and it works also before closing the issue can you tell where exactly in code are you assigning a static IP? I changed the bool value to 1 but can't find which and where the IP is. Also a huge Thankyou your project helped me a lot

tonyp7 commented 5 years ago

IP of the server is set in wifi_manager.h by:

`/* @brief Defines the access point's default IP address. Default: "10.10.0.1 /

define DEFAULT_AP_IP CONFIG_DEFAULT_AP_IP`

You can run make menuconfig to change it or hardcode a value

AdityaGawali commented 5 years ago

Isn't that the IP of ESP32 as access point, I want to static the IP when it connects to my home router.

tonyp7 commented 5 years ago

This is not possible today, simply because I had no use for it and I was a bit lazy to code the UI for static ip... That being said, you can assign a static IP to the esp32 on your router level through the mac address.

AdityaGawali commented 5 years ago

No worries Sir, I have made changes to the code for assigning static IP to my home router.