Page 1 of 1

atheros wireless- how to turn it off

Posted: Fri Oct 14, 2005 7:28 am
by magneto
Hi,

I have a t43p with a atheros wireless andI am trying to find a safe way to turn off the wireless card. I have found this script that puts 3 to the power state and turn it off (I think..):

#!/bin/bash
# Find and enable/disable wireless devices

for DEVICE in /sys/class/net/*; do
if [ -d $DEVICE/wireless ]; then
# $DEVICE is a wireless device. Check if it's powered on:
if [ `cat $DEVICE/device/power/state` = 0 ]; then
# It's powered on. Switch it off.
ifdown ath0
echo -n 3 > $DEVICE/device/power/state;
else
# It's powered off. Switch it on.
echo -n 0 > $DEVICE/device/power/state;
fi
fi
done

Or another alternative is to remove ath modules. But I don't know if I remove them (ath_pci, ath_rate_onoe and wlan) the card is turned off.

Do anyone uses atheros wireless and how you turn it off??

Thanks....

Posted: Mon Oct 17, 2005 11:15 pm
by rossman
Fn F5

or

in terminal: sudo ifdown ath0

T42 2373-3UU, Ubuntu Hoary

Posted: Tue Oct 18, 2005 3:02 am
by magneto
Fn F5 doesn't work for wireless (for me). It only switch on/off bluetooth. And ifdown turns off only the interface not the card. The card still consumes energy even the interface is shutted down.

Posted: Tue Oct 18, 2005 10:49 am
by kaiser
What OS are you using? SuSE 9.3?
i can only speak for Ubuntu on a T42, the Fn+F5-Combi is bound by default to a script switching the state of BT and WLAN together.

And it seems to work (at least if i can trust the WLAN-LED). The Script controlling WLAN is exactly what you quoted.

Posted: Tue Oct 18, 2005 12:05 pm
by magneto
Yes, I forgot to mention. I'm using suse 9.3 .

I wonder if it's safe to use that script. I think it shuts down directly the card. Is it safe to use??

Posted: Tue Oct 18, 2005 12:31 pm
by rossman
Seems like for everone else but me Fn F5 controls BT. I don't know why. Kaiser and I went around about this in another post awhile back. My wireless light goes out when I ifdown ath0. But that may not mean squat. Seems the battery last much longer though...
magneto wrote:Fn F5 doesn't work for wireless (for me). It only switch on/off bluetooth. And ifdown turns off only the interface not the card. The card still consumes energy even the interface is shutted down.