On Mon, 04 Aug 2008 02:07:07 +0200 Timo Drick <[EMAIL PROTECTED]> wrote:
> Hi Mickey, > > i used the dbus system to turn on bluetooth: > (mdbus -s org.freesmartphone.frameworkd > /org/freesmartphone/Device/PowerControl/Bluetooth > org.freesmartphone.Device.PowerControl.SetPower 1) Yeah you need to request the Resource from the Usage daemon. It will keep track of users and activate/deactivate the resource accordingly. What you need to do is issue mdbus -s org.freesmartphone.frameworkd /org/freesmartphone/Usage org.freesmartphone.Usage.RequestResource "Bluetooth" ReleaseResource frees the resource again. Be aware, though that the usage daemon tracks dbus users, so as soon as mdbus drops off the bus ousaged sees that and concludes that you don't need bluetooth any more. :-) This is necessary for correct refcounting when applications crash or forget to release the resource. You can also SetResourcePolicy "Bluetooth" "on" which will keep bluetooth on at all times. "off" will not activate a resource, even if requested and "auto" is the default behaviour. Regards, Daniel Willmann
signature.asc
Description: PGP signature
_______________________________________________ devel mailing list [email protected] https://lists.openmoko.org/mailman/listinfo/devel
