Hi folks,
My project is pretty typical: have a phone App to control a LED by an ESP via home/office WiFi network.
What have been done:
- For 1st use, ESP is set in AP mode. It creates a WiFi network named P4T, and create a server at 192.168.10.10
- User connects the phone to P4T network manually
- App allows user to pass ID/PW of Home WiFi to ESP via that IP 192.168.10.10
- ESP tries to connect to Home WiFi. Once succeeded, it passes its local_IP to APP, and also stores ID/PW to EEPROM.
- From next use, ESP is set in STA mode. ESP will connect to Home WiFi with stored ID/PW. APP will connect to ESP via that local_IP.
But, the tricky question comes when I need to install the App into a new phone to control that ESP. Currently my App requires user to enter manually the ESP's local_IP to control that ESP.
QUESTION:
How can App in new phone search and connect to that ESP via name, not IP?
As far as I understand, the home WiFi router should have some sort of DNS server, right?
But even if it is available, it is not ideal for user to access home WiFi router setting before using the App.