[Om2008.9] How to power off Wifi?

Matthias Apitz guru at unixarea.de
Mon Nov 17 15:38:54 CET 2008

El día Monday, November 17, 2008 a las 03:19:32PM +0100, "Marco Trevisan (Treviño)" escribió:

> Matthias Apitz wrote:
> > for now I've tested it with your "battery.py", here are the numbers:
> > 
> >     181 mA  -- nearly empty FR (only "battery.py" and Terminal running)
> >     231 mA  -- after launch of GPSD
> >     183 mA  -- after stop of GPSD
> > 189-232 mA  -- after Wifi-up with, running 'ping' through eth0
> > 184-186 mA  -- after Wifi-down
> > 
> > For me this reads that the Wifi chip is already powered-up on boot; the
> > diff between before (181) and after using it (184-186) is not very big;
> > right?
> What do you mean for "Wifi-down"? Using ifconfig (ifdown) or using the
> wmiconfig tool?

I don't use the 'wmiconfig tool'; I have two desktop application
templates which toggle an desktop icon between UP and DOWN and in which
a sequence of commands are fired up to bring Wifi UP or DOWN; this works
*very* reliable in the sense of bringing Wifi UP or DOWN, associating,
getting IP via DHCP and so on;

> BTW the major wifi power consumption, if it has been turned on, happens
> while the phone is suspended. Sometimes I've left my phone in suspend
> with full battery and wifi on (I mean, after I disassociated it from an
> AP) and in few hours the battery was drained...

I can't comment on this because I don't use suspend mode; maybe one
could measure the drain of power with a special USB cable while the
battery is pulled out...

Matthias Apitz
Manager Technical Support - OCLC GmbH
Gruenwalder Weg 28g - 82041 Oberhaching - Germany
t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211
e <matthias.apitz at oclc.org> - w http://www.oclc.org/ http://www.UnixArea.de/
b http://gurucubano.blogspot.com/
A computer is like an air conditioner, it stops working when you open Windows
Una computadora es como aire acondicionado, deja de funcionar si abres Windows
-------------- next part --------------
[Desktop Entry]
Comment=Bring Wifi down with ifdown eth0
Exec=xterm -e "ifdown eth0 ; sleep 5 ; cp /usr/share/applications/Wifi-up.desktop.tmpl /usr/share/applications/Wifi.desktop"
-------------- next part --------------
[Desktop Entry]
Comment=Bring Wifi up with ifup eth0
Exec=xterm -e "ifdown eth0 ; iwconfig eth0 txpower auto channel 1 ; killall wpa_supplicant ; killall udhcp ; ifup eth0 ; sleep 20 ; cp /usr/share/applications/Wifi-down.desktop.tmpl /usr/share/applications/Wifi.desktop"

More information about the community mailing list