Discussion Forums

Wifi performance very bad, regular disconnects

#1

Hi

Pi Zero 1.2

I am getting regular disconnects and very slow throughput on the pHat on two Pi Zero 1.2 models I have.
I also have >2 pHats so I think there is an issue on the Pi Zero 1.2

for example: fetching a 100mb file with wget - never completes
attempting apt-get update && install - fails

Performance on a Pi model B is fine.

#2

Hi - is my experience typical?

#3

Here’s an excerpt from syslog from when I was trying to download a 100mb file using a web browser (Jessie full version).

Aug 12 21:45:22 raspberrypi kernel: [ 283.329042] net_ratelimit: 48 callbacks suppressed
Aug 12 21:45:22 raspberrypi kernel: [ 283.329073] brcmfmac: brcmf_sdio_readframes: read 1532 bytes from channel 2 failed: -84
Aug 12 21:45:22 raspberrypi kernel: [ 283.329093] brcmfmac: brcmf_sdio_rxfail: abort command, terminate frame
Aug 12 21:45:22 raspberrypi dhcpcd[376]: wlan0: fe80::1 router available
Aug 12 21:45:23 raspberrypi kernel: [ 283.775372] brcmfmac: brcmf_sdio_readframes: read 1544 bytes from channel 2 failed: -110
Aug 12 21:45:23 raspberrypi kernel: [ 283.775406] brcmfmac: brcmf_sdio_rxfail: abort command, terminate frame
Aug 12 21:45:23 raspberrypi kernel: [ 283.799334] brcmfmac: brcmf_sdio_readframes: read 1532 bytes from channel 2 failed: -84
Aug 12 21:45:23 raspberrypi kernel: [ 283.799369] brcmfmac: brcmf_sdio_rxfail: abort command, terminate frame
Aug 12 21:45:23 raspberrypi kernel: [ 284.004835] brcmfmac: brcmf_sdio_txfail: sdio error, abort command and terminate frame
Aug 12 21:45:23 raspberrypi kernel: [ 284.251161] brcmfmac: brcmf_sdio_readframes: read 1532 bytes from channel 2 failed: -110
Aug 12 21:45:23 raspberrypi kernel: [ 284.251202] brcmfmac: brcmf_sdio_rxfail: abort command, terminate frame
Aug 12 21:45:23 raspberrypi kernel: [ 284.286152] brcmfmac: brcmf_sdio_readframes: read 1532 bytes from channel 2 failed: -84
Aug 12 21:45:25 raspberrypi dhcpcd[376]: wlan0: fe80::1 router available
Aug 12 21:45:29 raspberrypi kernel: [ 290.436816] net_ratelimit: 37 callbacks suppressed
Aug 12 21:45:29 raspberrypi kernel: [ 290.436844] brcmfmac: brcmf_sdio_readframes: RXHEADER FAILED: -110
Aug 12 21:45:29 raspberrypi kernel: [ 290.436858] brcmfmac: brcmf_sdio_rxfail: abort command, terminate frame, send NAK
Aug 12 21:45:29 raspberrypi kernel: [ 290.459316] brcmfmac: brcmf_sdiod_sglist_rw: CMD53 sg block read failed -84
Aug 12 21:45:29 raspberrypi kernel: [ 290.459353] brcmfmac: brcmf_sdio_rxglom: glom read of 3584 bytes failed: -5
Aug 12 21:45:29 raspberrypi kernel: [ 290.459370] brcmfmac: brcmf_sdio_rxfail: abort command, terminate frame, send NAK

#4

Hi,

Please provide some instructions for us to repeat your case. Did you also get these error messages for the Pi Model B?

#5

Hi,

I’m seeing similar issues with a PiZero v1.3 board.

