Page 1 of 1

ESP_RTOS_SDK v3.1 => How to get IP address assigned to our ESP?

Posted: Sun Feb 17, 2019 8:41 am
by fmuller-pi
Hi,

Is there a function somewhere in the SDK (RTOS v3.1) that allow us to get the IP address assigned to our device when it is connected to the WiFi?

Thanks

Re: ESP_RTOS_SDK v3.1 => How to get IP address assigned to our ESP?

Posted: Tue Feb 26, 2019 5:20 pm
by Her Mary
https://github.com/espressif/ESP8266_RT ... ple_wifi.c

Code: Select all

    case SYSTEM_EVENT_STA_GOT_IP:
        ESP_LOGI(TAG, "got ip:%s",
                 ip4addr_ntoa(&event->event_info.got_ip.ip_info.ip));
        xEventGroupSetBits(wifi_event_group, WIFI_CONNECTED_BIT);
        break;

Re: ESP_RTOS_SDK v3.1 => How to get IP address assigned to our ESP?

Posted: Thu Feb 28, 2019 3:36 am
by fmuller-pi
Thanks for the reply! :)