我正在尝试让 Ubuntu 20.04 将 AirPods Pro 识别为耳机(而不仅仅是耳机)。我尝试按照这个答案。
list-modems
返回以下输出:
[ /phonesim ]
Online = 0
Powered = 0
Lockdown = 0
Emergency = 0
Interfaces =
Features =
Type = hardware
但是,当我尝试enable-modem
从刚刚签出的ofono
git repo(提交 285fad8f39d46a5f0a0f9d194789978227558d1e)运行命令时,出现以下错误:
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
这个错误是什么意思?我该如何解决它?
答案1
问题是我没有停止phonesim
跑步,这就是enable-modem
我抱怨的原因。
因此命令
ofono-phonesim -p 12345 /usr/share/phonesim/default.xml
需要在运行之前保持运行enable-modem
。请参阅我的回答,了解如何自动执行此操作:https://askubuntu.com/a/1278587/119592