BPI-M2 Zero Packet loss

Hi everyone,

currently I have Ubuntu Server installed to use my BPI with Pi-Hole. Sometimes DNS queries are not answered until I refresh the website (for several times). I connected to the BPI via SSH, did a some ping-tests and the result was a huge packet loss (sometimes as high as 50%) - screenshot attached.

How I set everything up: The BPI is powered up with a 2.5A/5V power supply connected to the 5V/GND GPIO-pins. As I read in the wiki, Ethernet connection can be realized trough the 4 pins between the 2 micro-USB sockets. So I soldered pins on it and crimped an ethernet-cable with 4 plugs to not have to solder the ethernet-cable directly to the board. I’ve put a small heatsink on the CPU because temperatures without were too high (and I wanted to install it in a box without extra ventilation).

During the setup of Pi-hole I decided to completely reinstall everything (I had strange IP-issues) and it seems to me that it startet loosing packets since then (but I’m not 100% sure). Ping was loosing packets with the ISO’s Version of Ubuntu Server’s packets and the latest Version available.

I already tried to renew the connectors on the ethernet-cable, also checked the soldering, resistance through the cable and the temperature - everything seems to be ok.

Hopefully someone has an idea.

cheers

Does no one have any Idea?

I also tried to ping some internal IPs from the BPI and vice versa, this generated about 17% packet loss in both directions.

Compared to what?

For someone to try to help you you need to:

  • Provide dmesg output during boot and after you start having lost packages,
  • Provide Temperature values you have measured,
  • Router info, network info.
  • Cpu Load info, etc, etc…

Without information, it is just a guess, and my guess is you have issues with Temperature. Running higher than 75C will possibly affect other components.

And please, don’t put screenshots, attach the output files.

1 Like

I have exactly the same problem!! Did anyone manage to find a solution? Huge packet loss over ethernet… And no, it’s not the temperature, I have a huge heatsink on mine and still the same issue…

Looks like the interface is flapping for some reason:

[  146.487560] dwmac-sun8i 1c30000.ethernet eth0: Link is Down
[  148.535822] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[  149.559580] dwmac-sun8i 1c30000.ethernet eth0: Link is Down
[  152.631833] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[  155.703586] dwmac-sun8i 1c30000.ethernet eth0: Link is Down
[  159.803816] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[  192.567669] dwmac-sun8i 1c30000.ethernet eth0: Link is Down
[  194.615950] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[  200.759614] dwmac-sun8i 1c30000.ethernet eth0: Link is Down
[  202.807969] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[  203.831729] dwmac-sun8i 1c30000.ethernet eth0: Link is Down
[  205.879977] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[  207.927722] dwmac-sun8i 1c30000.ethernet eth0: Link is Down
[  212.023992] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[  213.047755] dwmac-sun8i 1c30000.ethernet eth0: Link is Down
[  215.095994] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[  216.119749] dwmac-sun8i 1c30000.ethernet eth0: Link is Down
[  218.167991] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[  242.748814] brcmfmac: brcmf_sdio_kso_control: max tries: rd_val=0x0 err=0
[  242.748920] sunxi-mmc 1c10000.mmc: data error, sending stop command
[  242.748951] brcmfmac: brcmf_sdio_txfail: sdio error, abort command and terminate frame
[  242.749045] sunxi-mmc 1c10000.mmc: data error, sending stop command
[  242.749068] brcmfmac: brcmf_sdio_txfail: sdio error, abort command and terminate frame
[  242.749154] sunxi-mmc 1c10000.mmc: data error, sending stop command
[  242.749177] brcmfmac: brcmf_sdio_txfail: sdio error, abort command and terminate frame
[  242.749235] brcmfmac: brcmf_sdio_dpc: sdio ctrlframe tx failed err=-110
[  242.749257] brcmfmac: brcmf_sdio_dpc: failed backplane access over SDIO, halting operation
[  242.749280] ieee80211 phy0: brcmf_run_escan: error (-110)
[  242.749299] ieee80211 phy0: brcmf_cfg80211_scan: scan error (-110)
[  310.327956] dwmac-sun8i 1c30000.ethernet eth0: Link is Down
[  312.376254] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[  387.134571] dwmac-sun8i 1c30000.ethernet eth0: Link is Down
[  389.182830] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[  390.206579] dwmac-sun8i 1c30000.ethernet eth0: Link is Down
[  392.254851] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[  407.614602] dwmac-sun8i 1c30000.ethernet eth0: Link is Down
[  411.710913] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[  412.734632] dwmac-sun8i 1c30000.ethernet eth0: Link is Down
[  414.782896] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control off
[  415.806641] dwmac-sun8i 1c30000.ethernet eth0: Link is Down

