PDA

Bekijk de volledige versie : HOW-TO spare energy as much as possible



mumsoft
26-05-2008, 22:19
With this setup you will lose hardly any functionality, and also no energy.

- leave the Asus on all day.
- let the hard disk stop after 5 minutes of no activity
- make the WLAN (Wifi, radio) switchable

If you don't run processes that makes the disk spinning al the time, this will consume about 4.6 Watt most of the time, and after spinning up the disk it will consume 11.6 Watt, but only as long as needed.

All these 'techniques' have been described earlier by different people, but I give you them here in a combined version.

1) leave the Asus on all day.
There is nothing to it. Just plug it in.

2) let the hard disk stop after 5 minutes of no activity
If you, as I, use K.C.Furge's modified firmware 1.0.7.8 (second edition), see the comment from me here: http://wl700g.homelinux.net/drupal/?q=node/191
As I have found out that with WLAN on (wifi on) the hard disk spins up now and then, letting it spin down after 5 minutes will only prove useful with WLAN switched off (and no other process in your Asus attaching the disk constantly)

3) make the WLAN (Wifi, radio) switchable
This is a revised script after the one Milky has published here: http://wl500g.info/showpost.php?p=65373&postcount=7

#!/opt/bin/bash
#Initialize, get state
if wl radio | grep 1 &> /dev/null
then
#radio=off, Powerled on
echo "direction=out" > /proc/miscio/gpio_1_config
echo "0" > /proc/miscio/gpio_1
else
#radio=on, Powerled blinks
echo "direction=out" > /proc/miscio/gpio_1_config
echo "2" > /proc/miscio/gpio_1
fi

#loop forever
while true
do
#Check if copy button is pressed
if grep 1 /proc/miscio/gpio_6 &> /dev/null
then
if wl radio | grep 1 &> /dev/null
then
wl radio on
#Touch HDD to let it spin up (OPTIONAL)
touch /opt/bin/radio
#Blink powerled fast
echo "direction=out" > /proc/miscio/gpio_1_config
echo "2" > /proc/miscio/gpio_1
else
wl radio off
#Put powerled on
echo "direction=out" > /proc/miscio/gpio_1_config
echo "0" > /proc/miscio/gpio_1
fi
fi
#Stay here while copy button is still pressed
while grep 1 /proc/miscio/gpio_6 &> /dev/null
do
echo "Just waiting" > /dev/null
done
sleep 1
done
You can copy & past this script with a decent editor (nano, joe), and save it as 'radio' as I did, in /opt/bin. Make it executable with chmod +x /opt/bin/radio.
To test, start it manually. This script never ends, but you can stop it with Ctrl-C. When it runs, the power led will blink when radio is on, and you can switch radio on and off with the copy button.
To make it run forever, add a line in /opt/etc/rc.local:

# Start radio-switch
screen -d -m /opt/bin/radio
By the way, this assumes you have screen installed:

ipkg install screen

