我正在尝试将ofono-1.18和pulseaudio-12.0设置为bluez-5.50,以便处理通过蓝牙的电话。但是,我在dbus-monitor上遇到以下问题。
error time=1539324786.794398 sender=org.freedesktop.DBus -> destination=:1.28 error_name=org.freedesktop.DBus.Error.AccessDenied reply_serial=23
string "Rejected send message, 1 matched rules; type="method_return", sender=":1.28" (uid=0 pid=22288 comm="pulseaudio --realtime ") interface="(unset)" member="(unset)" error name="(unset)" requested_reply="0" destination=":1.25" (uid=0 pid=22285 comm="/usr/sbin/ofonod -d -n ")"
我的/etc/dbus-1/system.conf如下:
<policy user="root">
<allow own="org.pulseaudio"/>
<allow own="org.pulseaudio.Server"/>
<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.HandsfreeAudioAgent"/>
<allow own="org.bluez"/>
<allow send_destination="org.bluez"/>
<allow send_interface="org.bluez.Agent1"/>
<allow send_interface="org.bluez.MediaEndpoint1"/>
<allow send_interface="org.bluez.MediaPlayer1"/>
<allow send_interface="org.bluez.ThermometerWatcher1"/>
<allow send_interface="org.bluez.AlertAgent1"/>
<allow send_interface="org.bluez.Profile1"/>
<allow send_interface="org.bluez.HeartRateWatcher1"/>
<allow send_interface="org.bluez.CyclingSpeedWatcher1"/>
<allow send_interface="org.bluez.GattCharacteristic1"/>
<allow send_interface="org.bluez.GattDescriptor1"/>
<allow send_interface="org.freedesktop.DBus.ObjectManager"/>
<allow send_interface="org.freedesktop.DBus.Properties"/>
</policy>
据我了解,尽管我获得了从onono到Pulseaudio的声音输出,但是pulseaudio和ofono无法通信。另一个原因可能是pulseaudio是由pulseaudio --start启动的,而其他守护进程是由systemd服务启动的。
过一会儿,ofono会断开连接,甚至蓝牙也会断开连接。我怀疑此dbus错误可能是造成此问题的原因。任何指导表示赞赏。
答案 0 :(得分:-1)
sudo apt-get install ofono
确保已创建pulse
个用户,并且该用户属于bluetooth
组的一部分
授予权限,将其添加到/etc/dbus-1/system.d/ofono.conf
(在<busconfig></busconfig>
内部):
<policy user="pulse">
<allow send_destination="org.ofono"/>
</policy>