Edimax EW-7811Un Power Management
I have several of the tiny Edimax Wifi dongles that I use on my Raspberry Pi’s. If you leave the Pi unattended for awhile, the Edimax will go to sleep and you’ll lose your SSH connection. Here is a fix that worked for me. This is entered on the command line / terminal.
sudo nano /etc/modprobe.d/8192cu.conf
Add the following lines to this file you created. It disables the power down on the Edimax.
options 8192cu rtw_power_mgnt=0 rtw_enusbss=0 Then, do your normal Ctrl-X, Yes and save this file. Reboot.