Created
August 19, 2020 06:32
-
-
Save pbzweihander/6e9ca7dd62d1d783dc0d67316361c8e1 to your computer and use it in GitHub Desktop.
Enable phonesim to use bluetooth headset's mic (e.g. AirPods Pro)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Use i3-msg or something that can spawn to background | |
i3-msg exec "phonesim -p 12345 /usr/share/phonesim/default.xml" | |
sudo systemctl start ofono.service | |
dbus-send --print-reply --system --dest=org.ofono /phonesim org.ofono.Modem.SetProperty string:"Powered" variant:boolean:true | |
dbus-send --print-reply --system --dest=org.ofono /phonesim org.ofono.Modem.SetProperty string:"Online" variant:boolean:true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm getting the same error. I'm trying to make my bluetooth mic work and I saw that it can be done with ofono. However, I can't run the enable-modem or any of the other scripts. I followed this procedure to try and configure ofono but I can't get it to work. I've been surfing around the web to find and solution but couldn't find many threads concerning this issue.
I launched :
ofono-phonesim -p 12345 /usr/share/phonesim/default.xml & and I can see that it's running in the background
ps:
3228 pts/0 00:00:00 ofono-phonesim
I'm still getting the same error:
Connecting modem /phonesim...
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/dbus/bus.py", line 175, in activate_name_owner
return self.get_name_owner(bus_name)
File "/usr/lib/python3/dist-packages/dbus/bus.py", line 361, in get_name_owner
's', (bus_name,), **keywords)
File "/usr/lib/python3/dist-packages/dbus/connection.py", line 651, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NameHasNoOwner: Could not get owner of name 'org.ofono': no such name
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "./enable-modem", line 17, in
modem = dbus.Interface(bus.get_object('org.ofono', path),
File "/usr/lib/python3/dist-packages/dbus/bus.py", line 241, in get_object
follow_name_owner_changes=follow_name_owner_changes)
File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 248, in init
self._named_service = conn.activate_name_owner(bus_name)
File "/usr/lib/python3/dist-packages/dbus/bus.py", line 180, in activate_name_owner
self.start_service_by_name(bus_name)
File "/usr/lib/python3/dist-packages/dbus/bus.py", line 278, in start_service_by_name
'su', (bus_name, flags)))
File "/usr/lib/python3/dist-packages/dbus/connection.py", line 651, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.ServiceUnknown: The name org.ofono was not provided by any .service files