Slow WIFI speeds, could it be settings?

Hello all,

I’m struggling a little bit streaming from LAN and legit online sources (namely BBC iPlayer here in the UK)

Usually pi lives upstairs in bedroom directly above wifi router. For testing purposes i’ve brought it downstairs (barely 6ft of fresh air between them) speed results are for the most part nearly identical as described below.

iperf testing proves the connection outbound is solid enough,

osmc@osmc:~$ iperf -c ping.online.net -t 60 -f m

Client connecting to ping.online.net, TCP port 5001
TCP window size: 0.04 MByte (default)

[ 3] local 192.168.0.11 port 46388 connected with 62.210.18.40 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-60.3 sec 69.8 MBytes 9.70 Mbits/sec

Speedtest.net also confirms ISP bandwidth anywhere from 90Mbit/s upto 225Mbit/s down and 8Mbit/s-16Mbit/s up.

Speed checks between desktop (1G/bit ethernet into router) and laptop on 5GHz and 2.4 GHz wifi both have more than sufficent speeds so i can deduce that router throughput is there.

now, heres the problem, when using FileZilla to transfer to the Pi im lucky to see 1MiB/s i regularly see it at 70KiB/s - 150KiB/s regardless if target is SD or USB drive. Also getting the ‘error’ Insecure server, it does not support FTP over TLS in connection window of FZ, i dont know if that matters. Sometimes the connection drops and the pi then comes unresponsive via Kodi power button and ‘reboot’ command in SSH. Pi requires reboot by cycling the power…

When streaming from an SMB Shared 2tb WD USB Drive on my desktop any resolution playback is unwatchable, I’m assuming due to low speeds (can take 5 or more seconds to play 1 sec of video, and theres no audio playback even though there is audio in the media file), this can be confirmed by the pi struggling to live stream 720p from iPlayer addon (ive had to turn the streaming quality settings right down to get it to work)

now, i dont have anything strange setup with regards to network access on the pi.
I have SSH and FTP installed and active.
I always control it via Android Kore app.
OSMC is running the latest version.

I’ve only really seen this problem with the latest 2 updates (thats not to say it is necessarily a fault with OSMC, though) I’m aware a whole heap of stuff can effect WIFI speeds but since iperf comes back with over 8Mbit/s nearly every time i try it there is more than sufficient bandwidth available even though i have issues with iPlayer.

is there anything you gods and godesses can suggest i try to get these speeds back to normal speed where i can stream from my LAN and Online?

also as a complete side note, media on SD or USB locally on the pi works perfectly be it 720p or 1080p MP4/MKV

What wifi dongle? Did you test with a cable now that the device is 6ft away? Did you follow any of the suggestions in the 500 other posts on this forum with nearly the same thread title?

onboard wifi…

not cable tested, yet…

nope… *runs off to find 500 other posts

The internal antenna on the Pi3 is dismal… It’s a poor solution for an htpc application.

maybe so but i didnt have a problem untill about 3 or 4 months ago. leads me to believe i changed a setting without realising the consequences, i will nevertheless attempt the performance with a Netis Wifi Dongle tonight and see how i get on.

You should check that your wifi channel has not become congested since then. There are Android apps such as Wifi Analyzer, and I’m sure similar for iOS that you can use to test. You may benefit from changing the channel in use on your AP.

Swapping channels onto a less crowded one seems to have worked wonders… atleast for playback. Will test ftp speeds tomorrow

Thanks ActionA

Enjoy!

as general using wi-fi for a htpc it’s a bad solution :slight_smile:

Same Issue for me, very slow Wifi:

wifi distance 1Meter to Router, 2 Meter to second Device (other device has fast internet - 7MB/s download - no issues on this side)

System is up to date!

root@osmc:~# iwconfig
eth0      no wireless extensions.

wlan0     IEEE 802.11  ESSID:"RoxAna"
          Mode:Managed  Frequency:2.447 GHz  Access Point: 9C:4F:CF:01:A2:6B
          Bit Rate=72.2 Mb/s   Tx-Power=31 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=67/70  Signal level=-43 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

 iperf -c 192.168.1.123 -t 10 -f n
------------------------------------------------------------
Client connecting to 192.168.1.123, TCP port 5001
TCP window size: 43.8 KByte (default)
------------------------------------------------------------
[  3] local 192.168.1.180 port 42532 connected with 192.168.1.123 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  27.2 MBytes  22.8 Mbits/sec

Swiching chanels no affect, any other ideas?

A 10 second test will tell you basically nothing, try a much longer test. And you should be using iperf3, not iperf. Did you read any of the suggestions in this year old thread, like tried wired?

iperf3:

 iperf3 -c 192.168.1.123 -t 100 -f n
