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.
Posts by mklod
-
-
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 -
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'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. -
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.
-
Here's the full log after a clean boot and replicating the problem
https://paste.libreelec.tv/oriented-slug.log -
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 -
I spent a full day looking into proper NAS solutions. Synology looks like the way to go for an off the shelf ($700) solution, but I've decided to make my own for ~$300 with TrueNAS. Will update the thread with results, but I expect a proper NAS will fix the unmount issue.
-
By 'media box', do you mean the hdd tower?
My only SBC in this scenario is rpi4. The hdd tower is a simple ATAPI bridge that turns 5x internal SATA hdds into a single USB device connected to the rpi4 by a single USB cable.
I _could_ turn this hdd tower into a NAS, but if the hdd tower is the problem, that presumably wouldn't fix the issue. You bought a multi-bay NAS that doesnt have this problem? What is the model so I can look it up and check its hardware specs?
It feels like overkill for my needs, but a true NAS would give me greater flexibility...on the other hand this feels like a situation where a simple one liner script to keep all 5 hdds awake might be the next step in identifying the true cause of the problem. -
It happened again. 2/5 hard drives unmounted. There is a crash log associated with the event (attached, pastebin flagged it for objectionable content for some reason). No docker, no transmission installed anymore, let alone running.
crashlog
kodi_crashlog_20240110052754.log -
Well, the issue repeated. So the sleep setting on the hdd tower was not the issue.
There's one other complication to my story. After upgrading (clean fresh install) from LE10 to LE11 - all using the same hardware - that is when this issue first appeared. IIRC I had the same hdd tower on LE10 and did NOT have this unmount problem. I also think I was using docker and transmission on LE10, without issues.
But on current build, LE11, docker and transmission often give me problems with having to stop/restart the service and even sometimes remove and reinstall transmission. The symptom I get is, when adding a new magnet link to transmission, the free space on the target drive shows up as 1.99 GB, when the drive is actually some 100GB free space. That is how I know something has gone awry. This is sometimes coupled with the disk unmount problem. Typically the unmounted disk is the target download disk, plus sometimes additional disks. But it is hard to say if that itself is a symptom of a deeper problem or the cause. I've uninstalled transmission and I'm going to run without it for some time to see if the problem keeps happening without any docker services running. -
I have one of those USB pass thru sticks to measure current draw. The hdd tower draws 0A from the rpi USB port, because it is externally powered. Everything is on UPS.
Looking into the specific hdd tower, some people mentioned in reviews it would put drives to sleep, and sometimes only some of the drives, not necessarily perfectly correlated to inactive drives. My guess is some chinese-special firmware that is randomly sleeping some of the drives, which may cause an un-graceful unmount and remount attempt, which only windows can resolve ...because NTFS. The hdd enclosure mfr has a firmware utility to modify the sleep function. I have just used it to disable sleep. We'll see if that does it. Since the unmount is an intermittent issue, it could be some time before I say for sure.
The NTFS issue I had no idea about until now. It had never been an issue for me in the past with several (the exact same) NTFS disks on older SATA-USB docking stations and several previous versions of LE (Leia, Matrix). Hopefully it's not the problem here since I'd have to buy a large new hdd to transfer/preserve data and reformat all disks. But I suppose that will be the next thing I try if the problem persists. -
This sounds like power problem (despite the fact that your HDD tower is self-powered) - maybe some power peaks at night etc. I would suggest to add some reliable powered USB Hub between RPi and HDD tower (like this) and see if that makes any difference.
The hdd tower has its own ~7A external supply. It powers both the hdds and the SATA-USB bridge. It does not make sense to add a USB hub, and the manufacturer explicitly recommends not using a hub. Why add more USB in the mix? HDDs do not draw power over USB, they are externally powered.
All disks are NTFS. I am not aware of any hdd formatting issues with LE. Shouldn't all of the hdds equally have issues (all unmount instead of just 2-3)?
The hdd tower is JBOD using this hardware: https://www.amazon.com/gp/product/B06XK972L1
Maybe the tower is putting some inactive drives into sleep mode?
There's clearly some useful debugging in dmesg if someone could help interpret it.
-
I have an external hdd tower with 5 hdds inside. The hdd tower has its own 12V 6.5A power supply and uses a single USB cable to connect to rpi4. I can access media on all 5 drives most of the time, however, the system seems to randomly unmount some of the disks from time to time. The issue is resolved when I unplug the HDD hub from rpi4, plug it into a windows PC (which automatically prompts me to scan hdds for errors), check the disks, gracefully unmount from windows, and then plug back into rpi4. The disks are not damaged or corrupt. All drives are mounted into kodi, and I can watch media sources on all drives.
...until it happens again - without any obvious reason or trigger. Wash, rinse, repeat. I am tired of having to do this unplug/scan for errors/unmount/remount process at random times, and maybe twice a week. Why is this happening?
dmesg output:External Content pastebin.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.
kodi log attached (too large for pastebin, and ix.io is down) -
I'm also on RPi4.
What version of LE were you on before you upgraded the nightly and broke Transmission?
I can't help much more. I would suggest you install the broken Transmission from Thoradia to get all the dependencies, then install this over top of the version that it provides.
I started with a working version, then upgraded the nightly which caused Transmission to stop working. I rebuilt it and installed that, then it started working again.
Just one clarification that this is for RPi4 only.
-
Here's the one I compiled for my own purposes. It works with the 10.0 nightly and is built from the Thoradia repo.
Here's the sha1sum and original filename:
34d31925bbb6942494ec5a6a1d880d2e4c210e6d service.transmission-9.80.11.24.zip
You can install it manually.
Thanks. It installs OK but the transmission config page is only showing processing priority. Config page does not show the expected details for IP, port, and login info.
I've installed the 9.80 Thoradia, are there any other dependencies I may be missing? -
What is the newest/latest nightly libreelec version that works with Thoradia addons, specifically transmission?
I just tried out LibreELEC-RPi4.arm-10.0-nightly-20210321 (in attempt to get 4k HDR on my pi4) and it seems transmission is not compatible.I know it's not even in beta, but is there a timeline for support for LE 10?