Chapter 4. Software framework
{
...
esp_netif_config_t cfg
esp_netif_t *eth_netif
// Set default handlers to process TCP/IP stuffs
ESP_ERROR_CHECK(esp_eth_set_default_handlers(eth_netif));
...
char* ip=
"192.168.5.241";
char*
gateway
char*
netmask
esp_netif_ip_info_t info_t;
memset(&info_t, 0, sizeof(esp_netif_ip_info_t));
if
(eth_netif)
{
ESP_ERROR_CHECK(esp_netif_dhcpc_stop(eth_netif));
info_t.ip.addr
info_t.netmask.addr
info_t.gw.addr
esp_netif_set_ip_info(eth_netif, &info_t);
}
...
}
4.2.5 Is there any impact on Ethernet functionality if replacing the module of ESP32-
Ethernet-Kit with ESP32-WROOM-32D?
• The ESP32-WROVER-B of ESP32-Ethernet-Kit can be replaced with ESP32-WROOM-32D, and its Ether-
net functionality will not be affected.
• The main difference between ESP32-WROOM and ESP32-WROVER module series: ESP32-WROVER
modules have a 4 MB PSRAM while ESP32-WROOM modules do not have any PSRAM by default. Please
refer to:
–
ESP32-WROOM-32D Datasheet
–
ESP32-WROVER-B Datasheet
• The ESP32-WROOM and ESP32-WROVER modules all use the ESP32 chip as their core, which supports
Ethernet. For more information, please refer to
• Related document:
ESP32-Ethernet-Kit Getting Started
4.2.6 When using ESP32 to design a self-developed Ethernet board, after downloaded
the official esp-idf/examples/ethernet example, errors are reported as follows, what
is the reason?
E (5556) emac: Timed out waiting for PHY rdgister 0x2 to have
0x0022 (mask 0xffff). Current value 0xffff
→
E (6556) emac: Timed out waiting for PHY register 0x3 to have
0x1430 (mask 0xfff0). Current value 0xffff
→
• This error indicates something is wrong with your hardware circuit. The RMII clock is not working
normally with the PHY, causing the PHY failed to read registers. For the more information about
RMII clock, please refer to Instructions.
Espressif Systems
=
ESP_NETIF_DEFAULT_ETH();
=
esp_netif_new(&cfg);
=
"192.168.5.1";
=
"255.255.255.0";
=
esp_ip4addr_aton((const
=
esp_ip4addr_aton((const
=
esp_ip4addr_aton((const
ESP32
59
Submit Document Feedback
char
*)ip);
char
*)netmask);
char
*)gateway);
Datasheet.
Guide.
value␣
value␣
Release master
Need help?
Do you have a question about the ESP and is the answer not in the manual?