From Openmoko

Jump to: navigation, search

I like tutorials, but I have not found proper place to highlight interesting tutorials:

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 \

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 \
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"

Realtime clock

#!/usr/bin/env python
import dbus
import time
# Wakeup in 60 seconds
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')

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


Sten Kvamme

Personal tools