I often use bluetooth headphones with LE. I'm not happy with BLE range on rpi4 or rpi5. I am purchasing BLE dongles with external antenna until I find one that works with LE + rpi. There is a dearth of information on the subject of BLE dongles + RPi.
I finally found a dongle that plays nice with RPi + LE and has an external antenna for improved range:
Sena USB Bluetooth Adapter, model no UD100-G03
This dongle is basically plug and play, unlike several others that I have tried. Unfortunately, the sound quality is poor.
To replicate my the issue:
--Plug in the dongle
--Add the bt-disable overlay to config.txt in order to disable the onboard BLE on the RPi, then reboot the RPi
--Go to LE settings. Wifi is disabled, BLE is enabled.
--Go to Bluetooth, find and connect BLE heaphones
--Play something in LE
I was able to find and pair my headphones rather quickly. Headphones appear to be generally working, but sound quality is very poor (it intermittenly outputs your weird dialup sounds/feedback as is typical with a bad BLE connection). Any ideas on troubleshooting this? Also open to dongle selection advice. I searched Amazon for dongles that are known to work well with Linux.
lsusb
https://paste.libreelec.tv/integral-colt.log
dmesg
https://paste.libreelec.tv/holy-turtle.log
[RPi5] Bluetooth Dongle on LE12
-
mklod -
August 8, 2024 at 11:49 PM -
Thread is Unresolved
-
-
The driver seems to work. I guess you're on a low sampling rate. We need a full log for audio quality...
Please provide a full debug log.How to post a log (wiki)1. Enable debugging in Settings>System Settings>Logging2. Restart Kodi3. Replicate the problem4. Generate a log URL (do not post/upload logs to the forum)
use "Settings > LibreELEC > System > Paste system logs" or run "pastekodi" over SSH, then post the URL link -
Here's the full log after a clean boot and replicating the problem
https://paste.libreelec.tv/oriented-slug.log -
Thanks. Now I'm thinking LE uses an incomplete Bluetooth driver:
Code
Display MoreAug 08 19:26:47.853413 kodi bluetoothd[628]: profiles/network/bnep.c:bnep_init() kernel lacks bnep-protocol support Aug 08 19:26:47.854683 kodi systemd[1]: Starting kodi-waitonnetwork.service... Aug 08 19:26:47.853437 kodi bluetoothd[628]: src/plugin.c:init_plugin() System does not support network plugin Aug 08 19:26:47.854742 kodi systemd[1]: lircd.service was skipped because of an unmet condition check (ConditionPathExists=/storage/.config/lircd.conf). Aug 08 19:26:47.855066 kodi systemd[1]: lircd-uinput.service was skipped because of an unmet condition check (ConditionPathExists=/storage/.config/lircd.conf). Aug 08 19:26:47.865289 kodi systemd[1]: Starting sshd.service... Aug 08 19:26:47.866274 kodi bluetoothd[628]: src/plugin.c:init_plugin() System does not support bap plugin Aug 08 19:26:47.866314 kodi bluetoothd[628]: src/plugin.c:init_plugin() System does not support bass plugin Aug 08 19:26:47.871909 kodi kernel: macb 1f00100000.ethernet eth0: PHY [1f00100000.ethernet-ffffffff:01] driver [Broadcom BCM54213PE] (irq=POLL) Aug 08 19:26:47.872501 kodi kernel: macb 1f00100000.ethernet eth0: configuring for phy/rgmii-id link mode Aug 08 19:26:47.866318 kodi bluetoothd[628]: src/plugin.c:init_plugin() System does not support mcp plugin Aug 08 19:26:47.866323 kodi bluetoothd[628]: src/plugin.c:init_plugin() System does not support vcp plugin Aug 08 19:26:47.866329 kodi bluetoothd[628]: profiles/audio/micp.c:micp_init() D-Bus experimental not enabled Aug 08 19:26:47.866333 kodi bluetoothd[628]: src/plugin.c:init_plugin() System does not support micp plugin Aug 08 19:26:47.866339 kodi bluetoothd[628]: src/plugin.c:init_plugin() System does not support ccp plugin Aug 08 19:26:47.866345 kodi bluetoothd[628]: src/plugin.c:init_plugin() System does not support csip plugin Aug 08 19:26:47.866479 kodi bluetoothd[628]: Bluetooth management interface 1.22 initialized
-
I was asking a dev for this. Stay tuned.
-
Any news?
The Sena UD100 dongle is the closest I've gotten to working, so I am hopeful for a solution.
The majority of BLE dongles on amazon appear to be realtek. It was a waste of time trying with those, even with the firmware replacement procedure (see https://wiki.libreelec.tv/how-to/add-firmware and https://linuxreviews.org/Realtek_RTL8761B ), I was not able to get audio working.
-
Nope. I was asking HiassofT . Maybe he is in holidays.
To me it looks like some kernel modules are missing. In the meantime you can try the dongle on RPi OS.
-
I'm seeing the same issue with audio quality on RPi OS.
This dongle has -40db connection. Stock RPi has -61db connection. It would be amazing to get this working perfectly. -
Ubuntu for RPi4 was even worse result. The dongle shows up but won't connect to anything. I found an interesting resource on the subject regarding BLE dongles and kernel patches:
External Content gist.github.comContent embedded from external sources will not be displayed without your consent.Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.
And some good news: I downloaded and tried out the latest nightly on RPi4 (LibreELEC (community): nightly-20240811-266cfd7 (RPi4.aarch64) ), and it does not seem to have any problems with audio quality. The Sena UD100 dongle is plug and play after adding the overlay for disabling onboard BLE (dtoverlay=disable-bt) and rebooting. Audio quality is good and connection is reliable over much longer distances than the original onboard antenna. Audio is no longer garbled when I go to a different room!
lsusb:
Bus 001 Device 003: ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
dmesg for RPi4 nightly:
https://paste.libreelec.tv/set-kingfish.log
kodi log for RPi4 nightly:
https://paste.libreelec.tv/champion-octopus.log
Bluetooth dongle link:
https://www.amazon.com/dp/B0161B5ATM
I will try the latest RPi5 nightly tomorrow. I imagine (and hope) it will also work. -
I will try the latest RPi5 nightly tomorrow. I imagine (and hope) it will also work.
Yes please. Maybe the BlueZ driver is more recent in all nightly builds.
-
No such luck.
RPi4 nightly solves the problem, but RPi5 nightly still has issues with audio quality.
lsusb
https://paste.libreelec.tv/finer-viper.log
dmesg
https://paste.libreelec.tv/smooth-primate.log
kodi log
https://paste.libreelec.tv/charming-mastodon.log -
After more testing, the dongle is still quite problematic even on RPi4 nightly. It does not gracefully reconnect after successful pairing. Instead, you have to fully remove the device, toggle bluetooth off and on, and generally mess about endlessly with the settings each and every time you want to connect bluetooth headphones. It's a completely untenable hassle.
The stock BLE on any RPi does much better with pairing and auto-reconnecting wireless headphones. The BLE audio switcher addon also works great with RPi's native BLE. However, the connection is always a very short range, even if you take care to disable wifi and USB 3.0. I'm talking about 12 feet, line of sight, with the RPi in a plastic case or no case at all. It's truly awful. An external antenna mod on the RPi doesn't actually fix things up much with regards to BLE range, and I tested 8 different antennas. Similarly, an external antenna on the CM4's stock antenna connector doesn't help much either. I'm an engineer and I've done exhaustive quantitative testing, and I've spent so much time looking at it that I can't be bothered to write up the complete tests now. Perhaps another day.
For now, I'll just say that (1) there's some inherent underpowering to RPi's BLE capabilities - like it was a tacked-on afterthought, dragged through each and every iteration of the RPi and never actively developed or improved - and (2) external BLE dongles generally don't play nice with RPi. It's not a problem specific to LibreElec, which is clear after testing every distro and multiple versions of each distro for RPi 4 , cm4 and RPi 5. No wonder there's a lack of information on BLE dongle compatibilities with RPi. The threads are all dead ends because the work is a dead end. It's a massive waste of time.
So there it is, I've given up on RPi + BLE entirely. There's a much easier solution that won't rob you of countless hours of frustration: the Kodi Audio Profiles addon + an external BLE transmitter box. The BLE transmitter is purpose made for graceful pairing and longer signal range with an external antenna. Audio profiles lets me use my custom remote for kodi and press a single button to switch audio outputs, from my AVR to my BLE transmitter/BLE headphones, and back again.
I hope this helps someone in the future looking at using bluetooth dongles on raspberry pi. Don't bother. Use the onboard BLE or find another solution.