firmware
firmware copied to clipboard
Bluetooth speaker stops working after few minutes
I have some related issues pairing and using a bluetooth speaker (JBL GO). The device can be paired only after a reboot or before any management with bluetooth (GUI or CLI). Although the pairing "works" it is unable to remain functional after some seconds (or minutes) of audio stream (youtube or local sound), the connection is not lost but the communication between the rpi bt and the speaker seems to stop.
I'm using a clean Raspbian desktop stretch image recently update e totally functional, default configs, no overclock or altered configs.
I found and fixed one bug in the UART driver last week and enabled a workaround for another problem - together they improved Bluetooth reliability. I've just found another bug that can lead to data loss, the fix for which is not finalised, but with a workaround in place I've found UART data transfer to be very reliable and expect Bluetooth to be significantly better.
I'll comment again when a firmware containing all fixes is available.
@pelwell I can confirm this too. Didn't report it earlier because I'm using my own homegrown os and I currently don't have time to reproduce this with raspbian.
For me it happens like this:
connect a2dp headset, start watching/listening to something using Kodi from popcornmix's newclock5 branch, after a random period of time from a few seconds to 30-40 mins the sound stops and bluetooth stack seems to die. After that even hciconfig -a
produces an error.
In dmesg ACL timeouts can be observed, I can't remember the exact messages right now. Only a reboot revives bluetooth. I've tried building bluez from git, tried both pulseaudio and bluez-alsa, tried different kernel branches, tried old and new bluetooth firmware blobs, tried all config options google could find - nothing seems to help.
If you have any ideas and/or patches we could try I could help testing as I can reproduce it easily. On a side note: a cheapo usb bluetooth 4.0 dongle with CSR chipset works like a charm.
The second bug has now been patched, but it only affects devices using RTS/CTS flow control on ttyAMA0 - this includes Pi 3B rev 1.3 and Pi Zero W.
If you are running on an older Pi 3B then the current rpi-update firmware includes a fix for the only problem I am aware of. The flow control fix will be in the next firmware - can we roll one out tonight, @popcornmix ?
@pelwell there was an rpi-update yesterday. Is there a newer fix? Is this gpu firmware or kernel?
There is a fix to the kernel pl011 driver that went in this afternoon. It should affect a smaller number of people than the insertion of the memory barrier - just 3b1.3 and 0w - so we could wait until a few more patches have accumulated, but it does make a significant difference.
Okay I'll try to remember when I get home. @P33M was also keen on pushing a firmware update for pwm audio improvements.
A new firmware is available via rpi-update (thanks, @popcornmix) - it's been playing music to a Bluetooth headset in a loop for 16 hours with no issues.
@pelwell & @popcornmix thanks people!
I can confirm that the issue is MUCH LESS problematic than it was. However, the issue seems to persist after 2 hours of music/video streaming. It works without any issue during the 1st hour, but when coming to the 2nd the BT device mutes and I cannot disconnect (or remove) or re-pair it to rpi. A reboot is needed to have a functional pair + connection + streaming.
I've tested it mostly in browser (Chromium) but the issue seems to persist locally too.
Stretch Lite updated, upgraded. rpi-update done.
Bluetooth problems:
-
Playing is muted after 2-3 hours although the BT headset is connected yet.
-
The sound quility is terrrible (echoes, distorted) irregularly for seconds or minutes. ( Nothing in the syslog.)
The following error is caused by a cheap BT receiver (EC502), the quility is more or less good with another BT headset: The sound is terrible half of the time, the syslog says (several hundred times): bluealsa[496]: /usr/bin/bluealsa: BT socket write error: Resource temporarily unavailable
Thank you.
The bluetooth speaker is paired, trusted and connected via desktop controls. Streamaddress entered in the browser. After some time the sound is aborted.
I'm using a clean raspbian stretch desktop image, default configs, ssh and vnc are enabled. I enter the stream address in the internet browser. I hear the sound. After some time seconds, minutes or hours (last time it was 15min), the speaker is silent but remains connected.
EDIT: Test on 7 Dec 2017 with a LAN connection between RPi 3B and the router. This time the sound aborts after 33min.
model: RPi 3B display: none (via vnc) audio: bluetooth speaker JBL GO (20cm distance to the Raspi) os: 2017-11-29-raspbian-stretch.img internet connection via internal WLAN (1m distance to the router) RealVNC to Win7 notebook ssh to Win7 notebook test stream: http://st01.dlf.de/dlf/01/128/mp3/stream.mp3
uname -a Linux raspberrypi 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l GNU/Linux
journalctl: Dec 03 20:14:01 raspberrypi systemd[1]: Starting Cleanup of Temporary Directories... Dec 03 20:14:01 raspberrypi systemd[1]: Started Cleanup of Temporary Directories. Dec 03 20:16:22 raspberrypi bluealsa[505]: /usr/bin/bluealsa: BT socket write error: Resource temporarily unavailable
bluetoothctl: [JBL GO]# info <device mac> Device <device mac> Name: JBL GO Alias: JBL GO Class: 0x240404 Icon: audio-card Paired: yes Trusted: yes Blocked: no Connected: yes ...
There still seems to be an issue. I am running the latest firmware/stretch version. I am not trying to play sound continuously: I am basically using the speaker as an alarm clock - I play a short sound and then wait a number of hours before trying to play a sound again. After a reboot, playback is fine. If I try the next day then there is no sound. bluetoothctl/info on the device confirms that it is connected.
uname -a Linux raspberrypi 4.9.70-v7+ #1068 SMP Mon Dec 18 22:12:55 GMT 2017 armv7l GNU/Linux
Hi,
the issues persists. After recent updates the "connection lost" problem is happening very often.
I have the same issue. Is there any solution for this?
Experiencing the same issue. Using LibreELEC, the sound drops after anywhere from 2 to 40 minutes. Bluetooth adapter disappears from the system and only a reboot fixes the problem.
Can any participents try the latest kernel/firmware and confirm if this issue is still present?
I'm not OP, but I can confirm I was having this issue with my RPi 3 B+ (fully updated) while streaming a netradio station with SMPlayer. I say was, because I have now been playing audio for a few hours straight cleanly by following this post https://github.com/raspberrypi/linux/issues/1402#issuecomment-405844346. In short, updating to bluez-5.50
fixed the issue. Now to sort out multiplexing :)
Can any participents try the latest kernel/firmware and confirm if this issue is still present?
The issue is still present for me. Update ran 13 January and then the BT speaker sound dropped after about 7 minutes. Unable to reconnect until reboot.
Hi,
I've reinstalled everything, updated raspbian and the issue persists. I can use a BT speaker for sometime, be it 2h ou 10 minutes, but suddenly (randomly) it disconnects and I have to reboot the system to reconnect -- until it loses connection again.
I have RPI 3B, I have paired bluetooth device on raspberry pi, Neither connect automatically to paired device nor provide serial port to device. I always connect manually(GUI). To connect by GUI I installed blueman package, I search everything on internet but no solution, Can help someone?
@ram94638 Please create a new issue.
Just tested in my rpi3b+ with librelelec 9 build 2019-0119. The a2dp audio disconnect after 5-15 minutes
I have the same issue using Raspbian or Librelec, bluetooth stops working after 5-15 minutes and I have to reboot.
Can any participents try the latest kernel/firmware and confirm if this issue is still present?
test configuration:
- same as in my post from 3. Dec 2017 is: model: RPi 3B official Raspberry pi Power Supply display: none (via vnc) audio: bluetooth speaker JBL GO (20cm distance to the Raspi) internet connection via internal WLAN (1m distance to the router) RealVNC to Win7 notebook ssh to Win7 notebook test stream: http://st01.dlf.de/dlf/01/128/mp3/stream.mp3
- different is: os: Raspbian Stretch with Desktop (image 2019-04-08-raspbian-stretch.img) uname -a Linux raspberrypi 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l GNU/Linux
test on 05.06.2019 from 19:10 until 22:10 bluetooth connection ok test on 06.06.2019 from 09:55 until 13:20 bluetooth disconnected at 13:20 test on 06.06.2019 from 14:10 until 22:10 bluetooth connection ok test on 07.06.2019 from 10:10 until 21:30 bluetooth connection ok test on 08.06.2019 from 09:25 until 21:55 bluetooth connection ok test on 09.06.2019 from 09:15 until 22:10 bluetooth connection ok test on 10.06.2019 from 09:25 until 20:00 bluetooth connection ok test on 13.06.2019 from 08:45 until 23:10 bluetooth connection ok
/var/log/syslog
Jun 6 13:20:04 raspberrypi bluealsa[562]: /usr/bin/bluealsa: BT socket write error: Connection timed out
Jun 6 13:20:04 raspberrypi bluetoothd[556]: Unable to get io data for Hands-Free Voice gateway: getpeername: Transport endpoint is not connected (107)
Jun 6 13:20:04 raspberrypi bluealsa[562]: /usr/bin/bluealsa: Couldn't release transport: GDBus.Error:org.freedesktop.DBus.Error.UnknownObject: Method "Release" with signature "" on interface "org.bluez.MediaTransport1" doesn't exist
pi@raspberrypi:~ $ date
Do 6. Jun 13:36:41 CEST 2019
pi@raspberrypi:~ $ sudo bluetoothctl -a
[NEW] Controller <controller-mac> raspberrypi [default]
[NEW] Device <device mac> JBL GO
Agent registered
[bluetooth]# info <device mac>
Device <device mac>
Name: JBL GO
Alias: JBL GO
Class: 0x240404
Icon: audio-card
Paired: yes
Trusted: yes
Blocked: no
Connected: no
...
Same issue on both a Pi 4 and a Pi Zero W, both on Raspbian full and on Diet pi. Very annoying error.
Same here.. anybody noticed consistency with physical changing position of the devices.. I am noticing better signal (less disconnections) when having less objects between receiver and sender .. specific metal once; disturbing the connection... still looking for good solution though.
Ideally would be a script for:
Reboot when audio disconnect + Auto connect bluetooth speaker on boot
A fix for a UART driver bug that could cause data-loss was fixed in July. For people seeing Bluetooth disconnection problems, please try the following:
$ sudo apt-get update
$ sudo apt-get install raspberrypi-kernel
$ sudo reboot
Issue is still present for me as well, it's incredibly annoying cause there's no consistency at all.
Have the same issues: after few minutes BT speaker stops speaking:( if try to reconnect it says:
Failed to connect to a device GDBus.Error.org.bluez.Error.NotReady Resource Not Ready. Try to connect again.
[57107.608142] input: E8:07:BF:FE:8C:6B as /devices/virtual/input/input5
[57213.028121] input: E8:07:BF:FE:8C:6B as /devices/virtual/input/input6
[57764.117837] input: E8:07:BF:FE:8C:6B as /devices/virtual/input/input7
[57857.634793] input: E8:07:BF:FE:8C:6B as /devices/virtual/input/input8
[58507.060607] Bluetooth: hci0: hardware error 0x00
[58511.500932] Bluetooth: hci0: command 0x1003 tx timeout
[58513.580988] Bluetooth: hci0: command 0x1001 tx timeout
[58515.660985] Bluetooth: hci0: command 0x1009 tx timeout
[58519.821012] Bluetooth: hci0: hardware error 0x00
[58521.901106] Bluetooth: hci0: command 0x1003 tx timeout
[58523.980982] Bluetooth: hci0: command 0x1001 tx timeout
[58526.061041] Bluetooth: hci0: command 0x1009 tx timeout
[58530.061200] Bluetooth: hci0: hardware error 0x00
Tested with different BT speakers.
pi@raspberrypi:~ $ uname -a
Linux raspberrypi 4.19.75-v7+ #1270 SMP Tue Sep 24 18:45:11 BST 2019 armv7l GNU/Linux
Issue seems to occur with me as well. I noticed keeping the Bluetooth menu open gives the connection a few more hours. Eventually it just gives out. Has anyone found a fix yet?
I put the the RPI closer to the speakers. That helped a lot for me. So no object between those two.