-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Bluetooth connection drops randomly #2832
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
We've recently received an updated Bluettooth firmware for the BCM43455 that hasn't made its way into a release yet. Can you see if it improves the symptoms for you?
To return to the original firmware, should you need to:
|
@pelwell as this is LibreELEC the firmware should be copied to
and there is no need to backup the existing firmware (which is in the read-only squashfs). I've actually been including the new Bluetooth firmware in LibreELEC test builds for the last 10 days (not yet merged) since build However upgrading only the Bluetooth firmware will result in a simplified before/after testing scenario, which might be the best option for now. |
Thanks, @MilhouseVH. |
Thanks @pelwell and @MilhouseVH. I have just installed the driver at the indicated location, I will come back here for the result of this fix. |
Unfortunately, I'm still experiencing the same issue. I don't have a computer with me currently, so I can't check if |
I haven't found a way of reading the version of the loaded firmware, but you can extract version info from the firmware file using strings:
|
Same problem with bluetooth connection drops here. Only a pi restart helps, bluetooth restart does nothing. Raspberry Pi 3B+ |
Same problem here. After what seems to be a random period of time, an error occurs and bluetooth stops working. Restarting hciuart reports the device is not responding.
|
Which kernel versions are you all running ( |
@acolombier @iczero @orclex Did moving to 4.19.58 fix your issues? |
I had similar issues and rpi-update solved it for me. |
|
This issue still appears to be open as OP has described on version 4.19.66, RPi3B+.
|
I experience the same problem as OP. However, as I'm no expert on that, I tried a different approach to achieve a workaround: Has anybody any ideas about this powercycling effort? If it's possible to do it, it was easy to implement it into some script... |
Since Raspbian 10 runs on my Pi 3B+, I can unfortunately say that it is definitely affected, too. |
Thanks! |
So sad, same here:
Sporadically breaks and only a reboot is the solution |
I'm on 4.19.66 and nothing has changed. The "waiting for input" label can be removed. |
I see the same.
|
I have a script I call btreset that I've published on other threads:
|
Thanks for the script @pelwell : Unfortunately it does not solve my problem and the last command results in a timeout. sudo btuart:
|
You could try increasing the |
Made all three sleeps to 10s. Still
|
Does the reset work before the connection drops? |
I will try, but than the connection is on again and I can't say how long it takes, till it drops again. Last time it took 24h. Sometimes it is several days.. |
If it's not too late, can you capture the output of |
Unless you are frequently disconnecting and reconnecting USB devices, or there is some problem in the system, the kernel log ought to be quiet. I'm curious to see if there was any clue as to why the BT modem died. |
Same thing happens to me on osmc with RPi3.
Any idea would be much appreciated. |
I think there is a BT/WiFi coexistence problem with the new firmware. You can track the issue here: RPi-Distro/firmware-nonfree#8 |
Thanks for the reply @pelwell. In my case, the wifi adapter is off, but it should be said that I'm using OSMC distribution (for Kodi), and it's not on the latest version of the packages, including bluez. Perhaps Arch for ARM would help because it has more recent packages. I will give it a try in the coming days and report back. |
I can confirm that it's working fine with Arch ARM on a Raspberry Pi 3 and Kodi + Pulseaudio. |
After reading the issue here, I tried to conclude, and it worked for me. I have tested many times the results are satisfactory compared to restarting a PC or mini-PC. The problem is solved by creating a program file to check the bluetooth status so when the status is DOWN INIT RUNNING it will automatically reset the bluetooth firmware. https://github.com/agungpambudi55/bluetooth-down-init-running |
Any updates here? |
Nice to hear, do you use armv7h or aarch64? I'm getting the issues with 5.15 on aarch64 and pulseaudio, only rebooting helps :/ |
How flaky is the Bluetooth connection? And on which Pi ( |
I've switched from aarch64 mainline to the rpi4-aarch64-kernel on a Pi 3B 1.2 and it works fine now (except under high load). |
A downstream patch that was present in rpi-5.10.y to avoid UART FIFO overflow is not in rpi-5.15.y, but I believe the patch is no longer necessary because of a change to the usage of the port spinlock. |
Sorry for the late reply: my system is a Pi3 B with
I don't really use it that often via bluetooth, but haven't noticed any "flakiness". |
Hello all, I have been using the nice "btreset" script extensively to get around some annoying drops and other problems. However, now i have a Raspberry PI Zero 2 W which is not covered by the recovery script, and does not work. Does anyone know how to update the script to cover this? How was the original pin numbers extracted (and the VCIO address)? |
OK figured it out for RPI Zero 2 W: The reset line is still connected via direct GPIO, but its moved from GPIO45->GPIO42 so its: raspi-gpio set 42 op dl Now it works! |
Workaround for bt_hci timeout. Information from following links : raspberrypi/linux#2832 https://github.com/raspberrypi/userland/blob/master/host_applications/linux/apps/vcmailbox/vcmailbox.c libbt changes are suggested by Lidong Zhou <[email protected]> Change-Id: Ic67eed2d60d9bea23323bbe82f824ea3afc4e674
Workaround for bt_hci timeout. Information from following links : raspberrypi/linux#2832 https://github.com/raspberrypi/userland/blob/master/host_applications/linux/apps/vcmailbox/vcmailbox.c libbt changes are suggested by Lidong Zhou <[email protected]> Change-Id: Ic67eed2d60d9bea23323bbe82f824ea3afc4e674
Workaround for bt_hci timeout. Information from following links : raspberrypi/linux#2832 https://github.com/raspberrypi/userland/blob/master/host_applications/linux/apps/vcmailbox/vcmailbox.c libbt changes are suggested by Lidong Zhou <[email protected]> Change-Id: Ic67eed2d60d9bea23323bbe82f824ea3afc4e674
running the 5.15.61-v7l+ kernel and seeing this issue on several pi 3/4s that i use for BLE/BT tracking around the house (mKeRix/room-assistant#1158). Only recourse so far has been to reboot the pi when hci0 goes away
|
Workaround for bt_hci timeout. Information from following links : raspberrypi/linux#2832 https://github.com/raspberrypi/userland/blob/master/host_applications/linux/apps/vcmailbox/vcmailbox.c libbt changes are suggested by Lidong Zhou <[email protected]> Change-Id: Ic67eed2d60d9bea23323bbe82f824ea3afc4e674
Workaround for bt_hci timeout. Information from following links : raspberrypi/linux#2832 https://github.com/raspberrypi/userland/blob/master/host_applications/linux/apps/vcmailbox/vcmailbox.c libbt changes are suggested by Lidong Zhou <[email protected]> Change-Id: Ic67eed2d60d9bea23323bbe82f824ea3afc4e674
Workaround for bt_hci timeout. Information from following links : raspberrypi/linux#2832 https://github.com/raspberrypi/userland/blob/master/host_applications/linux/apps/vcmailbox/vcmailbox.c libbt changes are suggested by Lidong Zhou <[email protected]> Change-Id: Ic67eed2d60d9bea23323bbe82f824ea3afc4e674 Signed-off-by: Michał Gapiński <[email protected]>
Workaround for bt_hci timeout. Information from following links : raspberrypi/linux#2832 https://github.com/raspberrypi/userland/blob/master/host_applications/linux/apps/vcmailbox/vcmailbox.c libbt changes are suggested by Lidong Zhou <[email protected]> Change-Id: Ic67eed2d60d9bea23323bbe82f824ea3afc4e674
Workaround for bt_hci timeout. Information from following links : raspberrypi/linux#2832 https://github.com/raspberrypi/userland/blob/master/host_applications/linux/apps/vcmailbox/vcmailbox.c libbt changes are suggested by Lidong Zhou <[email protected]> Change-Id: Ic67eed2d60d9bea23323bbe82f824ea3afc4e674
I still have a similar issue on Pi 4b. pi@raspberrypi:~ $ uname -a pi@raspberrypi:~ $ cat /proc/device-tree/model pi@raspberrypi:~ $ strings /lib/firmware/brcm/BCM4345C0.hcd | grep Raspberry None of the proposed ways of resetting works for me - reboot is needed. The connection drops after few minutes to few hours. |
Workaround for bt_hci timeout. Information from following links : raspberrypi/linux#2832 https://github.com/raspberrypi/userland/blob/master/host_applications/linux/apps/vcmailbox/vcmailbox.c libbt changes are suggested by Lidong Zhou <[email protected]> Change-Id: Ic67eed2d60d9bea23323bbe82f824ea3afc4e674
Workaround for bt_hci timeout. Information from following links : raspberrypi/linux#2832 https://github.com/raspberrypi/userland/blob/master/host_applications/linux/apps/vcmailbox/vcmailbox.c libbt changes are suggested by Lidong Zhou <[email protected]> Change-Id: Ic67eed2d60d9bea23323bbe82f824ea3afc4e674
Hi, Did anyone find the reason for the hardware error 0x00 and any possible work around, for the same? I am randomly facing this issue, on another BLE module though. Thanks, |
Similar problem. Bluetooth completely freezes after some hours. The workload attempts to capture Bluetooth LE advertising packets of nearby devices and nothing else. Versions: uname -a
Linux raspberrypi 6.6.62+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.62-1+rpt1 (2024-11-25) aarch64 GNU/Linux
strings /lib/firmware/brcm/BCM4345C0.hcd | grep Raspberry
&BCM43455 37.4MHz Raspberry Pi 3+-0190 Kernel log might have something useful [11816.559706] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
[11816.559769] Mem abort info:
[11816.559784] ESR = 0x0000000096000005
[11816.559802] EC = 0x25: DABT (current EL), IL = 32 bits
[11816.559830] SET = 0, FnV = 0
[11816.559847] EA = 0, S1PTW = 0
[11816.559863] FSC = 0x05: level 1 translation fault
[11816.559884] Data abort info:
[11816.559898] ISV = 0, ISS = 0x00000005, ISS2 = 0x00000000
[11816.559919] CM = 0, WnR = 0, TnD = 0, TagAccess = 0
[11816.559941] GCS = 0, Overlay = 0, DirtyBit = 0, Xs = 0
[11816.559963] user pgtable: 4k pages, 39-bit VAs, pgdp=0000000004400000
[11816.559989] [0000000000000000] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000
[11816.560038] Internal error: Oops: 0000000096000005 [#1] PREEMPT SMP
[11816.560066] Modules linked in: rfcomm snd_seq_dummy snd_hrtimer snd_seq snd_seq_device cmac algif_hash aes_arm64 aes_generic algif_skcipher af_alg bnep brcmfmac_wcc binfmt_misc brcmfmac brcmutil hci_uart cfg80211 btbcm bluetooth bcm2835_codec(C) bcm2835_isp(C) bcm2835_v4l2(C) v4l2_mem2mem bcm2835_mmal_vchiq(C) videobuf2_vmalloc videobuf2_dma_contig ecdh_generic videobuf2_memops ecc videobuf2_v4l2 raspberrypi_hwmon rfkill videodev libaes i2c_bcm2835 videobuf2_common mc raspberrypi_gpiomem vc_sm_cma(C) snd_bcm2835(C) i2c_dev ledtrig_pattern fuse dm_mod ip_tables x_tables ipv6 vc4 snd_soc_hdmi_codec snd_soc_core snd_compress snd_pcm_dmaengine snd_pcm snd_timer snd drm_display_helper drm_dma_helper drm_kms_helper drm drm_panel_orientation_quirks backlight cec uio_pdrv_genirq uio
[11816.560591] CPU: 2 PID: 1250 Comm: kworker/u13:2 Tainted: G C 6.6.62+rpt-rpi-v8 #1 Debian 1:6.6.62-1+rpt1
[11816.560636] Hardware name: Raspberry Pi 3 Model B Plus Rev 1.3 (DT)
[11816.560662] Workqueue: hci0 hci_rx_work [bluetooth]
[11816.560890] pstate: 20000005 (nzCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[11816.560923] pc : eir_has_uuids+0x1a0/0x2b8 [bluetooth]
[11816.561117] lr : mgmt_device_found+0x440/0x718 [bluetooth]
[11816.561309] sp : ffffffc08113bab0
[11816.561327] x29: ffffffc08113bab0 x28: 00000000ffffffba x27: 0000000000000000
[11816.561371] x26: 0000000000000080 x25: 0000000000000001 x24: 000000000000007f
[11816.561413] x23: 0000000000000000 x22: 000000000000001e x21: ffffff8002517495
[11816.561455] x20: ffffff800251748e x19: ffffff80031b6000 x18: 0000000000000000
[11816.561498] x17: ffffffa06ceee000 x16: ffffffdfcdae6110 x15: 0000000000000000
[11816.561540] x14: 000000000000000c x13: ffffffdfcdd5cc38 x12: 00000000fdae8b7a
[11816.561582] x11: ffffff8002517497 x10: 0000000000000012 x9 : 0000000000000000
[11816.561623] x8 : 0000000000000011 x7 : 0000000000000010 x6 : 0000000000000020
[11816.561664] x5 : 6e400001b5a3f393 x4 : 0000000000000000 x3 : 0000000000000000
[11816.561705] x2 : 0000000000000001 x1 : 000000000000001e x0 : ffffff8002517495
[11816.561747] Call trace:
[11816.561765] eir_has_uuids+0x1a0/0x2b8 [bluetooth]
[11816.561958] mgmt_device_found+0x440/0x718 [bluetooth]
[11816.562154] process_adv_report.part.0+0x1f4/0x658 [bluetooth]
[11816.562350] hci_le_adv_report_evt+0x1b4/0x1d0 [bluetooth]
[11816.562540] hci_le_meta_evt+0xbc/0x190 [bluetooth]
[11816.562730] hci_event_packet+0x1b0/0x4f8 [bluetooth]
[11816.562923] hci_rx_work+0xac/0x3d0 [bluetooth]
[11816.563113] process_one_work+0x148/0x3b8
[11816.563147] worker_thread+0x32c/0x450
[11816.563173] kthread+0x11c/0x128
[11816.563207] ret_from_fork+0x10/0x20
[11816.563244] Code: 14000004 91004084 eb07009f 54000180 (f9400085)
[11816.563273] ---[ end trace 0000000000000000 ]--- |
I also have bluetooth dropping on Pi4B, bnep0 tethering:
|
Describe the bug
I am experiencing random Bluetooth connect drop between the Pi and an audio speaker. These drops appear after a random time, sometime few minutes, sometime few hours.
Once the the drop happen, the only fix is to reboot the PI: RFKILL report no block, Bluez report an Unknown Error, hciconfig hci0 down && hciconfig hci0 up has no effect, only the dmesg seems to spot a problem.
I am using LibreElec 9 (8.95.003)
I am using both onboard Wi-Fi and Bluetooth (I upgraded to 3 to 3B+ because I read the antenna design was changed and allow both in use)
To reproduce
Connect a Bluetooth speaker, and start playing audio on it.
Expected behaviour
No drop at any time, or at least no need for reboot
Actual behaviour
Bluetooth getting completely unusable after drop
System
cat /etc/rpi-issue
)? LibreElec 9 (8.95.003)vcgencmd version
)? bcefbb195b77d6b9a02dfbad0e1fff3b18122585 (Jan 9 2019 20:07:49)uname -a
)? 4.19.14Logs
** Additional context **
I was using the RPI 3 before, with the exact same OS/Version, but this one didn't experience such a bug.
The text was updated successfully, but these errors were encountered: