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 AskUbuntu answer: https://askubuntu.com/questions/831331/failed-to-change-profile-to-headset-head-unit/1236379#1236379
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?
Thanks for your help.
Quoted 13 lines · zoltanmaric(a)pm.me
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 AskUbuntu answer: https://askubuntu.com/questions/831331/failed-to-change-profile-to-headset-head-unit/1236379#1236379
list-modems returns the following output:
[ /phonesim ]
Online = 0
Powered = 0
Lockdown = 0
Emergency = 0
Interfaces =
Features =
Type = hardware
Quoted 4 lines
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):
You are talking to phonesim -- that's software simulator (and quite useful), but it is not your AirPods.
Best regards,
Pavel
Signature · 1 line
http://www.livejournal.com/~pavelmachek
Yes, sorry, I should have been clearer on that. The big picture is that I'm trying to make Ubuntu 20.04 recognise AirPods Pro as a headset, and in trying to do so, I've found this AskUbuntu answer: https://askubuntu.com/questions/831331/failed-to-change-profile-to-headset-head-unit/1236379#1236379
In it, the author suggests that
"My earbuds profiles were A2DP, AVRCP and HFP and no support for HSP. Pulseaudio only supports HSP out-of-the-box. That's why I couldn't switch to HSP/HFP. In order to make HSP/HFP work, you have to enable HFP on pulseaudio which needs ofono."
And later, they suggest:
"Provide phonesim to ofono. In order to make ofono work, you have to provide a modem to it! You can install a modem emulator called phonesim (implemented by ofono) to make it work"
And later yet:
"You might have to first enable the modem by executing enable-modem"
This is why I tried to run enable-modem with phonesim, but I get the error above. Could you please give me some tips to help debug it?
Thanks,
Zoltán