I'm trying to get the ip address once the esp is connect to the network.
That's my code, but I always get 255.255.255.255
void getIP() {
struct ip_info pTempIp;
int8_t len;
char ipTemp[64];
wifi_get_ip_info(0x01, &pTempIp);
pTempIp.ip.addr = ipaddr_addr(ipTemp);
ets_uart_printf("IP: %d.%d.%d.%d\r\n", IP2STR(&pTempIp.ip));
}