nebogeo
Posts: 8
Joined: Sat Mar 01, 2014 4:48 pm

[Solved] Bluetooth audio: hardware error and hang after 10-20 mins

Wed Nov 21, 2018 1:39 pm

I'm trying to track down why bluetooth audio stops after a few minutes on the Pi 3b+, which seems to be a hardware issue. I either need to solve this, or find a way to restart bluetooth automatically. It currently requires a reboot to work again.

I'm running on a fresh 2018-06-27-raspbian-stretch image, updated apt and firmware today.

I'm running the bluealsa driver and streaming audio to a bluetooth speaker using pure data via jackd, but the problem seems to be at the hardware level, if I wait for it to stop working:

Code: Select all

$ dmesg | grep tooth
... normal setup everything good...
[ 1114.656290] Bluetooth: hci0 hardware error 0x00
[ 1118.877778] Bluetooth: hci0 command 0x1003 tx timeout
[ 1120.957794] Bluetooth: hci0 command 0x1001 tx timeout
...
After it gets in this state, it's reported as down by hciconfig:

Code: Select all

$ hciconfig 
hci0:	Type: Primary  Bus: UART
	BD Address: B8:27:EB:EA:E9:44  ACL MTU: 1021:8  SCO MTU: 64:1
	DOWN 
	RX bytes:396955 acl:112 sco:0 events:49166 errors:0
	TX bytes:33353361 acl:98190 sco:0 commands:70 errors:0
But when I try restarting it, I get a timeout:

Code: Select all

sudo hciconfig hci0 up
Can't init device hci0: Connection timed out (110)
None of the other restarts seem to change this situation (sudo /etc/init.d/bluetooth restart etc).

Should I go buy a bluetooth dongle?
Last edited by nebogeo on Thu Nov 22, 2018 10:27 pm, edited 1 time in total.

nebogeo
Posts: 8
Joined: Sat Mar 01, 2014 4:48 pm

Re: Bluetooth audio: hardware error and hang after 10-20 mins

Thu Nov 22, 2018 2:34 pm

I have news! It mainly seems to be the (offical) touchscreen I've been using for debugging. Without that I can run it for an hour or so without problems. I still had a hang occur but I'm still investigating if it's the same issue as the speaker reported a disconnection, which it didn't seem to before.

I tested this on a Pi 3B as well, and had the same symptoms.

I also tried a Jessie install. To do that I had to install all the bluetooth stuff manually and build bluealsa from source following these instructions to replicate the situation. Pretty much the same thing, but the hciconfig reports everything ok until you try to restart it.

I'll post more news as I progress, but I'm now running this with GPS, 1-wire sensors and all kinds of nonsense so it'll be a bit more difficult to isolate.

minomic
Posts: 1
Joined: Sun Mar 29, 2020 3:57 pm

Re: [Solved] Bluetooth audio: hardware error and hang after 10-20 mins

Sun Mar 29, 2020 4:02 pm

I am in the same exact situation as the original post: sound drops after a seemingly random interval, and I have the very same error messages.
The issue seems to be connected to https://github.com/raspberrypi/linux/issues/2832
Does anyone have any update or (even better) solution?

Just some information about my system:

Code: Select all

$ uname -a
Linux osmc 4.19.55-6-osmc #1 SMP PREEMPT Sun Nov 3 22:15:28 UTC 2019 armv7l GNU/Linux

$ cat /proc/device-tree/model
Raspberry Pi 3 Model B Plus Rev 1.3

$ strings /lib/firmware/brcm/BCM4345C0.hcd | grep Raspberry
&BCM43455 37.4MHz Raspberry Pi 3+-0141

Return to “Troubleshooting”