… like the popular Edimax one that is on the recommended parts list here. I use a handful of these.
I fired up another Pi today for a totally different purpose.
I popped in a Edimax wifi dongle, and was greeted with horrible, random ping times.
SSH wouldn’t connect until I pinged the board a bunch to ‘wake it up’ and get it to ARP.
I did some poking around in my Mikrotik and realized the dongle was disconnecting.
No… really? Yes. Power management is enabled by default! How … useless!
So then I wondered, why does this not happen on the Piaware? Well that’s because it is always sending packets.
A quick check shows me yep, it’s enabled, so the PiAware would disconnect the wifi and go to sleep as well if there wasn’t a stream of planes and/or the feeder check in.
I would like to make a suggestion that the devs include this fix in the main build.
Anyone who runs this dongle should peform this configuration change so their dongle doesn’t go to sleep.
If you don’t use the dongle, the option means nothing since the driver doesn’t load anyways.
Check if you are impacted - issue this command:
cat /sys/module/8192cu/parameters/rtw_power_mgnt
and it comes back with a 1 (one), it means you have this driver loaded and the power management is enabled.
If it comes back with a two, you have maximum power savings enabled! Even worse.
To disable power management for this driver:
sudo sh -c "echo 'options 8192cu rtw_power_mgnt=0' >> /etc/modprobe.d/8192cu.conf"
sudo reboot
… and you’re good to go.
After a reboot, you can verify power management is disabled by re-running the cat command above, and it should output a zero.
Now I can get back to what I was trying to accomplish in the first place
Edit: Bonus. This fixed my FlightRadar24 problem too, because when it attempted to start, the network wasn’t ready yet, and it would fail. Now it’s working automatically on reboot.