Code: Select all
esp_err_t dnet_set_addr(char *str) {
esp_netif_ip_info_t eth_info = {0};
if (dnet_str2ip4(ð_info.ip, str)) {
return esp_netif_set_ip_info(eth_get_netif(), ð_info);
} else {
return -1;
};
}
says "If the interface is up, the new IP information is set directly in the TCP/IP stack." and "Calling this interface for may generate a SYSTEM_EVENT_STA_GOT_IP or SYSTEM_EVENT_ETH_GOT_IP event."
But the IP address is not changed (the IP address remains the same), and there is no EVENT (even after I search for SYSTEM_EVENT_ETH_GOT_IP documentation and realize that the name changed several versions ago), and there is no error (esp_netif_set_ip_info returns ESP_OK)
What am I doing wrong?