Assign a static IP address to the the ethernet Port
Posted: Fri Jan 05, 2018 7:40 pm
Hello,
I am trying to assign a static IP address to the erthernet interface on my esp32. I am using the following code:
tcpip_adapter_ip_info_t ipInfo;
IP4_ADDR(&ipInfo.ip, 192,168,128,200);
IP4_ADDR(&ipInfo.gw, 192,168,128,100);
IP4_ADDR(&ipInfo.netmask, 255,255,255,0);
tcpip_adapter_set_ip_info(ESP_IF_ETH, &ipInfo);
When I run this, no IP addresses are set, and all the above parameters remain 0.0.0.0
Does anyone have any experience with this?
I am trying to assign a static IP address to the erthernet interface on my esp32. I am using the following code:
tcpip_adapter_ip_info_t ipInfo;
IP4_ADDR(&ipInfo.ip, 192,168,128,200);
IP4_ADDR(&ipInfo.gw, 192,168,128,100);
IP4_ADDR(&ipInfo.netmask, 255,255,255,0);
tcpip_adapter_set_ip_info(ESP_IF_ETH, &ipInfo);
When I run this, no IP addresses are set, and all the above parameters remain 0.0.0.0
Does anyone have any experience with this?