Babak
Posts: 1
Joined: Sun Jun 09, 2013 12:06 am

Disable power management for Ralink RT5370

Sun Jun 09, 2013 12:11 am

I have tried to disabled power management for my wifi card using $sudo iwconfig wlan0 power off But keep getting SET failed for "invalid argument"! Any thoughts?

Thx

jonathananonuevo
Posts: 1
Joined: Wed Jul 10, 2013 4:18 am

Re: Disable power management for Ralink RT5370

Wed Jul 10, 2013 4:26 am

Hi Babak,

Please try using the following solution:

1. Turn off wireless power management from /etc/network/interfaces.

Code: Select all

sudo /etc/network/interfaces
2. Add the following line of code (may be inserted anywhere in file):

Code: Select all

wireless-power off
3. Exit and save the file
--> CTRL+X
-->Save modified buffer (ANSWERING "No" WILL DESTROY CHANGES) ?
(Type Y for yes)
--> File Name to Write: /etc/network/interfaces (Press Enter)

4. Restart networking

Code: Select all

/etc/init.d/networking restart
5. Confirm Power Mangement is off:

Code: Select all

iwconfig
You should see something like this:



wlan0 IEEE 802.11bgn ESSID:"publicwifi"
Mode:Managed Frequency:2.437 GHz Access Point: 00:21:69:61:A1:1C
Bit Rate=54 Mb/s Tx-Power=20 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=70/70 Signal level=-39 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:2 Invalid misc:19 Missed beacon:0

lo no wireless extensions.

eth0 no wireless extensions.

BLL
Posts: 156
Joined: Fri Jun 07, 2013 2:30 pm

Re: Disable power management for Ralink RT5370

Fri Jul 12, 2013 2:13 pm

I am experiencing the same problem of my wifi dongle with RT5370 chipset turning itself off whenever it feels like it! Your solution doesn't help much.

If the modem goes off, I either need to unplug and replug it (that sometimes works) or power down and then power up again. If the modem is then active (little blue light flashing), iwconfig shows power management off.##However, when the modem turns itself off and you run iwconfig, it shows power management as now on!

At the moment, it makes the Pi unusable as you never know when the internet will disappear, so as a router it is useless!

Any further suggestions please?

Thanks

Jeppedy
Posts: 8
Joined: Fri Jan 17, 2014 8:55 pm

Re: Disable power management for Ralink RT5370

Tue Feb 04, 2014 9:31 pm

I have the latest driver, according to the Realtek website (v4.0.2_9000.20130911)

I started with a fresh NOOBS install. I didn't install or change anything related to WiFi. I used the WiFi GUI included by default on the desktop.

I use a commercial router that handles all the devices and traffic I ever throw at it just fine.
When I use it on the Pi, connect speeds are DOG SLOW and the connection unreliable.

Also, iwconfig only shows this as a 802.11bg adapter, not 'N', which it certainly is...

I'm not sure whether this particular hardware piece is bad or is the model itself bad?

When I send it back to adafruit, do I ask for a refund or a replacement. Any suggestions on the performance or the cause?

User avatar
Richard-TX
Posts: 1545
Joined: Tue May 28, 2013 3:24 pm
Location: North Texas

Re: Disable power management for Ralink RT5370

Sat Feb 15, 2014 3:58 am

where in the interfaces file the power off statement is makes a difference.

Here is where it works for me.
------------------------------------------------
auto lo

iface lo inet loopback
iface eth0 inet static
address 10.232.1.92
netmask 255.255.255.0
gateway 10.232.1.1


wireless-power off
auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
.
.
.
----------------------------------------------------
Richard
Doing Unix since 1985.
The 9-25-2013 image of Wheezy can be found at:
http://downloads.raspberrypi.org/raspbian/images/raspbian-2013-09-27/2013-09-25-wheezy-raspbian.zip

thefendall
Posts: 1
Joined: Sun Jan 05, 2014 5:19 am

Re: Disable power management for Ralink RT5370

Sun Feb 16, 2014 4:31 am

unfortunately I am having the same problem, I added the command in the proper location, yet it does nothing. I am using wipi dongle (which is great plug and play) but so far the power management function will not turn off.

klricks
Posts: 4812
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Disable power management for Ralink RT5370

Sun Feb 16, 2014 2:14 pm

Did you reboot after making changes?

I have WIPI which has been up for more than 48 hours now after adding the wireless-power off command. Before could not get it to stay on overnight. I previously had the command as the last line but it did not do anything. Now I have it like shown below.
I won't be totally convinced unless I can have it stay on for more than a week.

sudo nano /etc/network/interfaces
---------------------------------------

Code: Select all

auto lo

iface lo inet loopback
iface eth0 inet dhcp

wireless-power off
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
Go here for my RPi writeup. Basic config, Serial Port add-on etc:
http://blackeagle12.net/Comp/RPi/Rpi.html Click contact icon then world icon --->

rsenio
Posts: 19
Joined: Tue Jul 09, 2013 2:04 pm

