RJ45 Ethernet not working

Hi everyone,

my first post here.

I’m trying to add ethernet to my Duo, I have connected a Hanrun HR911105A Ethernet MagJack, connnected TX+/TX/GND/RX+/RX- and even connected the LEDs T to GP6 and GP7 (including switching the GPIOs to ETH function).

ifconfig after boot shows this:

eth0 Link encap:Ethernet HWaddr 8A:9F:5D:B5:10:31
inet6 addr: fe80::6421:79e2:8bc2:99df/64 Scope:Link
UP BROADCAST RUNNING 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)
Interrupt:22

what else do I need to do to enable Ethernet via RJ45 connector?

DHCP seems to be enabled:

Starting network: OK
Starting dhcpcd…
dhcpcd-9.4.0 starting
[ 1.639070] random: dhcpcd: uninitialized urandom read (112 bytes read)
DUID 00:01:00:01:c7:92:bc:81:d6:56:af:c6:c6:29
dhcp_vendor: Invalid argument
forked to background, child pid 130
Bad system call
[ 1.730649] bm-dwmac 4070000.ethernet eth0: PHY [stmmac-0:00] driver [Generic PHY] (irq=POLL)
Starting ntpd: [ 1.752476] dwmac1000: Master AXI performs any burst length
[ 1.758532] bm-dwmac 4070000.ethernet eth0: No Safety Features support found
[ 1.767440] bm-dwmac 4070000.ethernet eth0: IEEE 1588-2002 Timestamp supported
[ 1.776985] bm-dwmac 4070000.ethernet eth0: configuring for phy/rmii link mode
OK
Starting dropbear sshd: OK

dmesg shows this:

412.405650] bm-dwmac 4070000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[ 413.428629] bm-dwmac 4070000.ethernet eth0: Link is Down
[ 414.453641] bm-dwmac 4070000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[ 415.476629] bm-dwmac 4070000.ethernet eth0: Link is Down
[ 417.525619] bm-dwmac 4070000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[ 418.548628] bm-dwmac 4070000.ethernet eth0: Link is Down
[ 419.573638] bm-dwmac 4070000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[ 420.597163] bm-dwmac 4070000.ethernet eth0: Link is Down

The switch doesn’t see the MilkV Duo board (no LEDs blinking at all), on the HanRun MagJack, the LEDs blink slowly in sync and the green led flickers sometimes faster (while the yellow led is off).

Package TX increases and RX stays at zero:

[root@milkv-duo]~# ifconfig
eth0 Link encap:Ethernet HWaddr 8A:9F:5D:B5:10:31
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:656 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:81720 (79.8 KiB)
Interrupt:22

Any ideas?

Thanks

Uli

1 Like

Ok, I will answer myself, it was a problem in the hardware, usually the midpoints on the TX and RX transformers (pin 4 and 5 on the HR911105A) are connected to GND via a 100nF ceramic cap. But with the MilkV Duo board that seems to be wrong, only the TX transformer needs to be connected via 100nF to GND, not the RX transformer, it instantly worked after removing that 100nF to GND.

I found out by looking at the schematic of the Duo USB&Ethernet IO Board.

This is weird, I have seen and used this HanRun HR911105A in other projects (NanoPi Duo, W5500) and there are always both transoformer midpoints connected to GND via a 100nF capacitor.

Anyway it works now, and this little board is fantastic! I already ordered the new Duo board with 256MB RAM and looking forward playing with it - Great stuff!

2 Likes

Thank you for pointing out this, i received the other 256 variant LicheeRV Nano which even includes mic and audio output, the Milk-V 256 versions are still on the way

1 Like