[FSO M5] Enable Wlan

Steve " 'dillo" Okay armadilo at roadknightlabs.com
Tue Mar 10 16:36:09 CET 2009


On Mar 10, 2009, at 03:30 , Richard Kralovic wrote:

>> I read somewhere that i must enable with framework? But how i can  
>> do this?
>
> You need to request the wlan resource, e.g. by calling
>
> mdbus -s org.freesmartphone.ousaged /org/freesmartphone/Usage
> org.freesmartphone.Usage.SetResourcePolicy WiFi enabled


I ran into this when I first migrated from the OM2008.12 to FSO 5.
Here's a short script I wrote to handle this situation:
#!/bin/sh
while getopts "uds" parm
do
         case $parm in
                 d)  mdbus -s org.freesmartphone.ousaged \
                     /org/freesmartphone/Usage  
org.freesmartphone.Usage.SetResourcePolicy WiFi disabled;
                     mdbus -s org.freesmartphone.ousaged \
                     /org/freesmartphone/Usage  
org.freesmartphone.Usage.GetResourceState WiFi ;;
                 s)  mdbus -s org.freesmartphone.ousaged \
                     /org/freesmartphone/Usage  
org.freesmartphone.Usage.GetResourceState WiFi ;;
                 u)  mdbus -s org.freesmartphone.ousaged \
                     /org/freesmartphone/Usage  
org.freesmartphone.Usage.SetResourcePolicy WiFi enabled;
                     mdbus -s org.freesmartphone.ousaged \
                     /org/freesmartphone/Usage  
org.freesmartphone.Usage.GetResourceState WiFi ;;
         esac
done
shift $(($OPTIND - 1))


The flags are -(d)own -(s)tatus -(u)p , respectively.
HTH,
----Steve




More information about the community mailing list