Keep Raspberry Pi wifi alive - Pt 2

I'm still having problems with the wifi dongle. I have a  RT5370 Wireless Adapter. Type the following command to get yours:


This will list all USB devices connected. After that I did


This will list all the network adapters. In my case this showed up:

wlan0     IEEE 802.11bgn  ESSID:"genie-net"
          Mode:Managed  Frequency:2.422 GHz  Access Point: 00:18:39:CF:07:0E
          Bit Rate=54 Mb/s   Tx-Power=20 dBm
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=51/70  Signal level=-59 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:29   Missed beacon:0

lo        no wireless extensions.

eth0      no wireless extensions.

I noticed the power management was on. Have I found the reason here? That remains to be seen. I ran:

sudo iwconfig wlan0 power off

To turn off the power management. Now I just have to wait and see... Hopefully not to be continued.