Wi-Fi on RaspberryPi4, is it that bad or do I need external USB adapter?

  • Hi,

    I have been running multiple instances on LibreElec on my Raspberry Pis throughout the house ever since I remember, however this is first time I am trying to get it to work through Wi-Fi rather than through ethernet cable.

    My rPI4 is now attached to a TV that is nowhere ethernet socket, so I need to find another solution. I took my Pi out of the case to maximise antenna's reception however when attempting to stream videos via Wi-Fi, I can't get anything with bitrate more than 8-10Mbps to stream smoothly off my NAS. I believe that Pi4's built-in Wi-Fi is just not capable of doing it. Definitely not a problem with my house's Wi-Fi setup (Cisco 3802 with vWLC).

    So my question to you is, is there any magic I can do to my Pi to improve its Wi-Fi performance, do I need to buy external USB Wi-Fi adapter, or should I give up on wireless and just buy powerline adapter? Thoughts?

  • Wifi on the RPi4 is not bad, but due the small size of the antenna not that optimized for longer distances. I have my RPi4 in a Flirc box and on the other side of a wall from an TP-Link access point, and I still get a decent 5Ghz (966Mbps) connection, with approx 45MBps. The total distance between them though is only some 50cm.

    Doublecheck if using/fixating a different channel on your Cisco device may improve the situation with less interference from other devices.

    Powerline adapter results can be just as bad as those of wifi, but that all depends on the overall state of your house's wiring quality. There is no guarantee of any connection speed up front... An external 300Mbps (1 antenna) USB Wi-Fi adapter would be the cheapest first hardware option, and this would be a more extreme solution: https://www.amazon.ca/BrosTrend-1200…i/dp/B07FCN6WGX

    Fwiw, nothing beats an ethernet connection.

  • My rPI4 is now attached to a TV that is nowhere ethernet socket, so I need to find another solution. I took my Pi out of the case to maximise antenna's reception however when attempting to stream videos via Wi-Fi, I can't get anything with bitrate more than 8-10Mbps to stream smoothly off my NAS. I believe that Pi4's built-in Wi-Fi is just not capable of doing it. Definitely not a problem with my house's Wi-Fi setup (Cisco 3802 with vWLC).

    You don't really mention what version of LE your running. RPi4 will cap out at roughly ~80Mbps for Wi Fi performance, regardless of connection speed. If your OC'd then I have heard of up to 100Mbps. It is limited by the SDIO bus speed, and as I understand it there is nothing you can do about this. The performance will vary based on congestion, distance, etc.

    What I would do is install iperf3 on your NAS, and then test both directions from your RPi4. I am in a similar situation, and I have used the internal Wi-Fi before but typically my content is HD or FHD, and ran into buffering problems even with sustained 80Mbps bandwidth. You can try to combat that with adjusting the cache memory size via advancedsettings.xml, on a 2GB RPi4 you have plenty of RAM available so something like this should be OK:

    Code
    <advancedsettings version="1.0">
        <cache>
            <buffermode>1</buffermode>
            <memorysize>262144000</memorysize>
        </cache>
    </advancedsettings>

    Some folks will say this will slow down video load times (I haven't noticed anything, and I actually run with 512MB cache), or it requires 3x memory (I think the Kodi Wiki says this, it may have been true with older versions of Kodi -- but doesn't appear to be the case anymore). But reality is the cache memorysize is the fixed memory allocation, 1/4 of the buffer is for the back cache (rewind), and 3/4 is the forward cache.

    With that all being said, this might be enough to make it work with HD/FHD content. Not sure about UHD (4k) content. I personally bought a USB stick, and can get up to 250Mbps with it. USB bus has a lot more bandwidth than the built-in Wi-Fi.

  • You don't really mention what version of LE your running. RPi4 will cap out at roughly ~80Mbps for Wi Fi performance, regardless of connection speed. If your OC'd then I have heard of up to 100Mbps. It is limited by the SDIO bus speed, and as I understand it there is nothing you can do about this. The performance will vary based on congestion, distance, etc.

    What I would do is install iperf3 on your NAS, and then test both directions from your RPi4. I am in a similar situation, and I have used the internal Wi-Fi before but typically my content is HD or FHD, and ran into buffering problems even with sustained 80Mbps bandwidth. You can try to combat that with adjusting the cache memory size via advancedsettings.xml, on a 2GB RPi4 you have plenty of RAM available so something like this should be OK:

    Code
    <advancedsettings version="1.0">
        <cache>
            <buffermode>1</buffermode>
            <memorysize>262144000</memorysize>
        </cache>
    </advancedsettings>

    Some folks will say this will slow down video load times (I haven't noticed anything, and I actually run with 512MB cache), or it requires 3x memory (I think the Kodi Wiki says this, it may have been true with older versions of Kodi -- but doesn't appear to be the case anymore). But reality is the cache memorysize is the fixed memory allocation, 1/4 of the buffer is for the back cache (rewind), and 3/4 is the forward cache.

    With that all being said, this might be enough to make it work with HD/FHD content. Not sure about UHD (4k) content. I personally bought a USB stick, and can get up to 250Mbps with it. USB bus has a lot more bandwidth than the built-in Wi-Fi.

    Thanks for that, I need to try it. A standard FHD BluRay's ISO bitrate is usually at around 40Mb. 80Mb in theory should be plenty enough but as we all know, wireless is wireless. I'm picking up powerline adapter from friend tomorrow, I will give it a try.

    By the way, which USB adapter have you bought that gets 250Mb/s on Pi?

  • By the way, which USB adapter have you bought that gets 250Mb/s on Pi?

    I am using these (802.11ac):

    TP-Link AC1300 USB WiFi Adapter(Archer T3U)- 2.4G/5G Dual Band Wireless Network Adapter for PC Desktop, MU-MIMO WiFi Dongle, USB 3.0, Supports Windows 10, 8.1, 8, 7, XP/Mac OS X 10.9-10.14
    TP-Link AC1300 USB WiFi Adapter(Archer T3U)- 2.4G/5G Dual Band Wireless Network Adapter for PC Desktop, MU-MIMO WiFi Dongle, USB 3.0, Supports Windows 10, 8.1,…
    www.amazon.com

    They have absolutely no external antenna at all. Probably if I were to crack it open just a large trace on the PCB. :) I believe what Klojum posted is using drivers already in LibreELEC (RTL8812BU?). You can get similar USB sticks with external antennas for the same price.

    But you have to roll your own build with the RTL8822BU drivers from https://github.com/morrownr/88x2bu (he has the latest driver version). I don't know why Realtek rolls so many Wi-Fi stacks. One thing to mention is 8822BU is USB 2.0, where as I believe 8812BU is USB 3.0. So 8812BU is the better chipset to buy, I may be rubbing up against the theoretical limit of USB 2.0.

    Edited once, last by frakkin64 (October 18, 2021 at 1:30 AM).

  • From personal experience, if you don't have any USB devices connected (like a USB flash stick), then it is fine

    However, I find that WIFI 5Ghz becomes unstable/unusable if something like a USB flash stick is plugged in, as the interference wreaks havoc with WIFI 5Ghz

    I boot off a USB flash drive, so i have had to switch to using the wired Ethernet port

  • I confirm that wifi on raspberry pi 4 is an absolute nightmare. There is so much variance, in my case it can go down to 2mbps and up to 35mbps on a 2.4ghz network, and i have no idea why it is so janky. I have a cheap netbook which consistently pulls 50mbps wherever i take it inside the house. But when it comes to pi, it is like a slot machine. You never know what you'll get.

    RPI 5 (or whatevet they will call the new one) should definately have a connector for an external wifi antenna.

  • I confirm that wifi on raspberry pi 4 is an absolute nightmare. There is so much variance, in my case it can go down to 2mbps and up to 35mbps on a 2.4ghz network, and i have no idea why it is so janky.

    You should make sure you have the latest firmware, which is best done if your on LE 10. Earlier firmwares definitely have co-existence issues @ 2.4GHz w/ Bluetooth and even HDMI itself. My understanding is those issues were addressed through the magic of firmware. 2.4GHz is also pretty overcrowded. I know another user had problems on LE 9.2 and managed to update the firmwares which improved the situation.

    I have never used 2.4GHz channels on the RPi4, so not sure how reliable it will be. RPi4 does work well @ 5GHz w/ 80MHz channels (which 80Mhz channels is a later firmware addition as well). It was fairly stable for me, the problem I had was the 80Mbps restriction of the internal bus. But in short you can't run on Wi-Fi alone without bumping the cache.

  • I have powerline through my house since foil backed plasterboard is brilliant for making WiFi a non starter. It works well with one small problem. If you get a spike on the line it can disconnect you and you need a reboot before things pick up again.

  • You should make sure you have the latest firmware, which is best done if your on LE 10. Earlier firmwares definitely have co-existence issues @ 2.4GHz w/ Bluetooth and even HDMI itself. My understanding is those issues were addressed through the magic of firmware. 2.4GHz is also pretty overcrowded. I know another user had problems on LE 9.2 and managed to update the firmwares which improved the situation.

    I have never used 2.4GHz channels on the RPi4, so not sure how reliable it will be. RPi4 does work well @ 5GHz w/ 80MHz channels (which 80Mhz channels is a later firmware addition as well). It was fairly stable for me, the problem I had was the 80Mbps restriction of the internal bus. But in short you can't run on Wi-Fi alone without bumping the cache.

    I am actually using Raspberry Pi OS, updated. So i assume it is the latest firmware already.

  • As others have said, the WiFi antenna on the Pi4 is very small, so range is limited. I also experienced the erratic WiFi performance when booted off a USB thumb drive. I added a short USB extension cable and the issue went away.

    Since both my Pi4s are behind a TV and in close to my internet router, I found it was easier to just use ethernet instead. The less things transmitting on 5Ghz in close proximity to the router the better.

  • As others have said, the WiFi antenna on the Pi4 is very small, so range is limited.

    I wonder what folks consider "limited". My Pi4 is downstairs from the router, going through at least 1 wall, probably a distance of 35 feet. I would assume the router is another factor. But even with the crappy USB dongle no problems, which is also a very small Wi-Fi antenna.

    So I am guessing people are running much larger distances, wall construction, crappy routers, more congestion/interference, or something else. Even in the built-in Wi-Fi was fairly stable for me, but I have read a whole bunch of posts of people with problems (HDMI interference, Bluetooth interference, USB is new to me, etc).

    I do boot from an SD card, so far it hasn't been a problem but interested in dealing with the eventual failure. :)