Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

unable to connect to Bluetooth speaker running Debian 9

Need help with peripherals or devices?
Post Reply
Message
Author
User avatar
extraspecialbitter
Posts: 55
Joined: 2007-03-28 16:55
Location: Cape Cod, MA

unable to connect to Bluetooth speaker running Debian 9

#1 Post by extraspecialbitter »

I posted on this topic previously when I was running Debian 8 (see http://forums.debian.net/viewtopic.php?f=7&t=135706, but I recently upgraded to Debian 9 with a fresh install. After ensuring that I had all of the appropriate applications - including the vendor's firmware - I'm finding myself stuck. I'm trying to connect to a Bose Soundlink Color II speaker via Bluetooth, using a USB dongle manufactured by Plugable. I bought it largely because it was known to be Linux-friendly, and indeed, after a little bit of tinkering, I was able to make consistent use of it... until the upgrade.

Trying to connect via blueman-applet, I get a failure after a wait of several seconds.

Here's what I see using bluetoothctl:

Code: Select all

[bluetooth]# pair 2C:41:A1:65:81:CC 
Attempting to pair with 2C:41:A1:65:81:CC
Failed to pair: org.bluez.Error.ConnectionAttemptFailed
Using hcitool, I encountered the same lag, but with a different error:

Code: Select all

pablo@riverview=> sudo hcitool cc 2C:41:A1:65:81:CC
Can't create connection: Input/output error
Given that Debian 9 is relatively new, are there some issues with Bluetooth support that might be causing this issue?

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

Re: unable to connect to Bluetooth speaker running Debian 9

#2 Post by pylkko »

are you using GNOME or not? because there is a GNOME bug where the DM steals the bluetooth audio device.

have you tried making the connection using bluetoothctl. unapir and unconnect everyhing. Then put the device into connection mode and use bluetoothctl to try to connect (do not pair). Wait for 10 secs or so because bluetooth is slow to connect. If you get a failure message check the logs.

I wonder why so many people use blueman? The amount of bugs and problems it has, I never use it.

User avatar
extraspecialbitter
Posts: 55
Joined: 2007-03-28 16:55
Location: Cape Cod, MA

Re: unable to connect to Bluetooth speaker running Debian 9

#3 Post by extraspecialbitter »

pylkko wrote:are you using GNOME or not? because there is a GNOME bug where the DM steals the bluetooth audio device.

have you tried making the connection using bluetoothctl. unapir and unconnect everyhing. Then put the device into connection mode and use bluetoothctl to try to connect (do not pair). Wait for 10 secs or so because bluetooth is slow to connect. If you get a failure message check the logs.

I wonder why so many people use blueman? The amount of bugs and problems it has, I never use it.
Thank you for the reply. I'm using Openbox as a Window Manager, and in general I try to stay away from the relative bloat of GNOME and KDE.

I tried to connect without pairing in bluetoothctl, and initially it appeared to work.

Code: Select all

[bluetooth]# connect 2C:41:A1:65:81:CC
Attempting to connect to 2C:41:A1:65:81:CC
[CHG] Device 2C:41:A1:65:81:CC Connected: yes
Connection successful
[NEW] Primary Serviceaker]# 
	/org/bluez/hci0/dev_2C_41_A1_65_81_CC/service0001
	0000febe-0000-1000-8000-00805f9b34fb
	Bose Corporation
Despite the apparent "connection", the bluetooth device didn't show up as a Playback or Output Device option in pavucontrol, so the speaker never activated. After exiting bluetoothctl and trying again, I saw a less promising error:

Code: Select all

[bluetooth]# connect 2C:41:A1:65:81:CC
Attempting to connect to 2C:41:A1:65:81:CC
Failed to connect: org.bluez.Error.Failed
Attempts to pair threw the same error as before:

Code: Select all

[bluetooth]# pair 2C:41:A1:65:81:CC
Attempting to pair with 2C:41:A1:65:81:CC
Failed to pair: org.bluez.Error.ConnectionAttemptFailed
I'm with you on Blueman. It looks a bit cartoonish and never seems to work. On the other hand, I'd use snake oil if I thought it would get this to work!

User avatar
extraspecialbitter
Posts: 55
Joined: 2007-03-28 16:55
Location: Cape Cod, MA

Re: unable to connect to Bluetooth speaker running Debian 9

#4 Post by extraspecialbitter »

Some additional info, FWIW:

Code: Select all

