mirror of
https://github.com/jomjol/AI-on-the-edge-device.git
synced 2025-12-09 13:06:54 +03:00
update hostname
This commit is contained in:
@@ -21,6 +21,7 @@ static const char *MAIN_TAG = "connect_wlan";
|
|||||||
|
|
||||||
std::string ssid;
|
std::string ssid;
|
||||||
std::string passphrase;
|
std::string passphrase;
|
||||||
|
std::string hostname;
|
||||||
|
|
||||||
static EventGroupHandle_t wifi_event_group;
|
static EventGroupHandle_t wifi_event_group;
|
||||||
|
|
||||||
@@ -122,7 +123,8 @@ void initialise_wifi(std::string _ssid, std::string _passphrase, std::string _ho
|
|||||||
xEventGroupWaitBits(wifi_event_group,CONNECTED_BIT,true,true,portMAX_DELAY);
|
xEventGroupWaitBits(wifi_event_group,CONNECTED_BIT,true,true,portMAX_DELAY);
|
||||||
tcpip_adapter_ip_info_t ip_info;
|
tcpip_adapter_ip_info_t ip_info;
|
||||||
ESP_ERROR_CHECK(tcpip_adapter_get_ip_info(TCPIP_ADAPTER_IF_STA, &ip_info));
|
ESP_ERROR_CHECK(tcpip_adapter_get_ip_info(TCPIP_ADAPTER_IF_STA, &ip_info));
|
||||||
printf("IP : %s\n", ip4addr_ntoa(&ip_info.ip));
|
printf("IPv4 : %s\n", ip4addr_ntoa(&ip_info.ip));
|
||||||
|
printf("HostName : %s\n", _hostname.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user