Does not come up as DHCP client on Ethernet on Orange Pi Zero (H2+)
probonopd opened this issue · comments
Currently it seems like one needs a serial adapter to get this to work, because the device does not come up as a DHCP client on Ethernet automatically.
Installed miZy according to https://github.com/hyphop/miZy/wiki/miZy-download-install-overlay-usage:
- With Etcher, burned
orange-pi-h2-miZy-musicbox-mpd.MMC.hybrid.8M.8192.bin
to SD card - Booted Orange Pi Zero from SD
- Attached serial adapter as shown here
sudo screen /dev/ttyUSB0 115200
Comes up with
root@miZy:/# ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:104 errors:0 dropped:0 overruns:0 frame:0
TX packets:104 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:8128 (7.9 KiB) TX bytes:8128 (7.9 KiB)
usb0 Link encap:Ethernet HWaddr 62:EF:11:xx:xx:xx
inet addr:10.1.1.1 Bcast:10.1.1.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wlan0 Link encap:Ethernet HWaddr DC:D7:DD:xx:xx:xx
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wlan0:1 Link encap:Ethernet HWaddr DC:D7:DD:xx:xx:xx
inet addr:10.20.20.1 Bcast:10.20.20.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
root@miZy:/# cat /etc/config/network
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
option dns '8.8.8.8'
config globals 'globals'
option ula_prefix 'fdae:4841:c683::/48'
config interface 'lan'
option ifname 'eth0'
option force_link '1'
option proto 'dhcp'
option dns '8.8.8.8'
Would be much better if it would come up as a DHCP client automatically. Then one would not need a serial adapter.
Note to self, for comparison under Armbian I see in dmesg
:
root@orangepizero:~# dmesg | grep eth
[ 0.000000] psci: probing for conduit method from DT.
[ 4.239458] sun8i-emac 1c30000.ethernet: PHY regulator found
[ 4.241382] usbcore: registered new interface driver kaweth
[ 4.241947] usbcore: registered new interface driver cdc_ether
[ 4.242912] usbcore: registered new interface driver MOSCHIP usb-ethernet driver
[ 14.777631] libphy: 1c30000.ethernet: probed
[ 14.786966] Generic PHY 1c30000.ethernet-0:01: attached PHY driver [Generic PHY] (mii_bus:phy_addr=1c30000.ethernet-0:01, irq=-1)
[ 14.786989] sun8i-emac 1c30000.ethernet: device MAC address slot 0 02:42:f6:xx:xx:xx
[ 14.788069] sun8i-emac 1c30000.ethernet: device MAC address slot 1 33:33:00:00:00:01
[ 14.788211] sun8i-emac 1c30000.ethernet: device MAC address slot 1 33:33:00:00:00:01
[ 14.788218] sun8i-emac 1c30000.ethernet: device MAC address slot 2 01:00:5e:00:00:01
[ 14.788239] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 16.015257] sun8i-emac 1c30000.ethernet: device MAC address slot 1 01:00:5e:00:00:01
[ 16.015330] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[ 16.015517] sun8i-emac 1c30000.ethernet: device MAC address slot 1 01:00:5e:00:00:01
[ 18.969300] sun8i-emac 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[ 18.969371] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
check /etc/rc.local
/opt/eth.disable - by default eth interface is disabled ( for some
powersave) - comment this line
In orange_pi_zero_miZy-mini-turbo.MMC.hybrid.8M.8192.bin.gz
it is already commented by default (I did not touch this file):
#/opt/eth.disable
## disable ipv6
#net.ipv6.disable
But when I run /opt/eth.on
then Ethernet becomes active (works). Thanks for the hint!
To make the change permanent, I added /opt/eth.on
in /etc/rc.local
and ran overlay save -f
. Now the Ethernet is available after a reboot (works).
In orange-pi-h2-miZy-musicbox-mpd.MMC.hybrid.8M.8192.bin.gz
/opt/eth.disable
is not commented out by default. I did so.
By the way, this is my /etc/config/network
:
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
option dns '8.8.8.8'
config interface 'lan'
option proto 'dhcp'
option ifname 'eth0'
ok sure
/opt/eth.on - load sunxi_gmac & enable eth0
/opt/eth.off - unload sunxi_gmac & disable eth0
Thanks. This works for me now.