pablo@riverview=> cat /etc/debian_version 
9.4
pablo@riverview=> uname -r
4.9.0-6-amd64

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

Re: unable to connect to Bluetooth speaker running Debian 9

#5 Post by pylkko »

The bluetooth stack takes care of the connections, but the generation of an audio sink is the duty of pulseaudio (since it appears that you are using pulseaudio). For this you need the package pulseaudio-bluetooth, so make sure that is installed. You could try forming the connection again, so first connect (and only once you have connection do pair and trust). After that, if you cannot get an output, reset pulseaudio by killing it (if it dies it always restarts itself automatically). This has worked sometimes for people earlier. By the way, can you show the contents of /etc/bluetooth/audio.conf?

User avatar
extraspecialbitter
Posts: 55
Joined: 2007-03-28 16:55
Location: Cape Cod, MA

Re: unable to connect to Bluetooth speaker running Debian 9

#6 Post by extraspecialbitter »

pylkko wrote:The bluetooth stack takes care of the connections, but the generation of an audio sink is the duty of pulseaudio (since it appears that you are using pulseaudio). For this you need the package pulseaudio-bluetooth, so make sure that is installed. You could try forming the connection again, so first connect (and only once you have connection do pair and trust). After that, if you cannot get an output, reset pulseaudio by killing it (if it dies it always restarts itself automatically). This has worked sometimes for people earlier. By the way, can you show the contents of /etc/bluetooth/audio.conf?
I'm guessing by pulseaudio-bluetooth you mean pulseaudio-module-bluetooth, which it appears I already have installed.

Code: Select all

pablo@riverview=> sudo apt-get install pulseaudio-module-bluetooth
Reading package lists... Done
Building dependency tree       
Reading state information... Done
pulseaudio-module-bluetooth is already the newest version (10.0-1+deb9u1).
0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
I've tried killing and restarting pulseaudio multiple times - either via "pulseaudio -k" or "killall pulseaudio", and while this worked when I was running Debian 8, it hasn't paid dividends while running Debian 9.

As it turns out, I don't have an /etc/bluetooth/audio.conf. Here's what I've got under /etc/bluetooth.

Code: Select all

pablo@riverview=> cd /etc/bluetooth
pablo@riverview=> ll
total 16
-rw-r--r-- 1 root root  397 May 19  2014 input.conf
-rw-r--r-- 1 root root 4051 Sep 13  2017 main.conf
-rw-r--r-- 1 root root  120 Dec 24  2012 network.conf
-rw-r--r-- 1 root root  258 Dec 24  2012 proximity.conf
The only uncommented line in main.conf is the following:

Code: Select all

AutoEnable=true

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

Re: unable to connect to Bluetooth speaker running Debian 9

#7 Post by pylkko »

OK. Sorry about that. I am currently on a work command to another city for a few months and here I don't have a Debian system at hand, but employer uses Ubuntu servers, and MacOS instead (and actually have one Fedora 27 machine here too). However, yes - and I checked it from the repo and using a remote connection to one of my Debian machines - the package is named "pulseaudio-module-bluetooth" on Debian, which is different from Fedora apparently.

Bluez is notoriously badly documented and pulseaudio changes a lot. But at least earlier you needed to have /etc/bluetooth/audio.conf (so make it) and put in it

Code: Select all

[General]
Enable=Socket
Now restart bluetooth.service. And it wont hurt to kill pulseaudio now also. Do you see it now in pavucontrol?

if not, try reconnecting with bluetoothctl:

Code: Select all

bluetoothctl 
power ron 
agent on 
scan on
connect XXXX
While you are at it, see if default.pa has:

Code: Select all

# automatically switch to newly-connected devices
load-module module-switch-on-connect
or

Code: Select all

load-module module-switch-on-port-available

User avatar
extraspecialbitter
Posts: 55
Joined: 2007-03-28 16:55
Location: Cape Cod, MA

Re: unable to connect to Bluetooth speaker running Debian 9

#8 Post by extraspecialbitter »

pylkko wrote:OK. Sorry about that. I am currently on a work command to another city for a few months and here I don't have a Debian system at hand, but employer uses Ubuntu servers, and MacOS instead (and actually have one Fedora 27 machine here too). However, yes - and I checked it from the repo and using a remote connection to one of my Debian machines - the package is named "pulseaudio-module-bluetooth" on Debian, which is different from Fedora apparently.

