简体   繁体   English

org.bluez.error.inprogress 蓝牙错误

[英]org.bluez.error.inprogress error with bluetooth

I have an issue where the Bluetooth got disconnected after 1-2s of connection, the master side will show the following error:我有一个问题,蓝牙在连接 1-2 秒后断开,主端会显示以下错误:

org.bluez.error.inprogress 

tracing to the log I saw it will enter the following 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

and tracing to the code in blueZ:并跟踪 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
...
}

My question can I somehow know which condition (pending/connect/browse) is causing this error without adding editing the code as I dont have permission to do that?我的问题是我能以某种方式知道哪个条件(挂起/连接/浏览)导致此错误,而无需添加编辑代码,因为我无权这样做? and how come the blueZ will try to connect to the profile if any of this condition is in progress?如果出现任何这种情况,blueZ 怎么会尝试连接到配置文件?

Try restarting the bluetooth service.尝试重新启动蓝牙服务。 Had an error that said the same and managed to solve it by restarting the bluetooth service.有一个相同的错误并设法通过重新启动蓝牙服务来解决它。

sudo service restart bluetooth

Try running the above command and see if it helps.尝试运行上面的命令,看看它是否有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM