AnsweredAssumed Answered

[Bluez] BLE auto-disconnect after connected a few seconds

Question asked by 铭恒 李 on Apr 22, 2020
Latest reply on Apr 22, 2020 by 铭恒 李

Hi 

I have some troubles when using Bluez but I don't know how to contact the Bluez's author, so I try contacting you to solve this problem.

 

When I use bluetoothctl to connect classic bluetooth( scan->pair->connect, e.g. BT mouse),it works well.

But when I try to connect a BLE device (scan->connect, e.g. BLE heart pressure device),it just can connect on a few seconds then disconnect.

 

After that, I try to update the Bluez(from 5.37 to 5.50), it doesn't work for solving this problem.

 

Here is the output when I connect BLE device:

[bluetooth]# connect 60:64:05:AE:64:B2
Attempting to connect to 60:64:05:AE:64:B2

[ 1400.135723] rtk_btusb: hci0 evt 1

[ 1400.140779] rtk_btusb: btusb_notify : hci0 evt 1
[ 1404.139839] rtk_btusb: update_profile_connection: is_add=1, profile_index=1
[TSB-631]#

[ 1404.155183] rtk_btusb: update_profile_connection: usb_coex_info.profile_bitmap = 2
[CHG] Device 60:64:05:AE:64:B2 Connected: yes

[ 1404.162954] rtk_btusb: update_profile_connection: usb_coex_info.profile_refcount[0] = 0

[ 1404.162325] rtk_btusb: update_profile_connection: usb_coex_info.profile_refcount[1] = 1
94m[TSB-631]#

[ 1404.184793] rtk_btusb: update_profile_connection: usb_coex_info.profile_refcount[2] = 0
[ 1404.194373] rtk_btusb: update_profile_connection: usb_coex_info.profile_refcount[3] = 0
[ 1404.202424] rtk_btusb: update_profile_connection: usb_coex_info.profile_refcount[4] = 0
[ 1404.210512] rtk_btusb: update_profile_connection: usb_coex_info.profile_refcount[5] = 0
[ 1404.218559] rtk_btusb: update_profile_connection: usb_coex_info.profile_refcount[6] = 0
[ 1404.226588] rtk_btusb: update_profile_connection: usb_coex_info.profile_refcount[7] = 0
[ 1404.234628] rtk_btusb: rtk_notify_profileinfo_to_fw, BufferSize is 5
[ 1404.240989] rtk_btusb: rtk_notify_profileinfo_to_fw, NumberOfHandles is 1
[ 1404.247823] rtk_btusb: rtk_notify_profileinfo_to_fw, handle is 10
[ 1404.253945] rtk_btusb: rtk_notify_profileinfo_to_fw, profile_bitmap is 2
[ 1404.260712] rtk_btusb: rtk_notify_profileinfo_to_fw, profile_status is 0
[ 1404.267464] rtk_btusb: rtk_vendor_cmd_to_fw, opcode is 0xfc19
[ 1404.273241] rtk_btusb: in hci_cmd_task, coex_info.num_hci_cmd_packet is 1
[ 1404.280089] rtk_btusb: send cmd to fw, opcode = 0xfc19
[ 1404.285291] rtk_btusb: update_hid_active_state: handle = 10, interval = 0x36
[ 1404.292537] rtk_btusb: rtk_notify_profileinfo_to_fw, BufferSize is 5
[ 1404.299032] rtk_btusb: rtk_notify_profileinfo_to_fw, NumberOfHandles is 1
[ 1404.305847] rtk_btusb: rtk_notify_profileinfo_to_fw, handle is 10
[ 1404.311946] rtk_btusb: rtk_notify_profileinfo_to_fw, profile_bitmap is 12
[ 1404.318759] rtk_btusb: rtk_notify_profileinfo_to_fw, profile_status is 2
[ 1404.325494] rtk_btusb: rtk_vendor_cmd_to_fw, opcode is 0xfc19
[ 1404.331260] rtk_btusb: in hci_cmd_task, coex_info.num_hci_cmd_packet is 0
[ 1404.338110] rtk_btusb: in hci_cmd_task, coex_info.num_hci_cmd_packet is 1
[ 1404.344941] rtk_btusb: send cmd to fw, opcode = 0xfc19
Connection successful
[TSB-631]#

[ 1406.064943] rtk_btusb: update_profile_connection: is_add=0, profile_index=1
[ 1406.071951] rtk_btusb: for test: --, usb_coex_info.profile_refcount[1] = 0
[bluetooth]#

[ 1406.083782] rtk_btusb: update_profile_connection: usb_coex_info.profile_bitmap = 0
[CHG] Device 60:64:05:AE:64:B2 Connected: no

[ 1406.091852] rtk_btusb: update_profile_connection: usb_coex_info.profile_refcount[0] = 0

[ 1406.091937] rtk_btusb: update_profile_connection: usb_coex_info.profile_refcount[1] = 0

4m[bluetooth]#

[ 1406.113534] rtk_btusb: update_profile_connection: usb_coex_info.profile_refcount[2] = 0
[ 1406.124231] rtk_btusb: update_profile_connection: usb_coex_info.profile_refcount[3] = 0
[ 1406.132260] rtk_btusb: update_profile_connection: usb_coex_info.profile_refcount[4] = 0
[ 1406.141209] rtk_btusb: update_profile_connection: usb_coex_info.profile_refcount[5] = 0
[ 1406.149290] rtk_btusb: update_profile_connection: usb_coex_info.profile_refcount[6] = 0
[ 1406.157413] rtk_btusb: hci0 evt 2
[ 1406.160774] rtk_btusb: btusb_notify : hci0 evt 2
[ 1406.165898] rtk_btusb: update_profile_connection: usb_coex_info.profile_refcount[7] = 0
[ 1406.173951] rtk_btusb: rtk_notify_profileinfo_to_fw, BufferSize is 2
[ 1406.180328] rtk_btusb: rtk_notify_profileinfo_to_fw, NumberOfHandles is 0
[ 1406.187146] rtk_btusb: rtk_notify_profileinfo_to_fw, profile_status is 0
[ 1406.193881] rtk_btusb: rtk_vendor_cmd_to_fw, opcode is 0xfc19
[ 1406.199653] rtk_btusb: in hci_cmd_task, coex_info.num_hci_cmd_packet is 1
[ 1406.206497] rtk_btusb: send cmd to fw, opcode = 0xfc19

 

——————————————————————————————————

It can keep the connection 5~20 seconds. 

I'm using IMX6DL, kernel 4.1.15 (fsl-img-qt5)

What should I do ?

 

Regards

Mihan

Outcomes