I too ran into problems with USB Wi-Fi dongle on RPi. After being on for roughly a day RPi loses Wi-Fi link. If I run ping
to the gateway command fails with "Destination host not reachable"
message. People seem to solve problem by issuing ifdown wlan0
followed by ifup wlan0
. Unfortunately it doesn't work for me. Only way I can get connection back is to physically unplug USB dongle and plug it again. How can I imitate physical reset with console commands as close as possible?
-
4Possible duplicate of How can I reset a USB device using command line utilities?– gooberingFeb 17, 2016 at 11:27
-
You can remove the modules that manage the device from the kernel, reinsert them, and restart the relevant services (wpa_supplicant, NetworkManager etc.).– kbaFeb 17, 2016 at 11:28
-
This turned out to help only temporarily. Even physically reseating USB dongle helps only for 3-4 minutes and then Wi Fi signal disappears again. I figured out best solution is to add a cron job to periodically ping gateway and reset Pi if no response is received.– Farid83Feb 25, 2016 at 7:56
2 Answers
Sounds like a power management setting for your wireless needs to be updated. Run iwconfig
and look for a line like this:
Power Management:off
If you see "on" instead of "off" you will need to update doing the following:
Type at the command line: sudo nano /etc/network/interfaces
Insert this text anywhere: wireless-power off
Save the doc, close, and then at the command line type: /etc/init.d/networking restart
Check iwconfig
output again to make sure the power management setting took.
What type of dongle is it? there's a tweak to turn off power management on Realtek 8192CU Based Wifi Modules
-
I'm using ASUS N10 which is based on RTL8192SU. But I figured out resetting Pi would be the best option.– Farid83Feb 25, 2016 at 7:51