🛠 Câbler l'Ethernet 10/100 EMAC avec le carrier Zero-EPHY
Objectives
The BPI-M2 Zero has no Ethernet port — but the Allwinner H2+/H3 integrates a 10/100 EMAC controller that can be routed to connector pins. Banana Pi has published the open design "Zero-EPHY" (schematic + PCB on the wiki, section "how to use zero 10/100 Ethernet"): an external PHY with an RJ45 magnetic jack connected to the RMII bus. You will build or order the carrier board, enable the EMAC overlay, and get a wired eth0 interface — invaluable when antenna-less Wi-Fi performs poorly.
Hardware
- BPI-M2 Zero (H2+ or H3)
- Zero-EPHY carrier board (the wiki publishes the schematic and PCB: online fabrication is possible) with a 10/100 Ethernet PHY and a magnetic jack
- RJ45 cable, 5 V / 2 A power supply
- Soldering iron or assembly service if you order the kit
Complete code
# 1) Contrôler le device tree : le nœud emac et son PHY
ls /proc/device-tree/ | grep -i -e ethernet -e emac
cat /proc/device-tree/.../status 2>/dev/null
# 2) Activer l'overlay EMAC (nom exact à vérifier dans /boot/dtb-*/overlay-dir/)
grep overlays /boot/armbianEnv.txt
sudo sed -i 's/^overlays=.*/& emac/' /boot/armbianEnv.txt
sudo reboot
# 3) Le contrôleur et le PHY apparaissent-ils ?
dmesg | grep -i -e emac -e stmmac -e eth
dmesg | grep -i 'PHY' # adresse du PHY détectée
ip -br link show eth0
# 4) Apporter l'interface et mesurer
sudo ip link set eth0 up
sudo dhclient eth0
sudo apt install -y ethtool iperf3
sudo ethtool eth0 | grep -i speed # attendu : 100baseT/Full
iperf3 -c mon_serveur_lan
Expected verification
After enabling the overlay, dmesg reports the EMAC controller and PHY detection at its RMII address; eth0 comes up at 100M full-duplex; iperf3 approaches 90 Mbit/s in a direct connection with a switch. The interface remains stable while wlan0 can be disabled (thereby freeing up the only antenna for other uses).
Common errors
- Buying a GMIC PHY in RGMII mode: the H2+/H3 EMAC speaks RMII 10/100, not gigabit.
- Using the wrong PHY address (strap AD0/AD1): the driver searches, finds nothing, and eth0 stays DOWN — check the address in dmesg and the strap pins in the Zero-EPHY schematic.
- Confusing it with the BPI-P2 Zero, which has an onboard 100M port (and 8 GB of eMMC): the M2 Zero has nothing on the board.
- Feeding the schematic with a "straight" RJ45 cable without a magnetic transformer integrated into the jack: PHYs require the magnetic jack.
- Expecting gigabit performance: the physical limit is 100 Mbit/s, and the memory bus won't help more.
Other tutorials for this board
- Flasher Armbian et premier boot du BPI-M2 Zero
- LED et bouton avec libgpiod sur le port 40 broches
- Wi-Fi AP6212 : le piège de l'antenne U.FL non fournie
- Console série sur USB-OTG : dépanner sans réseau ni câble UART
- Activer le bus SPI0 et piloter un petit écran TFT
- Survivre avec 512 Mo : zram, swap compressé et services légers
Code examples for this board
clignotante.pyPythonbouton-gpio.pyPythoncapteur-i2c.shBashsurveillance-temperature.shBashcapteur-dht11.pyPythonservo-pwm-sysfs.shBash