[RPi5] Bluetooth Dongle on LE12

  • 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

  • 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>Logging
    2. Restart Kodi
    3. Replicate the problem
    4. 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
  • Thanks. Now I'm thinking LE uses an incomplete Bluetooth driver:

  • 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.com
    Content 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.

    Edited once, last by mklod: added full kodi log (August 12, 2024 at 10:54 PM).

  • 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.