Skip to content

Commit 2111d45

Browse files
cpqcesantabot
authored andcommitted
Moar wifi/net docs
PUBLISHED_FROM=17f82f35cae3cc82b9ed97476619ee4a6741357e
1 parent 632c2cc commit 2111d45

File tree

1 file changed

+30
-7
lines changed

1 file changed

+30
-7
lines changed

README.md

Lines changed: 30 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,37 @@
44

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

7-
Two PHY models are currently supported: Microchip LAN87x0 ([LAN8710](http://ww1.microchip.com/downloads/en/DeviceDoc/00002164B.pdf) supports both MII and RMII; [LAN8720](http://ww1.microchip.com/downloads/en/DeviceDoc/00002165B.pdf) is RMII only) and [TI TLK110](http://www.ti.com/lit/ds/symlink/tlk110.pdf). PHY model selection is a compile-time option and is set [here](https://github.com/mongoose-os-libs/ethernet/blob/master/mos_esp32.yml#L5).
7+
Two PHY models are currently supported:
88

9-
There is a detailed article on how to connect a PHY yourself [here](https://sautter.com/blog/ethernet-on-esp32-using-lan8720/), but it is much easier to buy a dev board which already has one, for example, [Olimex ESP32-EVB](https://www.olimex.com/Products/IoT/ESP32-EVB/open-source-hardware).
9+
- Microchip LAN87x0 ([LAN8710](http://ww1.microchip.com/downloads/en/DeviceDoc/00002164B.pdf) supports both MII and RMII
10+
- [LAN8720](http://ww1.microchip.com/downloads/en/DeviceDoc/00002165B.pdf) is RMII only) and [TI TLK110](http://www.ti.com/lit/ds/symlink/tlk110.pdf). PHY model selection is a compile-time option and is set [here](https://github.com/mongoose-os-libs/ethernet/blob/master/mos_esp32.yml#L5).
1011

11-
Once wired, there are anumber of settings you will need to enable Ethernet support in mOS by setting `eth.enable=true` config option.
12+
There is a [detailed article](https://sautter.com/blog/ethernet-on-esp32-using-lan8720/)
13+
on how to connect a PHY yourself. It is much easier to buy a dev board
14+
which already has one, for example,
15+
[Olimex ESP32-EVB](https://www.olimex.com/Products/IoT/ESP32-EVB/open-source-hardware).
1216

13-
There are also a number of settings you may want to tweak:
14-
* `eth.phy_addr` - PHY has SMI address selection pins, set this accordingly. `0` is the default.
15-
* `eth.mdc_gpio` and `eth.mdio_gpio` - most of the RMII pins are fixed, but the SMI interface pins can be adjusted if necessary. These can be any bi-directional GPIO pins. The defaults, `23` and `18` respecively.
17+
Once wired, `mos config-set eth.enable=true` to enable Ethernet (see below).
1618

17-
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`.
19+
## Configuration
20+
21+
### Common settings
22+
23+
```json
24+
"eth": {
25+
"enable": true // Enable Ethernet support
26+
}
27+
```
28+
29+
### ESP32 specific
30+
31+
```json
32+
"eth": {
33+
"phy_addr": 0, // RMII PHY address
34+
"mdc_gpio": 23, // GPIO to use for RMII MDC signal
35+
"mdio_gpio": 18 // GPIO to use for RMII MDIO signal
36+
}
37+
```
38+
39+
Note: the defaults match the EVB-ESP32 board, so if you use that,
40+
you won't need to adjust anything except setting `eth.enable` to `true`.

0 commit comments

Comments
 (0)