Bluez is notoriously badly documented and pulseaudio changes a lot. But at least earlier you needed to have /etc/bluetooth/audio.conf (so make it) and put in it

Code: Select all

[General]
Enable=Socket
Now restart bluetooth.service. And it wont hurt to kill pulseaudio now also. Do you see it now in pavucontrol?

if not, try reconnecting with bluetoothctl:

Code: Select all

bluetoothctl 
power ron 
agent on 
scan on
connect XXXX
While you are at it, see if default.pa has:

Code: Select all

# automatically switch to newly-connected devices
load-module module-switch-on-connect
or

Code: Select all

load-module module-switch-on-port-available
I appreciate your taking time out while on a work assignment to try to help me figure this out. I made the suggestions you recommended to audio.conf and confirmed that the settings in default.pa were already set. Unfortunately I see the same results. When I try to connect without pairing first, I get the error:

Code: Select all

[bluetooth]# connect 2C:41:A1:65:81:CC
Attempting to connect to 2C:41:A1:65:81:CC
Failed to connect: org.bluez.Error.Failed
And when I attempt to pair, I see the following:

Code: Select all

[bluetooth]# pair 2C:41:A1:65:81:CC
Attempting to pair with 2C:41:A1:65:81:CC
Failed to pair: org.bluez.Error.ConnectionAttemptFailed
I'll do a bit more digging and see if I can find something out.

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

Re: unable to connect to Bluetooth speaker running Debian 9

#9 Post by pylkko »

Yeah don't worry, not being at home and family means a lot of extra time to kill, :D

you might want to show the

Code: Select all

lspci -v
of the device

You should check dmesg for any errors. For example, if missing firmware, it could cause the bluetooth device to show up but not work properly. Additionally, check

Code: Select all

 systemctl status bluetooth 
make sure you are not blocked with

Code: Select all

rfkill list
but I suspect you are not as you can scan? I mean I deduce this from your sayings, but you do not actually show output from "scan". What agent are you using? I am presuming that the device does not use a pin. And you probably made sure that the device is in pairing mode when you attempt to make the connection?

Also, after you have the device on and it can scan and see things and you have registered the agent, but the connection fails, check journalctl and syslog for any possible hints.

User avatar
extraspecialbitter
Posts: 55
Joined: 2007-03-28 16:55
Location: Cape Cod, MA

Re: unable to connect to Bluetooth speaker running Debian 9

#10 Post by extraspecialbitter »

pylkko wrote:Yeah don't worry, not being at home and family means a lot of extra time to kill, :D

you might want to show the

Code: Select all

lspci -v
of the device

You should check dmesg for any errors. For example, if missing firmware, it could cause the bluetooth device to show up but not work properly. Additionally, check

Code: Select all

 systemctl status bluetooth 
make sure you are not blocked with

Code: Select all

rfkill list
but I suspect you are not as you can scan? I mean I deduce this from your sayings, but you do not actually show output from "scan". What agent are you using? I am presuming that the device does not use a pin. And you probably made sure that the device is in pairing mode when you attempt to make the connection?

Also, after you have the device on and it can scan and see things and you have registered the agent, but the connection fails, check journalctl and syslog for any possible hints.
Extra time or not, I appreciate your investment in my issue. :)

First an lspci -v command. Pretty verbose, as it turns out.

Code: Select all

pablo@elposito=> lspci -v
00:00.0 Host bridge: Intel Corporation Core Processor DRAM Controller (rev 02)
	Subsystem: Dell Latitude E6410
	Flags: bus master, fast devsel, latency 0
	Capabilities: <access denied>

00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 02) (prog-if 00 [VGA controller])
	Subsystem: Dell Latitude E6410
	Flags: bus master, fast devsel, latency 0, IRQ 29
	Memory at f0000000 (64-bit, non-prefetchable) [size=4M]
	Memory at e0000000 (64-bit, prefetchable) [size=256M]
	I/O ports at 70b0 [size=8]
	[virtual] Expansion ROM at 000c0000 [disabled] [size=128K]
	Capabilities: <access denied>
	Kernel driver in use: i915
	Kernel modules: i915

00:16.0 Communication controller: Intel Corporation 5 Series/3400 Series Chipset HECI Controller (rev 06)
	Subsystem: Dell 5 Series/3400 Series Chipset HECI Controller
	Flags: bus master, fast devsel, latency 0, IRQ 27
	Memory at f69b0000 (64-bit, non-prefetchable) [size=16]
	Capabilities: <access denied>
	Kernel driver in use: mei_me
	Kernel modules: mei_me

