-
Notifications
You must be signed in to change notification settings - Fork 85
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
BT issues after one week of constant usage #18
Comments
Do you have kodi installed along with bt and AirPlay? |
No. I did a custom install with just AirPlay and Bluetooth.
|
I'm assuming that you have rebooted as well. I would look at the syslogs to see if anything shows up there. If I were to guess, I would say it has something to do with the sample rate. It's not defined inside the alsa config. I would look to wiki for proper setting of sample rate for the pulse plugin. |
Brett - I'll keep my eyes on the syslog. Also - if you have any interest in an Echo Dot, I'm happy to send you one in exchange for helping me figure out what's going on here. You're welcome to keep it after as a thank you for helping me and championing this awesome project. My email address is on my profile page; drop me a line. 👍 |
Hi, I have the same issue. Use a PI 3 with internal BT device and a Samsung S6 for playing music over BT. Pairing is no problem and the connection is fine all the time but after 5 to 10 minutes the output from pi stops. After reconnect the phone the sound output is working again for some minutes. I use last raspbian and the actual script. |
Nilayp hey thanks again for that dot, I received it today and immediately began the testing. The good news, it seems to be a sample rate related issue, as disconnecting and reconnecting fixes the issue 100%
Now that I know the issue I can work at addressing it. |
I also found another issue that seems to cause the dropout as well:
It looks as though the SBC issue should be easier to fix, as I can reproduce this issue consistently, the other issue seems to happen as well but less often |
Brett, I saw the exact same SBC decoding error you did in /var/log/syslog. I did a little research and came across this blog post: https://delx.net.au/blog/2014/01/bluetooth-audio-a2dp-receiver-raspberry-pi where the author patched pulseaudio. (Look for the section labeled, "PulseAudio too picky when decoding SBC") Is that worth trying? -- Nilay |
I know how that goes with kids, I have a daughter just over a year old and she is just so busy all the time.
Unfortunately, rerunning the install isn't possible, it's meant for single use. I'd have to revisit all the code to see if I can get that implemented. For the time being I don't see it being done anytime soon, but who knows when I'll get some time for it.
Searching for errors I run:
cat /var/log/syslog | grep pulse && date
You could also search for bluez errors, but I don't think this is an issue with bluez, as it stays connected. To me it seems more of an issue with pulseaudio.
For the first error I've posted on stackoverflow to see if anyone has seen a similar issue:
|
As far as the SBC error, I would think it is definitely worth trying the SBC fix outlined in the above blog post. For the most part, I believe the biggest error that we are running into is the SBC error, as the SBC error can happen at any time interval from 1 minute to 3 hours into streaming. If that fixes the issue we can make sure its implemented into the project. |
I did a little bit of poking around on the patch above. And was first introduced in pulseaudio version 5.99.1. My RPI is one version back, version 5.0. |
What I would do before updating to the most recent pulseaudio version is backup all the files in
Then continue with the upgrade, then simply move the backed up files into the new I am assuming no extremely larger changes have occured to pulseaudio in the sense that they still use |
Okay, thanks for the tips. I probably won't be able to get to this until the weekend ... I'll report back shortly. |
I finally had time to try to install a later version of pulseaudio. After installed Jessie Lite and SSRPARI, my RPI has pulseaudio 5.0 installed. Since the logs only show the SBC problem, I thought I'd install the pulseaudio release version that fixed this issue, which is version 5.99.1. I'll try newer versions if this one doesn't solve the problem. The steps to install are:
I've run it for about 2 hours and haven't had any SBC errors yet. I'm going to allow it to run all night and see what happens in the morning. Hopefully everyone else having this issue can try to install v5.99.1 (or later) and report back. |
Sigh. It didn't work for long. I'm still seeing SBC errors that create the same problem as before. T
and
I'm going to upgrade pulseaudio to 10.0 and see if that resolves it. |
I have been looking into similar issues, unfortunately I haven't been able to get access to my Pi to start any debugging as of late. However, I am suspecting that the configuration of pulseaudio may be causing some issues and I am hoping by simply running following that it will fix the issue:
|
Okay, after a lot of trial and experimentation... I found pulseaudio 6.0 works best. It's easy to install, just replace the argument to --branch in the git clone command with "v6.0" I'm able to play audio for hours... and even keep the Echo Dot connected to BT overnight. I have gotten the SBC error once or twice during the course of the week and have to disconnect/reconnect bluetooth to fix it, but it's now very infrequent. |
This is great! Thank you for the work in debugging this. I tried a few different configs but it kept appearing with the SBC error. I'll implement this in the Install script once I get a chance. |
If you have the desire and/or time to do so, you can create a pull request in the bluetooth section of the installation and add lines you used to get it working properly. I will gladly merge that with the master, if not no problem at all and ill update it in the coming weeks. |
Ok, I have added the fix in the This is the fix i have added:
|
After running the script, I was having the same problem as mentioned in this bug with the "SBC decoding error" and needing to disconnect and reconnect to get audio to work again. After some investigation, I found that my system was still running pulseaudio 5.0 from /usr/bin, and pulseaudio 6.0 had been installed in /usr/local/bin. And after running pulseaudio audio from /usr/local/bin with no success, I found that it was not compiled with Bluez enabled. I found this page about compiling Pulseaudio on the Pi and installed all the prerequistites it mentioned except bluez-utils and bluez-alsa which no longer exist. And this time when I ran bootstrap.sh, it enabled Bluez. So, I'm not sure what was needed from there, but it worked. I then also edited /etc/init.d/pulseaudio to start /usr/local/bin/pulseaudio. |
I've been really busy this year... sorry for totally dropping off. I couldn't ever get my RPIs to work with Bluetooth reliably, so I stopped using them. Thanks to @armerpunkt for uncovering that my previous instructions didn't actually use pulseaudio 6.0. Doh! Reading that comment was truly embarrassing. Based on that comment and @maximus5684's PR, #58, I took the opportunity to make my RPIs useful again. And, I can report 100% success. There have been no dropouts, no SBC errors or any other issues. Both Airplay and BT sound great and have been 100% reliable too. That said - the installation had multiple failures that I document below. I have several RPI3 units with Hifiberry Digi+ sound cards. I'm not using the onboard WiFi (see issue #4). Also, there seems to be many issues with Stretch and I didn't want to get sucked into those... so I chose the last Jessie release, 2017-07-05. Here's my step by step from the beginning:
When this completes, Airplay works great with no problems. However, pulseaudio's bootstrap.sh fails due to three missing dependencies. I was able to install these dependencies after the failure. Error 1 during pulseaudio bootstrap is a weird one. intltoolize is installed with the intltool package, which is specified as a pre-req in bt_pa_config.sh, but it doesn't seem to install. There are no errors in the log, so I don't quite understand what happened there.
Error 2 during pulseaudio bootstrap is json-c is missing.
Error 3 during pulseaudio bootstrap is that sndfile is missing.
So... here are the exact steps I used to fix all these issues and make the system work.
|
Hey @nilayp I’ve been away as well. Unfortunately/fortunately I won’t have a job by years end so there’s not been a lot of work to focus on so I’m a bit more active here. I just finished updating my iOS to chromecast project so the next one to update is this! |
Also just wanted to say thank you for the effort and hard work! This is great news! |
Welcome back to you too... And sorry to hear about your job situation. I hope you find something new quickly. Thanks to you too... I feel like I'm finally enjoying listening to music around the house without worrying it's gonna crap out... :) |
Thanks! I have an internship lined up just waiting to hear back officially. It’s taken a while due to holidays. I’m hoping to this working on the master branch. I also want to simplify the install and remove a few of these other parts. I think I was a bit overly ambitious with everything I originally included. I’ll probably keep some of it in other branches but I think the largest draw of this repo is the Bluetooth and airplay. So the Bluetooth works solid even with the echo dots? I know that’s where I saw most of the issues. |
Ok I believe I have a fix with the install process. Anyone happy enough to try it out simply
Follow the prompts and all should work. I am unable to check if airplay works correctly as where I'm at has some restrictions with network related processes. However, the bluetooth worked flawlessly. I only have one issue when trying to patch the /boot/config.txt , but thats fixed easily enough. |
@nilayp I need to give you another thank you for this bt fix. I was playing around with my other repo https://github.com/BaReinhard/iOS-Audio-to-ChromeCast |
You're welcome! It was definitely a team effort ... and one of my thanksgiving guests shaming me for the music cutting out every so often. ;) It works so well now... the whole family is using it. |
I've installed three RPI3 units with Airplay and BT enabled. The Airplay is working flawlessly on all three units. The BT is having some trouble on all of them.
I'm connecting three different Amazon Echo Dot devices to each RPI3 via BT. Pairing the Dot to the RPI3 is easy and 100% reliable. Once paired, I can play music for some time without any skipping or problems. However, after some interval, music will stop coming from the speakers connected to the RPI3. Sometimes that is 10 minutes, other times 2 hours+. However, the Dot believes it is connected to the RPI3 and continues to play music. While I can't hear it, the Amazon Alexa iOS App shows the Dot is still playing tracks. Also, when I disconnect the Dot from BT, the music continues playing on the Dot's built-in speaker.
When the music stops playing on the speakers, if I disconnect the Dot from BT and then immediately reconnect it again, the music will resume on the speakers connected to the RPI3 until it stops again.
This is happening consistently on all three Dots. Each Dot is connected to it's own RPI3 via BT. Each RPI3 is connected to it's own receiver and speakers.
Does anyone else have this problem with an Amazon Dot or any other BT connected device? Does anyone have any suggestions on how I can debug this?
The text was updated successfully, but these errors were encountered: