[Om2008.9] How to power off Wifi?

Matthias Apitz guru at unixarea.de
Sat Nov 15 15:06:38 CET 2008


El día Saturday, November 15, 2008 a las 04:13:40AM +0100, "Marco Trevisan (Treviño)" escribió:

> FilipBE wrote:
> > I was able to disable/re-enable wifi with following lines, I did however not
> > have the time to check the impact on battery life....
> > 
> > # using Atheros wmiconfig command to disable wlan 
> > ./wmiconfig -i eth0 --wlan disable
> > 
> > 
> > # To re-enable wlan:
> > ./wmiconfig -i eth0 --wlan enable
> > # set re-association mode 0 :  do send disassoc when reassociation
> > ./wmiconfig -i eth0 --setreassocmode 0
> > # now try to reconnect wlan using gui
> > iwlist eth0 scan 
> 
> Thanks they works well for disabling the interface!
> Have you now done some tests about the impact on the battery life?
> Would you suggest to run the "--wlan disable" command on boot too?
> 
> Btw I was able to re-associate to my AP only once... :(

I have tested it and '--wlan disable' seems to do something with the
interface (look the output of 'iwconfig' after disable/enable) and the
NIC associates always fine again with my AP;

I don't know if it reduces the drawing of power (btw: what is the
easiest method to measure it? pulling out the battery and measure the
power consumption via the cable?);

the small Wifi icon in the top bar never disappears, which let me think
that '--wlan disable' is pretty much useless in this sense of
power-saving;

HIH

	matthias


root at om-gta02:~# iwconfig eth0
eth0      AR6000 802.11g  ESSID:""  
          Mode:Managed  Frequency:2.442 GHz  Access Point: 00:13:F7:0D:08:48   
          Bit Rate=54 Mb/s   Tx-Power=15 dBm   Sensitivity=0/3  
          Retry:on   
          Encryption key:off
          Power Management:off
          Link Quality:206/94  Signal level:-145 dBm  Noise level:-96 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

root at om-gta02:~# ./wmiconfig -i eth0 --wlan disable
root at om-gta02:~# iwconfig eth0
eth0      no wireless extensions.

root at om-gta02:~# ./wmiconfig -i eth0 --wlan enable 
root at om-gta02:~# iwconfig eth0
eth0      AR6000 802.11g  ESSID:""  
          Mode:Managed  Bit Rate:54 Mb/s   Tx-Power=15 dBm   Sensitivity=0/3  
          Retry:on   
          Encryption key:off
          Power Management:off
          Link Quality:206/94  Signal level:-145 dBm  Noise level:-96 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

[ifup]

root at om-gta02:~# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.168.2.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0
192.168.0.0     0.0.0.0         255.255.255.0   U         0 0          0 usb0
0.0.0.0         192.168.2.1     0.0.0.0         UG        0 0          0 eth0
root at om-gta02:~# ping 192.168.2.1
PING 192.168.2.1 (192.168.2.1): 56 data bytes
64 bytes from 192.168.2.1: seq=0 ttl=64 time=156.209 ms
64 bytes from 192.168.2.1: seq=1 ttl=64 time=60.389 ms

[ifdown]

root at om-gta02:~# ./wmiconfig -i eth0 --wlan disable
root at om-gta02:~# iwconfig eth0
eth0      no wireless extensions.


root at om-gta02:~# ./wmiconfig -i eth0 --wlan enable 
[ifup]
root at om-gta02:~# ping 192.168.2.1
PING 192.168.2.1 (192.168.2.1): 56 data bytes
64 bytes from 192.168.2.1: seq=0 ttl=64 time=136.065 ms
64 bytes from 192.168.2.1: seq=1 ttl=64 time=55.010 ms
64 bytes from 192.168.2.1: seq=2 ttl=64 time=75.845 ms



-- 
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




More information about the community mailing list