Re: Disable power management for Ralink RT5370

Tue Apr 01, 2014 3:11 pm

I too was having difficulty turning off power management in the interfaces file. However, this was what worked for me.

auto lo

iface lo inet loopback
iface eth0 inet dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
wireless-power off
iface default inet dhcp

gmas
Posts: 2
Joined: Sun Sep 07, 2014 11:58 pm

Re: Disable power management for Ralink RT5370

Mon Sep 08, 2014 12:13 am

This worked great:
rsenio wrote: auto lo

iface lo inet loopback
iface eth0 inet dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
wireless-power off
iface default inet dhcp

kidtire
Posts: 1
Joined: Tue Nov 25, 2014 1:37 am

Re: Disable power management for Ralink RT5370

Tue Nov 25, 2014 1:43 am

I have all of this done and iwconfig shows
Power Management:off

However, after a relatively short period of time the ssh session and all other networking becomes sluggish. Often it will disconnect when you type in the ssh session.

If I have another computer on the local network ping it every 15 seconds this doesn't happen.

ping -i 15 <ipaddr>

So, I am thinking that there is some sort of timeout that is way too short on the wifi driver or adapter.

Any idea what that could be?

If I can't figure this out soon I'll try a different wifi adapter hoping that is the problem.

acel
Posts: 5
Joined: Fri Nov 14, 2014 2:29 pm

Re: Disable power management for Ralink RT5370

Sat Nov 29, 2014 6:32 am

This seems works for me. My connection to my RPi as AP is much stable than before.

langelgjm
Posts: 1
Joined: Wed Jan 07, 2015 12:01 am

Re: Disable power management for Ralink RT5370

Wed Jan 07, 2015 12:05 am

I know this is an old thread, but thought I'd mention that adding wireless-power off to the very end of my /etc/network/interfaces file solved my issues with the model A+ and an RT5370 wireless dongle. With power management on, I was getting dropped connections after a few hours, and even when it worked, it was slow, with very long and irregular ping times and choppy SSH sessions.

Simply typing "iwconfig wlan0 power off" immediately improved everything - and turning power management back on immediately made everything worse. Editing the interfaces file made the change permanent, but apparently the order of commands does matter.

ecni
Posts: 1
Joined: Sat May 30, 2015 3:34 pm

Re: Disable power management for Ralink RT5370

Sat May 30, 2015 3:38 pm

IME, at the very least, it needs to appear after this line: wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf.

hopback
Posts: 2
Joined: Sun Mar 06, 2016 11:28 am

Re: Disable power management for Ralink RT5370

Sun Mar 06, 2016 2:44 pm

Thank you very much to everyone for the information in this thread. I was having similar issues with the Raspberry Pi 3's on board wi-fi and the edit to the /etc/network fixed the problem. I thought it worth adding a post here in case any other raspi3 users wanted confirmation that it works in this environment too.

Here's my /etc/network/interfaces edit, with the wireless-power off line added. Presumably this will only change the setting for wlan0, which is just fine for the basic system.

Rebooting after the change and then issuing iwconfig shows Power Managerment:off as desired and putty sessions no longer drop.

Code: Select all

auto lo
iface lo inet loopback

iface eth0 inet manual

allow-hotplug wlan0
iface wlan0 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
    wireless-power off

allow-hotplug wlan1
iface wlan1 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

coolder
Posts: 1
Joined: Tue Mar 08, 2016 12:06 am

Re: Disable power management for Ralink RT5370

Tue Mar 08, 2016 12:21 am

It's possible to switch of power management with post connection script.

Create script file

Code: Select all

sudo touch /etc/network/if-up.d/off-power-manager
Open to edit. You can use another editor, i'm using vim

Code: Select all

sudo vim /etc/network/if-up.d/off-power-manager
Type i to enter insert mode and copy pase next two lines

Code: Select all

#!/bin/sh
/sbin/iwconfig wlan0 power off
Type :wq to save and exit vim

Krebby
Posts: 2
Joined: Thu Dec 01, 2016 4:19 am

Re: Disable power management for Ralink RT5370

Thu Dec 01, 2016 4:30 am

If it helps anyone, I experienced similar WiFi connectivity issues with two brand new RPi 3's running Jessie headless (no Pixel). The first one came up fine and had stable WiFi and Bluetooth (after installing BlueZ). The second I brought up a few weeks later and it experienced intermittent WiFi connections, dropping link a few times an hour even 3 feet from the access point. It would also not identify BLE devices in hcidump.

I tried every remedy on the boards I could find, including disabling roaming and power management. For what it's worth, the working unit had both these enabled. I updated the kernel and the Bluetooth stack to the latest versions to no avail. Finally, I ran "uname -r" and discovered that the kernel version on the broken Pi (4.4.35-v7+) was more recent than the working one (4.4.21-v7+).

At this point, I cloned the SD card from the working Pi and now both of them are working.

Return to “Add-ons”

Who is online

Users browsing this forum: No registered users and 5 guests