Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Bluetooth disconnects just after connecting
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
muoji
n00b
n00b


Joined: 03 Jul 2016
Posts: 6

PostPosted: Sun Jul 03, 2016 5:39 pm    Post subject: Bluetooth disconnects just after connecting Reply with quote

Hello everyone

I'm having some issues with bluetooth: I can pair & trust devices, but when I try to connect to the device, it indicates that it managed to connect, but after a few seconds, it disconnects. I have been trying with both a PS4 controller and a bluetooth headset, and I can't get any of those to work.

I've tried using bluetoothctl & blueman, but it doesn't seem to change anything. I have bluez 5.39 installed, and my system is up to date. I've followed the instructions on the wiki (both to set up bluetooth & to connect to the controller/headset), and everything seems to work (I can see devices when I'm scanning, the pair & trust process doesn't give me any error), but nothing seems to be able to stay connected for more than a few seconds.


Can someone help me with that? I've spent hours trying to figure what's wrong, but nothing I found seems to work…

Thanks!
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1366
Location: Montréal

PostPosted: Sun Jul 03, 2016 7:30 pm    Post subject: Reply with quote

All Bluetooth sound devices are manage by Pulseaudio since Bluez 5 do not support Alsa anymore. So, you need to have Pulseaudio installed and started by the user who is in X session, it should be done automatically, because Pulseaudio is a per user graphical sound server by default.

Have Pavucontrol installed too to manage Pulseaudio. It will show you which sound cards are present including Bluetooth connected headsets, etc.
_________________
Paul
Back to top
View user's profile Send private message
muoji
n00b
n00b


Joined: 03 Jul 2016
Posts: 6

PostPosted: Sun Jul 03, 2016 8:42 pm    Post subject: Reply with quote

I have pulseaudio & pavucontrol, and they're compiled with bluetooth support, but the headset doesn't stay connected. I think the issue is with bluetooth, since pulseaudio works correctly & the ps4 controller works correctly when connected via usb, but I can't find what the issue is and how to solve it.
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1366
Location: Montréal

PostPosted: Mon Jul 04, 2016 8:31 am    Post subject: Reply with quote

Do you have the firmware files available to the module who drive the bluetooth device at the time it probe it? Again, if the bluetooth support is in the kernel image, the appropriate firmware files must be in the kernel image too. Same thing for an initramfs who include the bluetooth support, firmware files must be there.
_________________
Paul
Back to top
View user's profile Send private message
muoji
n00b
n00b


Joined: 03 Jul 2016
Posts: 6

PostPosted: Mon Jul 04, 2016 9:31 am    Post subject: Reply with quote

How do I check that? I built bluetooth as a module, and I made sure to follow the same kernel configuration as the one showed on the wiki.
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1366
Location: Montréal

PostPosted: Mon Jul 04, 2016 2:53 pm    Post subject: Reply with quote

If it is a Usb dongle you can know which modules drive your Bluetooth device with the command
Code:
lsusb -vvv | less

or with
Code:
lsusb -t

It is generally the module btusb who basically drive a Usb Bluetooth dongle. But btusb depend on several modules. One of those, btintel, need the firmware files /lib/firmware/intel/ibt-11-5.ddc and /lib/firmware/intel/ibt-11-5.sfi. Check with
Code:
lsmod | grep bt

which modules are implies to drive your Usb Bluetooth dongle. In the same way, if you need the ath3k module for Bluetooth, this module need the firmware file /usr/lib/firmware/ath3k-1.fw.
If it is a Pci device the principles are the same, find with the command
Code:
lspci -vvv | less

which module drive the Bluetooth device, check it's modules dependancies and be sure that all firmware files are available. When Bluetooth support is in modules, the firmware files need only to be in /lib/firmware directory of the root partition, not in the kernel image or the initramfs, unless you include Bluetooth modules in the initramfs.

Tell us the output of your Bluetooth device given by lsusb or lspci, it will help.
_________________
Paul
Back to top
View user's profile Send private message
muoji
n00b
n00b


Joined: 03 Jul 2016
Posts: 6

PostPosted: Mon Jul 04, 2016 3:10 pm    Post subject: Reply with quote

The files were missing, I emerged linux-firmware and now I have them. (is this the best way to do it?) I'm not home right now, so I can't check if bluetooth works now, but it seems to be a huge step in the right direction! I'll check if it works correctly in a couple of hours. Thank you for your help!