00:16.3 Serial controller: Intel Corporation 5 Series/3400 Series Chipset KT Controller (rev 06) (prog-if 02 [16550])
	Subsystem: Dell 5 Series/3400 Series Chipset KT Controller
	Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 19
	I/O ports at 70a0 [size=8]
	Memory at f6990000 (32-bit, non-prefetchable) [size=4K]
	Capabilities: <access denied>
	Kernel driver in use: serial

00:19.0 Ethernet controller: Intel Corporation 82577LM Gigabit Network Connection (rev 05)
	Subsystem: Dell Latitude E6410
	Flags: bus master, fast devsel, latency 0, IRQ 24
	Memory at f6900000 (32-bit, non-prefetchable) [size=128K]
	Memory at f6980000 (32-bit, non-prefetchable) [size=4K]
	I/O ports at 7040 [size=32]
	Capabilities: <access denied>
	Kernel driver in use: e1000e
	Kernel modules: e1000e

00:1a.0 USB controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 05) (prog-if 20 [EHCI])
	Subsystem: Dell Latitude E6410
	Flags: bus master, medium devsel, latency 0, IRQ 16
	Memory at f6970000 (32-bit, non-prefetchable) [size=1K]
	Capabilities: <access denied>
	Kernel driver in use: ehci-pci
	Kernel modules: ehci_pci

00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 05)
	Subsystem: Dell Latitude E6410
	Flags: bus master, fast devsel, latency 0, IRQ 28
	Memory at f6960000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: <access denied>
	Kernel driver in use: snd_hda_intel
	Kernel modules: snd_hda_intel

