Regarding ESP32 web server.
I’m using the scheme from the WiFi Manager section of the book. Is there a way to omit the Gateway and Subnet Mask?
I use the 192.168.1.x at home, but a friend uses 10.10.10.x
This requires me to make a separate build for him. I’d like to just omit the Gateway and Mask, assuming the router already has that info.
Code Snippet
if (!WiFi.config(localIP, gateway, subnet)){
Serial.println(“STA Failed to configure”);
return false;
}
I think this is really checking to see if the ESP32 received a Gateway from the router, rather than setting the parameters. Is this the case?
I could make another field for wifi config and have the user enter the Gateway, but I’d rather not. Also could look at the users IP address and make the Gateway x.x.x.1 <– type conversion problem as Gateway is of type IPaddress .
Not sure if that will always work though.
Thanks
Barry
Hi Barry.
I need to update the code to fix that issue. But, I still don’t know when I’ll have the time to do that.
One of our readers solved that issue and published his project. Read the comments section of this post: https://randomnerdtutorials.com/esp32-wi-fi-manager-asyncwebserver/
https://github.com/ldijkman/randomnerd_esp32_wifi_manager
Regards,
Sara