I have a captive portal where IPAddress is typed in. The result is stored in a variable as:
Code: Select all
strcpy(server, custom_server.getValue());
IPAddress _ip;
_ip.fromString(server);
Now, how do I save this value (not sure if its a string as its stored in IPAddress format) in preferences memory of ESP32 and also how do I retrieve it in IPAddress format so that I can assign the IP on next reboot?
Kindly suggest. Thanks in advance