00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 (rev 05) (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0, IRQ 16
	Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
	I/O behind bridge: 00006000-00006fff
	Memory behind bridge: f5500000-f68fffff
	Prefetchable memory behind bridge: 00000000f6a00000-00000000f6bfffff
	Capabilities: <access denied>
	Kernel driver in use: pcieport
	Kernel modules: shpchp

00:1c.1 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 2 (rev 05) (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0, IRQ 17
	Bus: primary=00, secondary=02, subordinate=02, sec-latency=0
	I/O behind bridge: 00005000-00005fff
	Memory behind bridge: f4100000-f54fffff
	Prefetchable memory behind bridge: 00000000f6c00000-00000000f6dfffff
	Capabilities: <access denied>
	Kernel driver in use: pcieport
	Kernel modules: shpchp

00:1c.2 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 3 (rev 05) (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0, IRQ 18
	Bus: primary=00, secondary=03, subordinate=04, sec-latency=0
	I/O behind bridge: 00002000-00003fff
	Memory behind bridge: f0400000-f2cfffff
	Prefetchable memory behind bridge: 00000000f6e00000-00000000f6ffffff
	Capabilities: <access denied>
	Kernel driver in use: pcieport
	Kernel modules: shpchp

00:1c.3 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 4 (rev 05) (prog-if 00 [Normal decode])
	Flags: bus master, fast devsel, latency 0, IRQ 19
	Bus: primary=00, secondary=05, subordinate=0a, sec-latency=0
	I/O behind bridge: 00004000-00004fff
	Memory behind bridge: f2d00000-f40fffff
	Prefetchable memory behind bridge: 00000000f7000000-00000000f71fffff
	Capabilities: <access denied>
	Kernel driver in use: pcieport
	Kernel modules: shpchp

00:1d.0 USB controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 05) (prog-if 20 [EHCI])
	Subsystem: Dell Latitude E6410
	Flags: bus master, medium devsel, latency 0, IRQ 17
	Memory at f6950000 (32-bit, non-prefetchable) [size=1K]
	Capabilities: <access denied>
	Kernel driver in use: ehci-pci
	Kernel modules: ehci_pci

00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a5) (prog-if 01 [Subtractive decode])
	Flags: bus master, fast devsel, latency 0
	Bus: primary=00, secondary=0b, subordinate=0b, sec-latency=0
	Capabilities: <access denied>

00:1f.0 ISA bridge: Intel Corporation QM57 Chipset LPC Interface Controller (rev 05)
	Subsystem: Dell Latitude E6410
	Flags: bus master, medium devsel, latency 0
	Capabilities: <access denied>
	Kernel driver in use: lpc_ich
	Kernel modules: lpc_ich

00:1f.2 RAID bus controller: Intel Corporation 82801 Mobile SATA Controller [RAID mode] (rev 05)
	Subsystem: Dell 82801 Mobile SATA Controller [RAID mode]
	Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 25
	I/O ports at 7090 [size=8]
	I/O ports at 7080 [size=4]
	I/O ports at 7070 [size=8]
	I/O ports at 7060 [size=4]
	I/O ports at 7020 [size=32]
	Memory at f6940000 (32-bit, non-prefetchable) [size=2K]
	Capabilities: <access denied>
	Kernel driver in use: ahci
	Kernel modules: ahci

00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller (rev 05)
	Subsystem: Dell Latitude E6410
	Flags: medium devsel, IRQ 18
	Memory at f6930000 (64-bit, non-prefetchable) [size=256]
	I/O ports at 7000 [size=32]
	Kernel driver in use: i801_smbus
	Kernel modules: i2c_i801

00:1f.6 Signal processing controller: Intel Corporation 5 Series/3400 Series Chipset Thermal Subsystem (rev 05)
	Subsystem: Dell Latitude E6410
	Flags: bus master, fast devsel, latency 0, IRQ 18
	Memory at f6920000 (64-bit, non-prefetchable) [size=4K]
	Capabilities: <access denied>
	Kernel driver in use: intel ips
	Kernel modules: intel_ips

02:00.0 Network controller: Intel Corporation Centrino Advanced-N 6200 (rev 35)
	Subsystem: Intel Corporation Centrino Advanced-N 6200 2x2 AGN
	Flags: bus master, fast devsel, latency 0, IRQ 26
	Memory at f4100000 (64-bit, non-prefetchable) [size=8K]
	Capabilities: <access denied>
	Kernel driver in use: iwlwifi
	Kernel modules: iwlwifi

03:00.0 CardBus bridge: Ricoh Co Ltd CardBus bridge (rev 02)
	Subsystem: Dell Latitude E6410
	Flags: bus master, fast devsel, latency 0, IRQ 18
	Memory at f2c40000 (32-bit, non-prefetchable) [size=4K]
	Bus: primary=03, secondary=04, subordinate=04, sec-latency=176
	Memory window 0: f0400000-f17fffff (prefetchable)
	Memory window 1: f1800000-f1bfffff
	I/O window 0: 00002000-000020ff
	I/O window 1: 00002400-000024ff
	16-bit legacy interface ports at 0001
	Capabilities: <access denied>
	Kernel driver in use: yenta_cardbus
	Kernel modules: yenta_socket

03:00.1 SD Host controller: Ricoh Co Ltd MMC/SD Host Controller (rev 03) (prog-if 01)
	Subsystem: Dell Latitude E6410
	Flags: bus master, fast devsel, latency 0, IRQ 19
	Memory at f2c30000 (32-bit, non-prefetchable) [size=256]
	Capabilities: <access denied>
	Kernel driver in use: sdhci-pci
	Kernel modules: sdhci_pci

03:00.4 FireWire (IEEE 1394): Ricoh Co Ltd R5C832 PCIe IEEE 1394 Controller (rev 03) (prog-if 10 [OHCI])
	Subsystem: Dell Latitude E6410
	Flags: bus master, fast devsel, latency 0, IRQ 16
	Memory at f2c00000 (32-bit, non-prefetchable) [size=2K]
	Capabilities: <access denied>
	Kernel driver in use: firewire_ohci
	Kernel modules: firewire_ohci

3f:00.0 Host bridge: Intel Corporation Core Processor QuickPath Architecture Generic Non-core Registers (rev 02)
	Subsystem: Intel Corporation Core Processor QuickPath Architecture Generic Non-core Registers
	Flags: bus master, fast devsel, latency 0

3f:00.1 Host bridge: Intel Corporation Core Processor QuickPath Architecture System Address Decoder (rev 02)
	Subsystem: Intel Corporation Core Processor QuickPath Architecture System Address Decoder
	Flags: bus master, fast devsel, latency 0

3f:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0 (rev 02)
	Subsystem: Intel Corporation Core Processor QPI Link 0
	Flags: bus master, fast devsel, latency 0

3f:02.1 Host bridge: Intel Corporation 1st Generation Core i3/5/7 Processor QPI Physical 0 (rev 02)
	Subsystem: Intel Corporation 1st Generation Core i3/5/7 Processor QPI Physical 0
	Flags: bus master, fast devsel, latency 0

3f:02.2 Host bridge: Intel Corporation 1st Generation Core i3/5/7 Processor Reserved (rev 02)
	Subsystem: Intel Corporation 1st Generation Core i3/5/7 Processor Reserved
	Flags: bus master, fast devsel, latency 0

3f:02.3 Host bridge: Intel Corporation 1st Generation Core i3/5/7 Processor Reserved (rev 02)
	Subsystem: Intel Corporation 1st Generation Core i3/5/7 Processor Reserved
	Flags: bus master, fast devsel, latency 0
Next, bluetooth status:

Code: Select all

pablo@elposito=> systemctl status bluetooth
● bluetooth.service - Bluetooth service
   Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2018-04-24 18:08:56 EDT; 11min ago
     Docs: man:bluetoothd(8)
 Main PID: 2458 (bluetoothd)
   Status: "Running"
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/bluetooth.service
           └─2458 /usr/lib/bluetooth/bluetoothd
Lastly, rfkill, which - as you suspected - shows that I'm not blocked.

Code: Select all

pablo@elposito=> rfkill list
0: phy0: Wireless LAN
	Soft blocked: no
	Hard blocked: no
1: hci0: Bluetooth
	Soft blocked: no
	Hard blocked: no
2: dell-wifi: Wireless LAN
	Soft blocked: no
	Hard blocked: no
The device, a Bose Color II SoundLink speaker, doesn't require a PIN, but if it did I would get around it by typing "trust <mac address>" within bluetoothctl.

As for scanning, yes, I'm able to do a scan from bluetoothctl. For completeness sake, here's the sequence I usually go through in trying to pair and connect:

Code: Select all

pablo@elposito=> sudo service bluetooth restart
[sudo] password for pablo: 
pablo@elposito=> killall pulseaudio
pablo@elposito=> bluetoothctl -a
[NEW] Controller 5C:F3:70:87:EE:C4 elposito [default]
[NEW] Device 2C:41:A1:65:81:CC Bose Color II SoundLink
Agent registered
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# scan on
Discovery started
[CHG] Controller 5C:F3:70:87:EE:C4 Discovering: yes
[NEW] Device 2C:41:A1:0F:1A:39 Bose Color II SoundLink
[CHG] Device 2C:41:A1:65:81:CC RSSI: -83
[CHG] Device 2C:41:A1:65:81:CC TxPower: 10
[CHG] Device 2C:41:A1:65:81:CC UUIDs: 0000febe-0000-1000-8000-00805f9b34fb
[CHG] Device 2C:41:A1:65:81:CC ManufacturerData Key: 0x0110
[CHG] Device 2C:41:A1:65:81:CC ManufacturerData Value: 0x40
[CHG] Device 2C:41:A1:65:81:CC ManufacturerData Value: 0x0d
[CHG] Device 2C:41:A1:65:81:CC ManufacturerData Value: 0x01
[CHG] Device 2C:41:A1:65:81:CC ManufacturerData Value: 0x00
[bluetooth]# trust 2C:41:A1:65:81:CC
Changing 2C:41:A1:65:81:CC trust succeeded
[CHG] Device 2C:41:A1:0F:1A:39 TxPower: 8
[CHG] Device 2C:41:A1:0F:1A:39 Class: 0x240414
[CHG] Device 2C:41:A1:0F:1A:39 Icon: audio-card
[CHG] Device 2C:41:A1:0F:1A:39 Modalias: bluetooth:v009Ep400Dd0111
[CHG] Device 2C:41:A1:0F:1A:39 UUIDs: 0000febe-0000-1000-8000-00805f9b34fb
[CHG] Device 2C:41:A1:0F:1A:39 UUIDs: 0000110d-0000-1000-8000-00805f9b34fb
[CHG] Device 2C:41:A1:0F:1A:39 UUIDs: 0000110b-0000-1000-8000-00805f9b34fb
[CHG] Device 2C:41:A1:0F:1A:39 UUIDs: 0000110e-0000-1000-8000-00805f9b34fb
[CHG] Device 2C:41:A1:0F:1A:39 UUIDs: 0000110f-0000-1000-8000-00805f9b34fb
[CHG] Device 2C:41:A1:0F:1A:39 UUIDs: 00001130-0000-1000-8000-00805f9b34fb
[CHG] Device 2C:41:A1:0F:1A:39 UUIDs: 0000112e-0000-1000-8000-00805f9b34fb
[CHG] Device 2C:41:A1:0F:1A:39 UUIDs: 0000111e-0000-1000-8000-00805f9b34fb
[bluetooth]# pair 2C:41:A1:65:81:CC
Attempting to pair with 2C:41:A1:65:81:CC
Failed to pair: org.bluez.Error.ConnectionAttemptFailed
[CHG] Device 2C:41:A1:0F:1A:39 TxPower: 10
[bluetooth]# connect 2C:41:A1:65:81:CC
Attempting to connect to 2C:41:A1:65:81:CC
[CHG] Device 2C:41:A1:0F:1A:39 TxPower: 8
Failed to connect: org.bluez.Error.Failed

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

Re: unable to connect to Bluetooth speaker running Debian 9

#11 Post by pylkko »

So, can you show

Code: Select all

lsusb
to see the number of the device. I suspect that one of them is Bluetooth (you can check by using -v or -vv but that will produce massive output again). Perhaps you have 8087:0a2a or something similar?

and

Code: Select all

dmesg | grep Blue
and

Code: Select all

dmesg | grep blue
to see that there is no errors in e.g. loading the firmware or something else

and

Code: Select all

lsmod
to see that the needed kernel modules are loaded?

did you ever try that same connection sequence without first trusting and pairing? I have had the experience that sometimes I have got connnection error, and then undone everything and simply connected and it worked. So, I believe that sometimes bluez or the hardware can mess up the connection and you just need to redo it. If you succeed and then trust the device it will work from there on normally. Although some devices are really slow so that when you connect it takes like 5 seconds for it yo actually connect.

did you check if your /etc/pulse/default.pa has the load-module module-bluetooth-dicover line?

You can try to load:

Code: Select all

pactl load-module module-bluetooth-discover
and also perhaps these modules:

module-bluetooth-policy
module-bluez5-device
module-bluez5-discover

User avatar
extraspecialbitter
Posts: 55
Joined: 2007-03-28 16:55
Location: Cape Cod, MA

Re: unable to connect to Bluetooth speaker running Debian 9

#12 Post by extraspecialbitter »

pylkko wrote:So, can you show

Code: Select all

lsusb
to see the number of the device. I suspect that one of them is Bluetooth (you can check by using -v or -vv but that will produce massive output again). Perhaps you have 8087:0a2a or something similar?

and

Code: Select all

dmesg | grep Blue
and

Code: Select all

dmesg | grep blue
to see that there is no errors in e.g. loading the firmware or something else

and

Code: Select all

lsmod
to see that the needed kernel modules are loaded?

did you ever try that same connection sequence without first trusting and pairing? I have had the experience that sometimes I have got connnection error, and then undone everything and simply connected and it worked. So, I believe that sometimes bluez or the hardware can mess up the connection and you just need to redo it. If you succeed and then trust the device it will work from there on normally. Although some devices are really slow so that when you connect it takes like 5 seconds for it yo actually connect.

did you check if your /etc/pulse/default.pa has the load-module module-bluetooth-dicover line?

You can try to load:

Code: Select all

pactl load-module module-bluetooth-discover
and also perhaps these modules:

module-bluetooth-policy
module-bluez5-device
module-bluez5-discover
The lsusb output is as expected:

Code: Select all

pablo@elposito=> lsusb
Bus 002 Device 004: ID 0a5c:5800 Broadcom Corp. BCM5880 Secure Applications Processor
Bus 002 Device 003: ID 0a5c:21e8 Broadcom Corp. BCM20702A0 Bluetooth 4.0
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 007: ID 413c:3012 Dell Computer Corp. Optical Wheel Mouse
Bus 001 Device 006: ID 413c:2003 Dell Computer Corp. Keyboard
Bus 001 Device 004: ID 413c:2513 Dell Computer Corp. internal USB Hub of E-Port Replicator
Bus 001 Device 005: ID 046d:0992 Logitech, Inc. QuickCam Communicate Deluxe
Bus 001 Device 008: ID 0480:a006 Toshiba America Inc External Disk 1.5TB
Bus 001 Device 003: ID 413c:2513 Dell Computer Corp. internal USB Hub of E-Port Replicator
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
The same is true for lsmod:

Code: Select all

pablo@elposito=> lsmod | egrep -i 'blue|hci'
bluetooth             552960  12 btrtl,btintel,bnep,btbcm,btusb
rfkill                 24576  8 bluetooth,dell_laptop,dell_rbtn,cfg80211
crc16                  16384  2 bluetooth,ext4
ahci                   36864  3
libahci                32768  1 ahci
libata                249856  2 ahci,libahci
firewire_ohci          40960  0
sdhci_pci              28672  0
sdhci                  45056  1 sdhci_pci
ehci_pci               16384  0
firewire_core          65536  1 firewire_ohci
ehci_hcd               81920  1 ehci_pci
mmc_core              147456  2 sdhci,sdhci_pci
usbcore               253952  9 uvcvideo,usbhid,snd_usb_audio,usb_storage,ehci_hcd,snd_usbmidi_lib,btusb,uas,ehci_pci
But the result of dmesg turns up an error. It loads the firmware I downloaded from plugable, but not without issues:

Code: Select all

pablo@elposito=> sudo dmesg | grep -i blue
[    2.238043] usb 2-1.2: Product: BCM920702 Bluetooth 4.0
[    6.494694] Bluetooth: Core ver 2.22
[    6.494716] Bluetooth: HCI device and connection manager initialized
[    6.494720] Bluetooth: HCI socket layer initialized
[    6.494723] Bluetooth: L2CAP socket layer initialized
[    6.494728] Bluetooth: SCO socket layer initialized
[    6.899274] Bluetooth: hci0: BCM: chip id 63
[    6.915869] Bluetooth: hci0: elposito
[    6.917269] Bluetooth: hci0: BCM20702A1 (001.002.014) build 1338
[    6.924213] bluetooth hci0: firmware: direct-loading firmware brcm/BCM20702A1-0a5c-21e8.hcd
[    7.945334] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    7.945336] Bluetooth: BNEP filters: protocol multicast
[    7.945341] Bluetooth: BNEP socket layer initialized
[    8.986176] Bluetooth: hci0 command 0x0a0a tx timeout
[   17.082501] Bluetooth: hci0: BCM: Patch command 0a0a failed (-110)
[   19.098434] Bluetooth: hci0 command 0x1001 tx timeout
[   27.322610] Bluetooth: hci0: BCM: Reading local version info failed (-110)
[  686.477586] Bluetooth: hci0 command 0x1001 tx timeout
[  694.701721] Bluetooth: hci0: BCM: Reading local version info failed (-110)
I tried Googling the message a little bit without success, but now I'm suspecting the firmware I downloaded might be buggy.

