On Friday 27 August 2010, Davide Scaini wrote: > Il giorno ven, 27/08/2010 alle 00.41 +0200, Joachim Ott ha scritto: > > 2010/8/27 Davide Scaini <[email protected]>: > > > Il giorno gio, 26/08/2010 alle 17.23 +0100, Al Johnson ha scritto: > > >> On Thursday 26 August 2010, Joachim Ott wrote: > > >> > On 26 August 2010 16:53, Davide Scaini <[email protected]> wrote: > > >> > > ok myidea was something like > > >> > > fsoraw -r WiFi -- sleep 20m > > >> > > i just want it up :) > > >> > > this is not nice but it works (as far as i get another time illume > > >> > > working) so thanks for the hint :) > > >> > > > >> > mdbus2 -s org.freesmartphone.ousaged /org/freesmartphone/Usage > > >> > org.freesmartphone.Usage.RequestResource WiFi > > >> > > > >> > and later > > >> > > > >> > mdbus2 -s org.freesmartphone.ousaged /org/freesmartphone/Usage > > >> > org.freesmartphone.Usage.ReleaseResource WiFi > > >> > > >> This won't work because as soon as mdbus exits the resource will be > > >> released. the fsoraw wrapper was written to get round exactly this > > >> problem. > > >> > > >> The other way is to use > > >> > > >> mdbus2 -s org.freesmartphone.ousaged > > >> /org/freesmartphone/Usageorg.freesmartphone.SetResourcePolicy WiFi > > >> enabled > > >> > > >> That's what the settings app does for manual,on. replace 'enabled' > > >> with 'auto' and you're back to automatic, or 'disabled' to force it > > >> off. > > > > > > Thanks! > > > last question: this was what I used in my scripts... but as far as i > > > can see there's no mdbus in latest shr-u-lite... just need to install > > > it? or I can do similar things with "plain" dbus? > > > > mdbus2 > > hehe there's neither mdbus2 ... ;)
mdbus2 is present in the full shr-u. 'opkg install mdbus2' should get it installed on the lite version. You can use dbus-send to do the same things, but the syntax isn't quite as simple. On the rare occasions I use it I have to refer to the documentation. mdbus2 is a vala reimplementation of the python mdbus, so doesn't suffer from the python loading overhead. That makes mdbus2 about as suitable for use in scripts as dbus-send. _______________________________________________ Shr-User mailing list [email protected] http://lists.shr-project.org/mailman/listinfo/shr-user
