Why Pi, Why?
During some experimentation with a program I’ve been working on, I was moving files from my Linux desktop to my Pi using SCP, and noticed the transfer speeds were barely reaching 1 MB / s on my home network.
Was it my network, or the Pi? I ran a few more tests and determined it was the Pi on Wifi only. The wired connection is very fast, as it should be.
Why, Google search, of course. Pretty quickly I found several forum posts asking for help with the Raspberry PI 3 wireless being slow. After reading several, and seeing a few different potential solutions, I found what I’ll call the ‘right’ solution.
Someone figured out that the 3 has a ‘power save’ mode which is on by default, and this appeared to be causing quite an issue with speeds. Many turned it off with a simple command,
sudo iwconfig wlan0 power off
and that seemed to fix their problem. Fortunately, I didn’t stop reading at that post, and I found that a few folks who turned it off, then had issues with intermittent cut-offs in their connection, as well as an issue with the ‘power save’ feature being back on when they would reboot the Pi 3.
A little more research and there was someone with a little advice on a script they were using with success, and that’s what I’ve instituted on my Pi with success thus far as well.
The speeds are now up around 10 MB/s with transfers on Wifi, and I’m able to stream my linux desktop view to my Pi over wireless.
Here’s the steps to make the script.
On the Raspberry Pi 3 with wifi issues, open a terminal (bash prompt).
sudo touch /etc/network/if-up.d/wlan0
change the permissions on this file using
sudo chmod +x /etc/network/if-up.d/wlan0making it executable.
use Nano to edit the file with this command
sudo nano /etc/network/if-up.d/wlan0
add the following lines to this script:
niwconfig wlan0 power off
remember to add one more empty line at the end, and save using
CTRL+O then exit Nano using
Now, reboot, and test your changes.
@tbaugh This is probably something you want to do on the Pi there at Home Instead too.