I'm trying to make a project about a water treatment for a swimming pool. The idea is to have a simple app made on Kodular that connects to an ESP32 working as a server. The problem is that I can configure a static IP address but sometimes it won't connect to the router with that address. I tried making a simple sweep on Kodular but it's way too slow and when it finds it, the timeout triggers and it begins searching again. Do you have any solution to the problem?
Did you reserve the address in the router?
No, I didn't, but the ESP32 assign an IP address before connecting to the router. I'll check how to do it anyway and see if it works
I haven't done it in a while, but each router should have a way. I think it's done with the MAC address and then you assign an IP for that MAC. Now it is permanent.
Another way is to use the HOSTNAME rather than IP if that is possible, and let the routers' built-in DNS handle it.
A far better solution is to assign the ESP32 a static IP address in the router based on its MAC address. Then, just let the ESP32 use DHCP and the router will always give it the assigned address.
I'll try that tomorrow and if it works, I'll close the thread. Thanks!