Talk:Mdbus
From Openmoko
m (→Strange proble) |
Marko Knöbl (Talk | contribs) m (Talk:OpenmokoFramework/mdbus moved to Talk:Mdbus) |
||
(One intermediate revision by one user not shown) | |||
Line 66: | Line 66: | ||
[[User:Dareus|Dareus]] | [[User:Dareus|Dareus]] | ||
+ | |||
+ | |||
+ | I added 2> /dev/null to /usr/bin/dbus-send calls making STDERR go to devnull | ||
+ | |||
+ | my2c | ||
+ | |||
+ | Sten Kvamme |
Latest revision as of 13:07, 26 February 2010
I like tutorials, but I have not found proper place to highlight interesting tutorials:
[edit] making a phone call
(from discussion of Sten Kvamme and Michael 'Mickey' Lauer at devel malinglist)
mdbus -s org.freesmartphone.ogsmd /org/freesmartphone/GSM/Device \ org.freesmartphone.Resource.Enable
This will not work, since mdbus will register to the bus and vanish right afterwards, meaning the resource will be released immediately (if noone else has requested it). Try setting the policy to always-enabled:
mdbus -s org.freesmartphone.ousaged /org/freesmartphone/Usage org.freesmartphone.Usage.SetResourcePolicy "GSM" "enabled"
mdbus -s org.freesmartphone.ogsmd /org/freesmartphone/GSM/Device \ org.freesmartphone.GSM.Device.SetAntennaPower boolean:True mdbus -s org.freesmartphone.ogsmd /org/freesmartphone/GSM/Device \ org.freesmartphone.GSM.Network.Register
mdbus -s org.freesmartphone.ogsmd /org/freesmartphone/Phone \ org.freesmartphone.Phone.CreateCall string:0123456789 \ string:GSM boolean:True
should work -- although I'd rather use the ogsmd subsystem here, in which case it would be:
mdbus -s -org.freesmartphone.ogsmd /org/freesmartphone/GSM/Device \ org.freesmartphone.GSM.Initiate "+49123456789" "voice"
[edit] Realtime clock
#!/usr/bin/env python import dbus import time # Wakeup in 60 seconds wakeuptime=str(time.time()+60) system_bus = dbus.SystemBus() rtc_object = system_bus.get_object('org.freesmartphone.odeviced', '/org/freesmartphone/Device/RealTimeClock/0') rtc_interface = dbus.Interface(rtc_object, dbus_interface='org.freesmartphone.Device.RealTimeClock') rtc_interface.SetWakeupTime(wakeuptime)
[edit] Strange problem
I'm on latest SHR unstable and I'm having some problems using dbus (mdbus too). Every time I mdbus -s something it prints some lines like this
Using **pending_return in dbus_connection_send_with_reply_setup() without pending_setup is deprecated and strongly discouraged
I don't know what to do to keep using mdbus, because this is pretty annoying.
I added 2> /dev/null to /usr/bin/dbus-send calls making STDERR go to devnull
my2c
Sten Kvamme