I have exactly the same dmesg output. @toto99303 Did you fix this problem ? I don´t know what else I can try. (replaced cable, checked connector and soldering …)

For contxt I am using Armbian 23.11.1 Jammy

I’m using the Ethernet on my M2 Zero under Armbian 24.2.1 Jammy - no problems.

I did however not just solder the Ethernet cable directly to the board!

I’ve implemented something called “Transformerless Ethernet”, see also the Texas Instruments paper below. Usually, Ethernet requires transformers, sometimes called magnetics. On short runs, you can get away with using capacitors instead.

TL:DR put 33nF ceramic capacitors inline with each of the 4 conductors!

This seems to run just fine, even over a 2.5m long cable - runs iperf3 like a champ without dropping packets.

my stats before testing

user@banana:~$ netstat -i
Kernel Interface table
Iface      MTU    RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0      1500   481612      0    831 0        591000      0      0      0 BMRU
lo       65536    21509      0      0 0         21509      0      0      0 LRU
wlan0     1500        0      0      0 0             0      0      0      0 BMU

generating plenty of traffic with iperf3, via an old Netgear Gigabit switch, connecting to my PC

user@banana:~$ iperf3 -c 10.0.0.20
Connecting to host 10.0.0.20, port 5201
[  5] local 10.0.0.3 port 47968 connected to 10.0.0.20 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec  11.8 MBytes  99.0 Mbits/sec   45    189 KBytes       
[  5]   1.00-2.00   sec  11.2 MBytes  93.8 Mbits/sec    0    228 KBytes       
[  5]   2.00-3.00   sec  11.2 MBytes  94.3 Mbits/sec   45    199 KBytes       
[  5]   3.00-4.00   sec  11.2 MBytes  93.8 Mbits/sec   45    170 KBytes       
[  5]   4.00-5.00   sec  11.5 MBytes  96.4 Mbits/sec    0    212 KBytes       
[  5]   5.00-6.00   sec  11.2 MBytes  93.9 Mbits/sec   45    187 KBytes       
[  5]   6.00-7.00   sec  11.2 MBytes  93.8 Mbits/sec    0    223 KBytes       
[  5]   7.00-8.00   sec  11.2 MBytes  93.8 Mbits/sec   45    199 KBytes       
[  5]   8.00-9.00   sec  11.2 MBytes  93.8 Mbits/sec   45    173 KBytes       
[  5]   9.00-10.00  sec  11.2 MBytes  93.8 Mbits/sec    0    212 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-10.00  sec   113 MBytes  94.7 Mbits/sec  270             sender
[  5]   0.00-10.01  sec   112 MBytes  94.2 Mbits/sec                  receiver
iperf Done.

my stats after testing - “it works on my box” :sweat_smile:

user@banana:~$ netstat -i
Kernel Interface table
Iface      MTU    RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0      1500   523841      0    831 0        672527      0      0      0 BMRU
lo       65536    21509      0      0 0         21509      0      0      0 LRU
wlan0     1500        0      0      0 0             0      0      0      0 BMU

the TI paper

EDIT: please post your results - i’m curious whether you’ve been describing symptoms of improper isolation (i don’t have a spare M2 Zero to test it myself)

EDIT2: um actually, there seems to exist some packet loss - i didn’t look at the iperf3 stats in detail before - the Retr column lists the TCP packet retransmission count. So, there must be some packet loss, indeed. However, these seem to be recoverable TCP retransmits - no actual data loss in the TCP scheme of things (UDP, however, does not implement retransmission - lack of receive ACK). Also, the Retr value increases drastically when i increase the number of parallel streams; iperf3 -c <server IP> -P5. However, the direction seems to matter - iperf3 -c <server IP> -R does not produce any TCP retransmissions. The 33nF capacitor solution should take care of most of the physical layer issues, though. And TCP is kinda robust, with its retransmissions, and all. I’d crack a UDP joke, but i’m worried you wouldn’t get it. :nerd_face: :sweat_smile:

EDIT3: my BPi-M2Z works just fine as THE single DHCP server, in my home LAN, btw.

1 Like