User avatar
pylkko
Posts: 1802
Joined: 2014-11-06 19:02

Re: unable to connect to Bluetooth speaker running Debian 9

#13 Post by pylkko »

Because the code is closed, you should ask Plugable if those messages are meant to be serious or benign and if you have the correct/latest version of the firmware. I believe they are willing to help as they say in the comments of this page that you can send them kernel logs via email:

https://plugable.com/2014/06/23/plugabl ... -on-linux/

Judging by the comments on that page, the firmware can and has caused the situation where people are able to see the device and use it but not initiate a2dp or hsf audio profiles, even depending on how the file is named. So.. this might be worth looking into.

User avatar
extraspecialbitter
Posts: 55
Joined: 2007-03-28 16:55
Location: Cape Cod, MA

Re: unable to connect to Bluetooth speaker running Debian 9

#14 Post by extraspecialbitter »

pylkko wrote:Because the code is closed, you should ask Plugable if those messages are meant to be serious or benign and if you have the correct/latest version of the firmware. I believe they are willing to help as they say in the comments of this page that you can send them kernel logs via email:

https://plugable.com/2014/06/23/plugabl ... -on-linux/

Judging by the comments on that page, the firmware can and has caused the situation where people are able to see the device and use it but not initiate a2dp or hsf audio profiles, even depending on how the file is named. So.. this might be worth looking into.
It turns out that I had a different version of the firmware than what was on the plugable website. Not that it mattered - I had used that exact firmware before, and while it worked fine under Debian 8, I get the same error with Debian 9. I've submitted a comment on the website and hope to hear something soon. In the meantime, it's back to wired speakers for me.

One last thing I thought I'd mention is that I ran one of the commands you recommended but received an error. At the time I thought it was a red herring - and might still be - but I thought I'd include it for completeness sake:

Code: Select all

pablo@elposito=> sudo pactl load-module module-bluetooth-discover
Connection failure: Connection refused
pa_context_connect() failed: Connection refused

Post Reply