Search found 1 match

by bbemister
Fri Feb 02, 2018 7:33 pm
Forum: ESP-IDF
Topic: How can I get local IP?
Replies: 1
Views: 3327

Re: How can I get local IP?

I am not certain if this is the "recommended" way, but I usually do this.

Code: Select all

tcpip_adapter_ip_info_t if_info;
tcpip_adapter_get_ip_info(TCPIP_ADAPTER_IF_STA, &if_info);
ip4addr_ntoa_r(&(if_info.ip), ipv4_str, buflen);
You will need to include
#include <tcpip_adapter.h>
.