audio - ofono的DBUS无法与PulseAudio通信

标签 audio bluetooth dbus bluez pulseaudio

我正在尝试将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>

据我了解,pulseaudio和ofono无法通信,尽管我将声音从ofono输出到Pulseaudio。另一个原因可能是pulseaudio是由pulseaudio --start启动的,而其他守护进程是由systemd服务启动的。

稍后,ofono断开连接,甚至蓝牙也断开连接。我怀疑此dbus错误可能是造成此问题的原因。任何指导表示赞赏。

最佳答案

  • 确保已安装ofono
  • 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>
    

    关于audio - ofono的DBUS无法与PulseAudio通信,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52773531/

    相关文章:

    c# - ASIO:缓冲损失

    c# - 使用 Microsoft 认知语音 API 和非麦克风实时音频流进行语音识别

    iphone - iOS 上的蓝牙连接 - 建立连接时应用程序崩溃

    java - 更改蓝牙查询扫描时间

    curl - 错误:longjmp导致未初始化的堆栈帧

    dbus - 为 Qt D-Bus 自省(introspection)定义枚举自定义类型

    vb.net - 将.WAV文件存储在变量中

    python - 使用python从给定的音频文件中检测静音索引

    android - 如何修改 Android 的蓝牙堆栈以启用 A2dp Sink

    linux - Vala DBus 接口(interface)对象我应该如何注册属性更改?