WiFi connects and works for sshing into the PiZero and running simple commands, but as soon as there is high traffic then errors start to occur and the WiFi connection eventually stops responding. I’ve tested using the latest Rasbian release and can reproduce the issue using ‘wget’ (e.g. wget https://downloads.raspberrypi.org/raspbian_latest).

Disconnection can happen quickly or take a while. Last time I managed to download 62MB before the connection dropped.

Using the IoT pHAT and the same SD Card on a Raspberry Pi B+ and it all works fine, so it may be something specific to the PiZero.

I’ve uploaded the ‘dmesg’ output to http://mybigideas.co.uk/temp/dmesg.zip which contains various lines such as

[ 79.345954] brcmfmac: brcmf_sdio_readframes: RXHEADER FAILED: -110
[ 79.345984] brcmfmac: brcmf_sdio_rxfail: abort command, terminate frame, send NAK
[ 80.185033] brcmfmac: brcmf_sdiod_sglist_rw: CMD53 sg block write failed -84
[ 80.185065] brcmfmac: brcmf_sdio_txfail: sdio error, abort command and terminate frame
[ 80.187634] brcmfmac: brcmf_sdiod_sglist_rw: CMD53 sg block write failed -84
[ 80.187662] brcmfmac: brcmf_sdio_txfail: sdio error, abort command and terminate frame
[ 80.188898] brcmfmac: brcmf_sdio_txfail: sdio error, abort command and terminate frame
[ 99.230118] brcmfmac: brcmf_sdio_readframes: read 1524 bytes from channel 2 failed: -84

and

[ 729.347993] net_ratelimit: 1238 callbacks suppressed
[ 729.348036] brcmfmac: brcmf_sdiod_regrw_helper: failed to read data [email protected], err: -5
[ 729.352270] brcmfmac: brcmf_sdiod_regrw_helper: failed to read data [email protected], err: -5
[ 729.356504] brcmfmac: brcmf_sdiod_regrw_helper: failed to read data [email protected], err: -5

Leo

#6

Hello,

I also observe the WiFi disconnects on Pi Zero v1.3 with an IoT pHAT installed appears when Pi is under network load. (I found I readily duplicate the issue using remote desktop (e.g. tightVNS) into the Pi Zero/ pHAT.)

DETAIL: I observed regularly experiencing similar network disconnects after replacing my USB WiF dongle on my Pi Zero v1.3 with the IoT pHAT. I do not experience similar disconnects when using a USB WiFi dongle. My observation is disconnects occur whenever the network throughput demands increase. I have noticed the Pi Zero with IoT pHAT installed stops responding to ping during these disconnects, The Pi Zero will restore the network connection after a few minutes, at which time it again responds to ping and I can again access remotely.

SETUP:
Raspberry Pi Zero v1.3
Camera attached
IoT pHAT
Antenna (same behavior with ext attached/ or PCB antenna)

thx, brycej

#7

Hi Cheong

I think rumour has provided steps to reproduce, but attempting a download of any large file (greater than 100mb) will definitely show the problem.
Either reviewing dmesg or syslog will show the errors we have both listed.
Same download will work fine on a Raspberry Pi B.

I tested in the following ways

  • Pi Zero x 2 and IOT pHAT x2
  • Jessie lite - downloaded last week from raspberrypi.org
  • Jessie full - downloaded last week from raspberrypi.org
  • Jessie full before any updates - just as downloaded from Raspberrypi.org
  • Jessie full with updates - apt-get update, apt-get dist-upgrade
  • Jessie full with kernel updated via rpi-update
  • Using a SanDisk Ultra 8gb SD card bought from a reputable UK retailer
  • with or without dtparam=i2c_vc=on in /boot/config.txt (just in case)
    Always similar brcmf_sdio_xxx errors

No errors when using a USB wifi adapter.
No errors when using a Raspberry Pi Model B

I have not flashed the eeprom.

#8

Hi all,

I tested with Pi Zero v1.2 but didn’t get any problem. I will test with v1.3 as soon as possible.

#9

I am getting this too. Connecting the I2C makes it worse and disconnects a lot sooner. It will start up fine but disconnects shortly after. Result is the same with RPi Zero v1.2 and v1.3

#10

We can repeat this, too. We will try to lower the SDIO clock or remove one component on the board to solve this.

We will provide a solution on this very soon after more testing.

#11

I get this as well with my Pi Zero v1.3 on all the pHATs I’ve got. Most of the time, using the WiFi causes the SDIO errors in the logs and there is significant packet loss. I’ve had a couple times where it did seem to work properly though so it isn’t reliable whether it works or not.

#12

I made the same bad experience with the recently arrived pHAT and RasPi Zero (V1.3)
I was unable to update/upgrade because it constantly looses the WiFi connection.
Also a second attempt flashing the sd card again did not bring a success.
Removing the pHAT and connectin a WiFi dongle via an OGT adapter and it was upgraded in minutes.

RedBead IoT_pHAt -----> R.I.P.

#13

Sounds good!

Happy to test any software changes if needed, not quite sure about removing any of those surface mounted components!

#14

Hi @ursm and all, really sorry for this, we are now fine tuning the SDIO clock and will provide an update to the EEPROM.

In the mean time, please add the follow line to the /boot/config.txt file

dtoverlay=sdio,pull_once=on,sdio_overclock=20

Since we need to pass FCC, we add a component on the board and it affects the SDIO clock, now the clock needs to be slow down in order to make it stable.

Again, sorry and thank you for your patience as well as your contribution!

#15

@cheong thanks for the prompt investigations.
For my setup, I can confirm that adding the dtoverlay line corrects the errors, though I suspect it may be reducing throughput.
I am still curious as to why only pi-zeros are affected (in my setup, at least).

#16

So, if you know a temporary solution, WHY don’t you tell us that on your main page or at least on Github, where you have it for bluetooth?

#17

@ursm did the dtoverlay line in /boot/config.txt work for you?
I’d want to have more confirmation from others who reported the issue in this thread that it was a valid workaround/fix before publishing it.

#18

not yet tried … have to exhuminate it first

#19

Making the IoT pHAT is a challenge task for us, since we need to support different Pi boards and we did not know their PCB routing, the SDIO lines suppose require to have the same length. And you may know, Broadcom is not so open.

#20

We have to do more testing first.