Freesmartphone.org Milestone 5 'Calling All Stations' Release

Al Johnson openmoko at mazikeen.demon.co.uk
Wed Feb 4 23:35:40 CET 2009


On Wednesday 04 February 2009, Philip Rhoades wrote:
> Al,
>
> Al Johnson wrote:
> > On Wednesday 04 February 2009, Philip Rhoades wrote:
> >> Thanks for the info but I got stuck trying to run my wlan uptime script
> >> - there is no eth0 and I can't see how to enable wifi on this setup . .
> >
> > You need to use the dbus interface to request the wifi resource.
> > 	http://docs.freesmartphone.org/usage-intro.html
> > If you want to use the cli to enable it you'll need to use
> > SetResourcePolicy to change from 'auto' to 'enabled' to turn it on, then
> > back to 'auto' or 'disabled' to turn it off.
>
> Can you spell out the command and syntax?:
>
> dbus-send ? mdbus ?

Whichever you prefer, but I use mdbus. Beware line wrap below as each mdbus 
command is a single line.

To enable:
mdbus -s org.freesmartphone.usaged /org/freesmartphone/Usage 
org.freesmartphone.Usage.SetResourcePolicy WiFi enabled

To disable:
mdbus -s org.freesmartphone.usaged /org/freesmartphone/Usage 
org.freesmartphone.Usage.SetResourcePolicy WiFi disabled

To set it back to automatic:
mdbus -s org.freesmartphone.usaged /org/freesmartphone/Usage 
org.freesmartphone.Usage.SetResourcePolicy WiFi auto

If you were wanting to enable wifi from within a program that needed WiFi you 
would use the RequestResource when you need it, and ReleaseResource when 
you've finished with it, maintaining the dbus connecton in between.

> Why is this not available from the GUI?

Because it's only just made it into the API for MS5, and nobody has written a 
GUI for it yet. Similarly AFAIK there's no GUI for the connman dbus interface 
yet. Connman is a lightweight alternative to NetworkManager.



More information about the devel mailing list