That's about it. Obviously, you must have telnet or ssh-access to the Asus, have root rights, have a writable /opt and so forth.
With all the wifi-clients I have, the disk spins up automatically. Spinolo has reported this is not the case with a PlayStation. (http://wl500g.info/showthread.php?p=97654#post97654).

BTW: You won't loose the ability to copy the contents of an USB stick as the Asus intended purpose of the copy button! :D

Good luck and save!
Marc

Maccro
31-05-2008, 01:33
I'd like to be able to turn off the "Air" LED when the radio is off...any idea how to do that?

mumsoft
31-05-2008, 13:20
I'd like to be able to turn off the "Air" LED when the radio is off...any idea how to do that?

Sorry, I don't know. I think it is not possible. The air led is blinking when some communication is going on, much like the led of an ethernet card. I don't know of any gpio that can control it.
If you set wlan off in the gui the Asus will start with the air led off, but it seems to me that the wlan in that case is not initialized, and the switch does not work in this setup. But I still experimenting with that.
Nevertheless, the air led will start shining whit wlan switched on, and when you are 'lucky' it will sometimes stop shining when you switch the wlan off.

Bottom line: the blinking Ready led is the only certain sign of the wlan state.

Regards,
Marc

Michele Spinolo
01-06-2008, 09:15
Marc,

is it measurable the power consumption of WLAN module? i.e. how much energy is saved switching off WLAN?

mumsoft
01-06-2008, 20:52
Marc,

is it measurable the power consumption of WLAN module? i.e. how much energy is saved switching off WLAN?

Michele, of course.
This is what I have measured the previous weeks and remembered:

Asus WL-700gE, 250GB disk version
----------------------------------
Router, no WLAN, no HDD:..4.6 Watt
Router, WLAN, no HDD:.....5.4 Watt
Router, WLAN, HDD:.......11.6 Watt

So WLAN alone takes less than 1 Watt. No need to disable it just to save the world. But in my situation, with WLAN on it starts up the HDD now and then, and that reduces the HDD live. I you only occasionally use the HDD and you still want to have the Asus powered up, my setup is fine. If your WLAN device does not power up the HDD, you might try to change the radio script so that it touches the HDD when switched on.

Marc

mumsoft
27-06-2008, 22:09
I have changed the script from Milky.
Most notably, if you pressed the copy button too long, the original script switched WLAN too often. Now the script will wait until you release the button.
Secondly, blinking the power led proved to be much easier. It now blinks faster.

With the new script you can press the copy button, wait until you see the power led burn contstantly or start blinking, and release.

See the first message in this thread:
http://wl500g.info/showthread.php?t=14517

Marc

monnier
28-11-2008, 22:41
So WLAN alone takes less than 1 Watt. No need to disable it just to save the world. But in my situation, with WLAN on it starts up the HDD now and then, and that reduces the HDD live.

It seems like a better option might be to fix this problem that the wlan uses the drive. You can set /proc/sys/vm/block_dump to 1 which will cause all disk accesss to be logged via klogd/syslogd; then you'll be able to figure out what caused the drive to spin back up (which file was accessed). Most likely it's some silly file that should be moved to tmpfs.

mumsoft
28-11-2008, 23:20
It seems like a better option might be to fix this problem that the wlan uses the drive. You can set /proc/sys/vm/block_dump to 1 which will cause all disk accesss to be logged via klogd/syslogd; then you'll be able to figure out what caused the drive to spin back up (which file was accessed). Most likely it's some silly file that should be moved to tmpfs.

Thank you for this info!

I have not been here for a long time, and now I know a bit more about this fact.
- I use WPA with TKIP and a password from GRC. This password is filed on the HD somewhere by the Asus.
- Whenever I make contact wirelessly, th HD wil spin up. Maybe it won't if it still has the password file in cache. Don't know
- Whenever someone else (some other device outside) tries to get a connection, the same happens.

I'm pretty sure it is the password file that is accessed.

But here is the trick to minimize this:
Use a hidden ssid that you did not use before in unhidden state.
The reason: a device that has seen your ssid once, will try to make contact with this name, even if it is hidden.
But if you start with a hidden name that no device in the world has seen before, there will be no intruder-like attempts, and the HD keeps quiet.

Now i can leave the WLAN on all day, go out, and never have the disk spin up by strangers.

Marc

joe12345
03-11-2009, 12:54
My Code:


#!/opt/bin/bash
#Initialize, get state
if wl radio | grep 1 &> /dev/null
then
#radio=off, Powerled on
echo "direction=out" > /proc/miscio/gpio_1_config
echo "0" > /proc/miscio/gpio_1
else
#radio=on, Powerled blinks
echo "direction=out" > /proc/miscio/gpio_1_config
echo "2" > /proc/miscio/gpio_1
fi

#Standard Wlan is off after reboot

if wl radio | grep 1 &> /dev/null
then
wl radio on
#Touch HDD to let it spin up (OPTIONAL)
#touch /opt/bin/radio
#Blink powerled fast
echo "direction=out" > /proc/miscio/gpio_1_config
echo "2" > /proc/miscio/gpio_1
else
wl radio off
#Put powerled on
echo "direction=out" > /proc/miscio/gpio_1_config
echo "0" > /proc/miscio/gpio_1
fi

#loop forever
while true
do
#Check if copy button is pressed
if grep 1 /proc/miscio/gpio_6 &> /dev/null
then
if wl radio | grep 1 &> /dev/null
then
wl radio on
#Touch HDD to let it spin up (OPTIONAL)
#touch /opt/bin/radio
#Blink powerled fast
echo "direction=out" > /proc/miscio/gpio_1_config
echo "2" > /proc/miscio/gpio_1
else
wl radio off
#Put powerled on
echo "direction=out" > /proc/miscio/gpio_1_config
echo "0" > /proc/miscio/gpio_1
fi
fi
#Stay here while copy button is still pressed
while grep 1 /proc/miscio/gpio_6 &> /dev/null
do
echo "Just waiting" > /dev/null
done
sleep 1
done


After reboot wlan is off and if u switch wlan on the hdd DONT spin up.

Joe