Connecting to host 192.168.1.123, port 5201
[  4] local 192.168.1.180 port 46162 connected to 192.168.1.123 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  2.45 MBytes  20.6 Mbits/sec    0    217 KBytes
[  4]   1.00-2.00   sec  2.98 MBytes  25.0 Mbits/sec    0    217 KBytes
[  4]   2.00-3.00   sec  2.44 MBytes  20.5 Mbits/sec    0    217 KBytes
[  4]   3.00-4.00   sec  2.74 MBytes  23.0 Mbits/sec    0    217 KBytes
[  4]   4.00-5.00   sec  2.84 MBytes  23.8 Mbits/sec    0    217 KBytes

[  4]  97.00-98.00  sec  2.49 MBytes  20.9 Mbits/sec    0    208 KBytes
[  4]  98.00-99.00  sec  2.36 MBytes  19.8 Mbits/sec    0    208 KBytes
[  4]  99.00-100.00 sec  2.20 MBytes  18.4 Mbits/sec    0    208 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-100.00 sec   257 MBytes  21.6 Mbits/sec   34             sender
[  4]   0.00-100.00 sec   257 MBytes  21.5 Mbits/sec                  receiver

Speed with direct cable connection:

[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-100.00 sec  3.81 GBytes   327 Mbits/sec    0             sender
[  4]   0.00-100.00 sec  3.81 GBytes   327 Mbits/sec                  receiver

Are you using 20MHz or 40MHz bandwidth for wifi?
My Pi2 with a cheap Realtek adapter manages:
iperf3 -c 192.168.3.55 -f n
Connecting to host 192.168.3.55, port 5201
[ 4] local 192.168.3.112 port 49224 connected to 192.168.3.55 port 5201
[ ID] Interval Transfer Bandwidth Retr Cwnd
[ 4] 0.00-1.00 sec 10.8 MBytes 90.0 Mbits/sec 0 368 KBytes
[ 4] 1.00-2.00 sec 9.30 MBytes 78.0 Mbits/sec 0 474 KBytes
[ 4] 2.00-3.00 sec 8.70 MBytes 73.3 Mbits/sec 0 550 KBytes
[ 4] 3.00-4.00 sec 8.93 MBytes 74.8 Mbits/sec 0 607 KBytes
[ 4] 4.00-5.00 sec 9.40 MBytes 79.1 Mbits/sec 0 659 KBytes
[ 4] 5.00-6.01 sec 9.41 MBytes 78.5 Mbits/sec 0 728 KBytes
[ 4] 6.01-7.00 sec 9.27 MBytes 78.1 Mbits/sec 0 728 KBytes
[ 4] 7.00-8.00 sec 9.21 MBytes 77.3 Mbits/sec 0 728 KBytes
[ 4] 8.00-9.00 sec 9.00 MBytes 75.5 Mbits/sec 0 728 KBytes
[ 4] 9.00-10.00 sec 9.13 MBytes 76.5 Mbits/sec 0 765 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth Retr
[ 4] 0.00-10.00 sec 93.1 MBytes 78.1 Mbits/sec 0 sender
[ 4] 0.00-10.00 sec 90.8 MBytes 76.2 Mbits/sec receiver

Regards
/L

i don’t know exactly, router is configured for b,g,n, switching it down to b,g slows down to 10mbit.
How can i find out if it is 20 or 40Mhz?

Depends on your router, mine is set to “n only” and “20/40” for 2.4GHz.
However, I have no idea what your router can or cannot do.

regards
/L

34 retries says to me that you have network issues. Tried wired if you can.

You mean the router does not support AC? Or that you allow b,g,n?

Till now, the router is “alcatel wm40”, i dont have any options for 20 or 40 Mhz in the configuration panel.
This Router isnt supporting AC Mode, but with Notebooks i have full 50mbit/s lte Download speed, (not meshered speed through the network only), so i think its a raspberry problem, not a wifi problem.

I read about Problems with wifi during HDMI using. Can i try this issue with disconnected cable? or must be switched off totaly hdmi?

I was able to change not to channel 13. Setting te wlan Region speeded up my wifi from about 1MB/s to 3MB/s
channel 13 (2472 MHz), width: 40 MHz, center1: 2462 MHz

I testet also with all cables(and hdmi) disconnected, with same results.

Der is one issue which i don’t understand:
Firefox on Notebook shows on www.speedtest.net:
Download Mbps: 52.32
Upload Mbps:10.31

iperf on Notebook sais upload:
[ ID] Interval Transfer Bandwidth
[ 4] 0.00-10.00 sec 13.9 MBytes 11.6 Mbits/sec sender
[ 4] 0.00-10.00 sec 13.8 MBytes 11.6 Mbits/sec receiver

and on notebook Download:
[ ID] Interval Transfer Bandwidth Retr
[ 4] 0.00-10.00 sec 33.9 MBytes 28.5 Mbits/sec 0 sender
[ 4] 0.00-10.00 sec 33.7 MBytes 28.3 Mbits/sec receiver

where are the 20Mbits/sec which are missing here?

And now all on te RPI 3b+

Nice, rpi seems full Download speed:

[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec  63.0 MBytes  52.8 Mbits/sec   40             sender
[  4]   0.00-10.00  sec  60.5 MBytes  50.8 Mbits/sec                  receiver

Download speed rpi also ok:

[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec  13.3 MBytes  11.1 Mbits/sec   34             sender
[  4]   0.00-10.00  sec  12.8 MBytes  10.7 Mbits/sec                  receiver

Now i am measuring the speed of two wifi devices
Bit Rate=150 Mb/s Link Quality=55/70 Signal level=-55 dBm (data of the rpi with more distance from Router)

[  4]   0.00-10.00  sec  43.4 MBytes  36.4 Mbits/sec    0             sender
[  4]   0.00-10.00  sec  43.1 MBytes  36.1 Mbits/sec                  receiver

and the other dev->wifi->dev Direction:

[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-10.00  sec  35.8 MBytes  30.0 Mbits/sec                  sender
[  4]   0.00-10.00  sec  35.8 MBytes  30.0 Mbits/sec                  receiver

so downloading is more faster like moving Data en the wifi?

If you run iperf3 and both devices are wireless expect half the speed. As I understand anyhow.

Did a pair of quick tests, first wireless pi to wired pc:

iperf3 -c 192.168.3.55
Connecting to host 192.168.3.55, port 5201
[  4] local 192.168.3.112 port 60824 connected to 192.168.3.55 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  11.3 MBytes  94.7 Mbits/sec    0    392 KBytes       
[  4]   1.00-2.00   sec  8.90 MBytes  74.9 Mbits/sec    0    438 KBytes       
[  4]   2.00-3.00   sec  9.24 MBytes  77.4 Mbits/sec    0    484 KBytes       
[  4]   3.00-4.00   sec  8.91 MBytes  74.7 Mbits/sec    0    561 KBytes       
[  4]   4.00-5.00   sec  8.73 MBytes  73.2 Mbits/sec    0    561 KBytes       
[  4]   5.00-6.00   sec  9.18 MBytes  77.1 Mbits/sec    0    590 KBytes       
[  4]   6.00-7.00   sec  9.14 MBytes  76.4 Mbits/sec    0    619 KBytes       
[  4]   7.00-8.00   sec  9.14 MBytes  77.0 Mbits/sec    0    649 KBytes       
[  4]   8.00-9.00   sec  9.32 MBytes  77.9 Mbits/sec    0    649 KBytes       
[  4]   9.00-10.00  sec  8.82 MBytes  74.1 Mbits/sec    0    683 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec  92.7 MBytes  77.8 Mbits/sec    0             sender
[  4]   0.00-10.00  sec  90.6 MBytes  76.0 Mbits/sec                  receiver

Then wireless pi to wireless pc (both on 2.4GHz)

iperf3 -c 192.168.3.155
Connecting to host 192.168.3.155, port 5201
[  4] local 192.168.3.112 port 47048 connected to 192.168.3.155 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  4.87 MBytes  40.9 Mbits/sec    0    239 KBytes       
[  4]   1.00-2.00   sec  5.86 MBytes  49.2 Mbits/sec    0    402 KBytes       
[  4]   2.00-3.00   sec  5.45 MBytes  45.7 Mbits/sec    0    457 KBytes       
[  4]   3.00-4.00   sec  5.02 MBytes  42.2 Mbits/sec    0    481 KBytes       
[  4]   4.00-5.00   sec  5.63 MBytes  47.2 Mbits/sec    0    591 KBytes       
[  4]   5.00-6.00   sec  5.05 MBytes  42.4 Mbits/sec    0    591 KBytes       
[  4]   6.00-7.00   sec  5.43 MBytes  45.4 Mbits/sec    0    591 KBytes       
[  4]   7.00-8.00   sec  5.23 MBytes  44.0 Mbits/sec    0    591 KBytes       
[  4]   8.00-9.00   sec  5.57 MBytes  46.8 Mbits/sec    0    591 KBytes       
[  4]   9.00-10.00  sec  5.43 MBytes  45.4 Mbits/sec    0    591 KBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec  53.5 MBytes  44.9 Mbits/sec    0             sender
[  4]   0.00-10.00  sec  52.5 MBytes  44.0 Mbits/sec                  receiver

So, in my case roughly a bit better than half the speed actually.

regards
/L

Hi,

Edit - Remembered this wrong it has nothing to do half and full duplex, but the csma/ca and csma/cd is correct.

I would also expect this as wifi uses CSMA/CA - Collision Avoidance. Very similar to to half-duplex So it can only transmit/receive data at certain times (windows)

Of course iperf3 from a wireless to wired or the reverse will be affected but not to the same extent, as at least 1 side of the exchange (wired) would (should, be very unlikely for half-duplex devices to still be about these days) be full-duplex which uses be using csma-cd - collision detection, so so can transit data at any time and is not restricted to transmit and receive windows.

at least that is my understanding.

Thanks Tom.