We have moved to a new Sailfish OS Forum. Please start new discussions there.

How to access phone specific behaviour via dbus using the ofono API? [answered]

asked 2014-01-23 13:43:12 +0300

marsch gravatar image

updated 2014-01-23 18:37:01 +0300

Looking after a reliable source for the ofono APIs, I finally got something in my hands that looks quite good (nemomobile-packages/ofono).

However even when trying seemingly obvious stuff like the following, I get an error stating that the method is unknown:

dbus-send --print-reply --system --dest=org.ofono /ril_0 org.ofono.SimManager.GetProperties

Am I doing something fundamentally wrong here? Admittedly, my Jolla currently hasn't a SIM card inserted, nevertheless I wouldn't expect an error message telling me that the GetProperties method is unknown.

Interestingly, querying GetProperties of org.ofono.Modem works without any issues:

dbus-send --print-reply --system --dest=org.ofono /ril_0 org.ofono.Modem.GetProperties

My particular interest goes towards the Powered property of org.ofono.CellBroadcast, as it allows a good guess about the current connectivity. This one doesn't work for me either.

Any hints welcome, maybe I just don't see the obvious.

edit retag flag offensive reopen delete

The question has been closed for the following reason "the question is answered, an answer was accepted" by marsch
close date 2014-01-30 17:34:30.326330


As I just stubled over this, does this line show any effect for anybody when "Powered" has been true before? According to nemomobile/ofono this is a readwrite parameter:

dbus-send --system --type=method_call --dest=org.ofono /ril_0 org.ofono.Modem.SetProperty string:"Powered" variant:boolean:false
marsch ( 2014-02-05 15:07:22 +0300 )edit

2 Answers

Sort by » oldest newest most voted

answered 2014-01-24 13:21:36 +0300

marttipiirainen gravatar image

oFono follows the general D-Bus concept that interfaces can appear and disappear dynamically, as the underlying services become available or not.

When there is no network connection, you are not guaranteed to have a Cell Broadcast interface; when there is no SIM, you are not guaranteed to have a SIM interface; etc.

You can always check from org.ofono.Modem.Interfaces (and listen to changes there) and you're good.

edit flag offensive delete publish link more

answered 2014-01-23 21:07:13 +0300

CsTom gravatar image

What's the problem? Try it with a SIM, perhaps that helps...

$ dbus-send --system --print-reply --dest=org.ofono /ril_0 org.ofono.CellBroadcast.GetProperties
method return sender=:1.5 -> dest=:1.632 reply_serial=2
   array [
      dict entry(
         string "Powered"
         variant             boolean true
      dict entry(
         string "Topics"
         variant             string ""
$ dbus-send --system --print-reply --dest=org.ofono /ril_0 org.ofono.SimManager.GetProperties
method return sender=:1.5 -> dest=:1.634 reply_serial=2
   array [
      dict entry(
         string "Present"
         variant             boolean true
      dict entry(
         string "CardIdentifier"
         variant             string "1234567"
edit flag offensive delete publish link more


I just wouldn't have expected dbus-send mumble stuff about non-existing functions when this isn't the actual problem.

marsch ( 2014-01-23 22:50:25 +0300 )edit

Well if the object (SimManager) is not present then ofc it's methods are not available - thus the error msg.

foss4ever ( 2014-01-24 17:21:47 +0300 )edit

Question tools



Asked: 2014-01-23 13:43:12 +0300

Seen: 4,613 times

Last updated: Jan 24 '14