| Thread Previous • Date Previous • Date Next • Thread Next |
Klaus Addicks schrieb:
I just use these scripts for (de)activating wwan card (using Eva's Module): wwan-on: echo 1 > /sys/devices/platform/sony-laptop/wwanpower echo 1 > /sys/class/rfkill/rfkill2/state wwan-off: echo 0 > /sys/class/rfkill/rfkill2/state echo 0 > /sys/devices/platform/sony-laptop/wwanpower
I recommend not using rfkill numbers directly, as they may vary. In my scripts I use this function:
#----------------------------------------
function getStateFile
{
local f
for f in /sys/class/rfkill/*
do
[[ $(<$f/name) == $1 ]] &&
{
echo $f/state
return 0
}
done
echo "State file for $1 unknown" >&2
return 1
}
#----------------------------------------
Examples:
echo 1 > $(getStateFile sony-wwan) # wwan on
echo 0 > $(getStateFile sony-wifi) # wlan off
echo 0 > $(getStateFile sony-bluetooth) # bluetooth off
AFAIK wwanpower is no longer needed.
Regards,
Bernd
--
Bernd Eggink
http://sudrala.de
| Thread Previous • Date Previous • Date Next • Thread Next |