We have a custom board using an Apalis i.mx8 Quad Max running Android 10
We are trying to use both eth0 and eth1 ports on the custom boards using 2 x KSZ9131 phy's. We can bring up individual phy's OK (ping etc) but cannot bring up and use both phy's.
apalis_8qm:/ # ifconfig eth1 up
[ 281.500581] Microchip KSZ9131 Gigabit PHY 5b050000.ethernet-2:07: attached PHY driver [Microchip KSZ9131 Gigabit PHY] (mii_bus:phy_addr=5b050000.ethernet-2:07, irq=POLL)
apalis_8qm:/ # [ 284.592335] fec 5b050000.ethernet eth1: Link is Up - 100Mbps/Full - flow control rx/tx
[ 284.600353] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
apalis_8qm:/ $ ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:14:2d:67:d5:03 Driver fec
inet addr:192.168.0.92 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::c7fe:c946:c301:ef9f/64 Scope: Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:912 errors:0 dropped:0 overruns:0 frame:0
TX packets:52 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:143444 TX bytes:5459
apalis_8qm:/ # ifconfig eth1
eth1 Link encap:Ethernet HWaddr 00:14:2d:77:d5:03 Driver fec
inet6 addr: fe80::214:2dff:fe77:d503/64 Scope: Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:107 errors:0 dropped:0 overruns:0 frame:0
TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:16389 TX bytes:746
apalis_8qm:/ # ping -I eth0 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 192.168.0.92 eth0: 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=60 time=49.1 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=60 time=48.8 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=60 time=49.0 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=60 time=48.7 ms
apalis_8qm:/ # ping -I eth1 8.8.8.8
ping: Warning: source address might be selected on device other than eth1.
PING 8.8.8.8 (8.8.8.8) from 0.0.0.0 eth1: 56(84) bytes of data.
From 127.0.0.1: icmp_seq=1 Destination Host Unreachable
From 127.0.0.1: icmp_seq=2 Destination Host Unreachable
From 127.0.0.1: icmp_seq=3 Destination Host Unreachable
From 127.0.0.1: icmp_seq=4 Destination Host Unreachable
From 127.0.0.1: icmp_seq=5 Destination Host Unreachable
I am using this dhcpcd set up in init.rc -
service dhcpcd_eth0 /system/bin/dhcpcd -ABKL eth0 eth1
class main
disabled
oneshot
service iprenew_eth0 /system/bin/dhcpcd -n eth0 eth1
class main
disabled
oneshot
Has anyone used both eth0 and eth1 with i.mx8 and Android 10?
Is the second ip address the issue?
Thank you.
Solved! Go to Solution.
Hi,
I have EthernetDual but it's some missing network interfaces to work with Android 13. I cannot get it to build yet. Some interfaces from NetworkUtils error.
Can you send me EthernetDual(2).tar ?
Thanks.
Hello @Rita_Wang ,
we are working on a custom board based on IMX8MP, where in we plan to use dual Ethernet on android 11. Could you please share me - 0001-android-device-nxp-dual-ethernet.patch and EthernetDual(2).tar
Thank you in advance.
Hello @Rita_Wang , @SoftMicro
I'm using imx8qm on custom board with Android 12 and I'm having the same issue where the host is unreachable when pinging from eth0 and eth1.
I could find the 0001-android-device-nxp-dual-ethernet.patch but I can't get the EthernetDual(2).tar
Could you please share this tarball?
Thank you!
I share you by the email, please have a check.
Thanks for sharing.
I just tried it but there are some missing network interfaces to work with Android 12. I cannot get it to build yet. Some interfaces from NetworkUtils are now deprecated for Android 12 and I'm now looking at the NetworkScore instead which seems to be the one to use.
I don't really do app like that so I'm a bit lost with the java files. Could you please explain what I should change to make EthernetDual package compatible with Android 12?
Thank you
I email to you, please have a check.
Have you got the 0001-android-device-nxp-dual-ethernet(4) and EthernetDual(2).tar I share to you?
Hi @Rita_Wang ,
Could you share these 2 packages with me?
Now I am also tring to use 2 ethernets on Imx8mm with android 9. And I am searching any useful information.
Thanks
Chad
Dear @vedantteksun ,
I email to you, please have a check. These patches are for the i.MX8MP, the method is the same, you can refer to.
Wish you have a nice day
Best Regards
Rita
@SoftMicro This patch is for the i.MX8MP, for the i.MX8QM you can refer to