Edit: it's still not working, but I just noticed in dmesg that the bluetooth module failed to load a broadcom firmware (bcm20702A1-0b05-17cb.hcd). The file is indeed missing, and I don't know where I'm supposed to get it. I found a post talking about this issue, with a link to the .hcd file, but it doesn't seem to be the correct file since I get errors in dmesg when trying to do hciconfig hci0 up. (hci0 command 0x0c03 tx timeout)
Back to top
View user's profile Send private message
muoji
n00b
n00b


Joined: 03 Jul 2016
Posts: 6

PostPosted: Mon Jul 04, 2016 5:58 pm    Post subject: Reply with quote

I found this guide: http://askubuntu.com/questions/632336/bluetooth-broadcom-43142-isnt-working-on-ubuntu/632348#632348, and followed its instructions. The firmware seems to work correctly, I don't have any error in dmesg when bringing hci0 up.

My bluetooth headset is working correctly now, but my ps4 controller still doesn't work. I can connect it once, after doing the pairing process all over again, but it doesn't seem to be detected. If I disconnect it, every time I reconnect it, it disconnects a few seconds later.
Back to top
View user's profile Send private message
muoji
n00b
n00b


Joined: 03 Jul 2016
Posts: 6

PostPosted: Wed Jul 06, 2016 6:22 pm    Post subject: Reply with quote

I still have this issue. I can't find anything online that works. I have no idea where to look to get more information on what's going wrong. dmesg doesn't display anything when I connect my controller, and bluetoothd only tells me that my controller did disconect, but not why. Here's what I get when I start it directly in a terminal:

Code:

bluetoothd[2313]: src/adapter.c:connected_callback() hci0 device 1C:96:5A:9D:86:8C connected eir_len 5
bluetoothd[2313]: profiles/input/server.c:connect_event_cb() Incoming connection from 1C:96:5A:9D:86:8C on PSM 17
bluetoothd[2313]: profiles/input/device.c:input_device_set_channel() idev 0x55edeeae89f0 psm 17
bluetoothd[2313]: profiles/input/server.c:confirm_event_cb()
bluetoothd[2313]: profiles/input/server.c:connect_event_cb() Incoming connection from 1C:96:5A:9D:86:8C on PSM 19
bluetoothd[2313]: profiles/input/device.c:input_device_set_channel() idev 0x55edeeae89f0 psm 19
bluetoothd[2313]: profiles/input/device.c:ctrl_watch_cb() Device 1C:96:5A:9D:86:8C disconnected
bluetoothd[2313]: profiles/input/device.c:intr_watch_cb() Device 1C:96:5A:9D:86:8C disconnected
bluetoothd[2313]: profiles/input/device.c:input_device_enter_reconnect_mode() path=/org/bluez/hci0/dev_1C_96_5A_9D_86_8C reconnect_mode=device
bluetoothd[2313]: src/adapter.c:dev_disconnected() Device 1C:96:5A:9D:86:8C disconnected, reason 2
bluetoothd[2313]: src/adapter.c:adapter_remove_connection()
bluetoothd[2313]: plugins/policy.c:disconnect_cb() reason 2
bluetoothd[2313]: src/adapter.c:bonding_attempt_complete() hci0 bdaddr 1C:96:5A:9D:86:8C type 0 status 0xe
bluetoothd[2313]: src/device.c:device_bonding_complete() bonding (nil) status 0x0e
bluetoothd[2313]: src/device.c:device_bonding_failed() status 14
bluetoothd[2313]: src/adapter.c:resume_discovery()


It doesn't look like there's any issue, but I find it weird that there are two connections from the controller.

If anyone has any idea, I'd be happy to hear them…
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1366
Location: Montréal

PostPosted: Wed Jul 06, 2016 6:52 pm    Post subject: Reply with quote

If your headsets work and you can listen to something using them and Pulseaudio see them, can change the volume and manage this Bluetooth sound card, it may be the Ps4 who disconnect first.

I don't use Ps4 but, try to connect to it alone with no else Bluetooth devices connected or even up. The connection can be initiate by both end. Try both if you need. Be sure your Broadcom Bluetooth Usb dongle is visible.
_________________
Paul
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum