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

fmuller-pi
Posts: 20
Joined: Wed Jan 23, 2019 8:41 am

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

Postby fmuller-pi » Sun Feb 17, 2019 8:41 am

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

Her Mary
Posts: 384
Joined: Mon Oct 27, 2014 11:09 am

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

Postby Her Mary » Tue Feb 26, 2019 5:20 pm

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;

fmuller-pi
Posts: 20
Joined: Wed Jan 23, 2019 8:41 am

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

Postby fmuller-pi » Thu Feb 28, 2019 3:36 am

Thanks for the reply! :)

Who is online

Users browsing this forum: Baidu [Spider] and 9 guests