According to the documentation of ofono 1.17:
https://github.com/rilmodem/ofono/tree/master/doc
There are two interfaces for handsfree:
- org.ofono.Handsfree
- org.ofono.HandsfreeAudioManager
I need to access them in order to get pulseaudio working. It returns this error:
E: [pulseaudio] backend-ofono.c: Failed to register as a handsfree audio agent with ofono: org.freedesktop.DBus.Error.UnknownMethod: Method "Register" with signature "oay" on interface "org.ofono.HandsfreeAudioManager" doesn't exist
But that method exists (according to the docs above) and has that signature: object path, array{byte}.
Thus I guess it's not accessible rather than does not exist. I wrote a simple Python script to list the available services and org.ofono is there.
Then I added the code to list the objects:
def list_obj(bus, service, object_path):
print(object_path)
obj = bus.get_object(service, object_path)
iface = dbus.Interface(obj, 'org.freedesktop.DBus.Introspectable')
xml_string = iface.Introspect()
for child in ElementTree.fromstring(xml_string):
if child.tag == 'node':
if object_path == '/':
object_path = ''
new_path = '/'.join((object_path, child.attrib['name']))
list_obj(bus, service, new_path)
bus = dbus.SystemBus()
list_obj(bus, 'org.ofono.HandsfreeAudioManager', '/')
But I get the following errors:
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.ofono.HandsfreeAudioManager': no such name
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.ofono.HandsfreeAudioManager was not provided by any .service files
I also checked the user policies for dbus, in /etc/dbus-1/system.d/ofono.conf:
<policy user="user">
<allow own="org.ofono"/>
<allow send_destination="org.ofono"/>
<allow send_interface="org.ofono.SimToolkitAgent"/>
<allow send_interface="org.ofono.PushNotificationAgent"/>
<allow send_interface="org.ofono.SmartMessagingAgent"/>
<allow send_interface="org.ofono.PositioningRequestAgent"/>
<allow send_interface="org.ofono.HandsfreeAudioManager"/>
<allow send_interface="org.ofono.Handsfree"/>
</policy>
<policy at_console="true">
<allow send_destination="org.ofono"/>
</policy>
<policy context="default">
<deny send_destination="org.ofono"/>
</policy>
Of course I run ofono and the code above as user "user". I'm running out of ideas... what should I do further to fix the problem?