Fork me on GitHub

Ethernet support


ESP32 includes an Ethernet MAC and requires an external PHY, connected over RMII interface.

Two PHY models are currently supported:

  • Microchip LAN87x0 (LAN8710 supports both MII and RMII
  • LAN8720 is RMII only) and TI TLK110. PHY model selection is a compile-time option and is set here.

There is a detailed article on how to connect a PHY yourself. It is much easier to buy a dev board which already has one, for example, Olimex ESP32-EVB.

Once wired, mos config-set eth.enable=true to enable Ethernet (see below).


Common settings

"eth": {
  "enable": true       // Enable Ethernet support

ESP32 specific

"eth": {
  "phy_addr": 0,       // RMII PHY address
  "mdc_gpio": 23,      // GPIO to use for RMII MDC signal
  "mdio_gpio": 18      // GPIO to use for RMII MDIO signal

Note: the defaults match the EVB-ESP32 board, so if you use that, you won't need to adjust anything except setting eth.enable to true.