ofono enable-modem fails with dbus.exceptions.DBusException: org.ofono.Error.Failed: Operation failed

I'm trying to make Ubuntu 20.04 recognise AirPods Pro as a headset (not just as headphones). I tried to follow the instructions in this answer.

list-modems returns the following output:

[ /phonesim ] Online = 0 Powered = 0 Lockdown = 0 Emergency = 0 Interfaces = Features = Type = hardware

But when I try to run the enable-modem command from a freshly checked-out ofono git repo (commit 285fad8f39d46a5f0a0f9d194789978227558d1e), I get the following error:

Connecting modem /phonesim...
Traceback (most recent call last): File "./enable-modem", line 20, in <module> modem.SetProperty("Powered", dbus.Boolean(1), timeout = 120) File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 72, in __call__ return self._proxy_method(*args, **keywords) File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 141, in __call__ return self._connection.call_blocking(self._named_service, File "/usr/lib/python3/dist-packages/dbus/connection.py", line 652, in call_blocking reply_message = self.send_message_with_reply_and_block(
dbus.exceptions.DBusException: org.ofono.Error.Failed: Operation failed

What does the error mean, and how could I get around it?

1 Answer

The problem was that I didn't leave phonesim running, which is why enable-modem was complaining.

So the command

ofono-phonesim -p 12345 /usr/share/phonesim/default.xml

needs to be left running before running enable-modem. See my answer here on how to automate this:

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like