【问题标题】:org.bluez.error.inprogress error with bluetoothorg.bluez.error.inprogress 蓝牙错误
【发布时间】:2020-10-01 19:30:34
【问题描述】:

我有一个问题,蓝牙连接1-2秒后断开,主端会显示以下错误:

org.bluez.error.inprogress 

追踪到我看到的日志会进入如下func:

un 11 16:23:46 rap bluetoothd[21474]: src/device.c:search_cb() 00:0E:8E:8B:CA:9D: No service update
Jun 11 16:23:46 rap bluetoothd[21474]: src/device.c:device_svc_resolved() /org/bluez/hci0/dev_00_0E_8E_8B_CA_9D err 0
Jun 11 16:23:46 rap bluetoothd[21474]: src/device.c:connect_profiles() /org/bluez/hci0/dev_00_0E_8E_8B_CA_9D (all), client :1.394
...
Jun 11 16:23:49 rap kernel: [12110.003903] bluetooth:l2cap_sock_release:1197: sock 0000000078f38a7c, sk 00000000f306c001
Jun 11 16:23:49 rap  kernel: [12110.003907] bluetooth:l2cap_sock_shutdown:1113: sock 0000000078f38a7c, sk 00000000f306c001
Jun 11 16:23:49 rap kernel: [12110.003910] bluetooth:l2cap_sock_shutdown:1123: Handling sock shutdown
Jun 11 16:23:49 rap kernel: [12110.003913] bluetooth:l2cap_chan_hold:489: chan 0000000093211dd1 orig refcnt 3
Jun 11 16:23:49 rap kernel: [12110.003916] bluetooth:l2cap_sock_shutdown:1132: chan 0000000093211dd1 state BT_CONNECTED
Jun 11 16:23:49 rap kernel: [12110.003921] bluetooth:l2cap_chan_close:732: chan 0000000093211dd1 state BT_CONNECTED
Jun 11 16:23:49 rap  kernel: [12110.003924] bluetooth:l2cap_chan_hold:489: chan 0000000093211dd1 orig refcnt 4
Jun 11 16:23:49 rap kernel: [12110.003930] bluetooth:l2cap_build_cmd:2931: conn 000000003e9a2ca4, code 0x06, ident 0x05, len 4
Jun 11 16:23:49 rap kernel: [12110.003936] bluetooth:l2cap_send_cmd:865: code 0x06

并追溯至 blueZ 中的代码:

static DBusMessage *connect_profiles(struct btd_device *dev, uint8_t bdaddr_type,
                    DBusMessage *msg, const char *uuid)
{
    struct bearer_state *state = get_state(dev, bdaddr_type);
    int err;

    DBG("%s %s, client %s", dev->path, uuid ? uuid : "(all)",
                        dbus_message_get_sender(msg));

    if (dev->pending || dev->connect || dev->browse)
        return btd_error_in_progress(msg);  <------------------ HERE
...
}

我的问题是我是否可以在不添加编辑代码的情况下以某种方式知道哪个条件(待处理/连接/浏览)导致此错误,因为我无权这样做?如果出现这种情况,blueZ 怎么会尝试连接到配置文件?

【问题讨论】:

  • 尝试在另一个终端上运行“btmon”,因为这可能会让您了解正在发生的事情。

标签: linux ubuntu bluetooth bluez


【解决方案1】:

尝试重启蓝牙服务。遇到同样的错误并设法通过重新启动蓝牙服务来解决它。

sudo service restart bluetooth

尝试运行上述命令,看看是否有帮助。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-10-18
    • 2011-07-13
    • 2016-09-28
    • 1970-01-01
    • 1970-01-01
    • 2014-10-24
    相关资源
    最近更新 更多