Raspberry's sound Bug with a bluetooth headphone - bluetooth

everybody!
I'm trying to connect my raspberry pi 3 bluetooth to my headset. However the sound bug. It's kind of intermittently cutting off quite randomly, which makes it sound terrible.
I'm using the Raspberry 3's built-in bluetooth with Pulseaudio on Raspberry Pi OS V4.19.
How do I fix it?

This sounds like the known issue. You might want to follow some of the issues that are open around this topic:
https://github.com/Arkq/bluez-alsa/issues/60
https://github.com/raspberrypi/linux/issues/1552
https://github.com/balenalabs/balena-sound/issues/62

Related

Receiving data from a BLE device to a raspberry Pi3

I never used a raspberry pi before and I have a project part of which includes receiving data from a BLE blood pressure device over Bluetooth to a raspberry pi 3. I can pair the device to my raspberry but I have no idea what to do next. I need to be able to receive the measurements in my raspberry please help and thank you in advance.
PS: the device I'm trying to use is very similar to this one:
https://ibb.co/71365k5
Thanks for your answers, I have tried "Gatt" and "Gatttool" but the problem is after pairing the device is meant to send the measurement to its application on an android phone, without it I cannot read the blood measurement characteristic or it just does not exist.
Linux uses BlueZ as a default bluetooth stack. It exposes DBus APIs for implementing software using Bluetooth.
If you don't want to use this API directly, which can sometimes feel a bit low level you have many libraries that wrap it, such as https://github.com/getsenic/gatt-python that also comes with examples.
All other solutions requires replacing the Bluetooth stack on Linux and hence your other existing Bluetooth pairings to the system will stop working.

DIY Google home using PC and BT speaker with mic

I have this BT speaker , with in built mic , http://www.intex.in/speakers/bluetooth-speakers/it-11s-bt
i want to build something like google home with it , using python .Please guide me.
There seems to be a lot of issues with using a bluetooth speaker & mic combo on the raspberry pi. Most people have an issue getting the mic to work. This thread discusses some of the issues. This extensive post describes needing a bluetooth dongle
You may be better off using it as a speaker and then buying a separate mic.
Then just connect the blutooth speaker to the pi (from the top right of the screen) and plug in the microphone and run through this tutorial.
I've read a couple articles and comments that suggest the reason why bluetooth is not an ideal setup is because BT and WIFI both use the same 2.4 Ghz band and slow each other down / disconnect when used simultaneously. My advice would be to do what I did: run a usb mic with an extension cable from inside a cabinet or entertainment unit and connect it to your audio system or run a 3.5 mm headphone jack extension too.
I've been writing a tutorial that is for beginners and is super easy to follow. All the steps to get it up and running (step 3) and monitor-free (step 4) are there.
I'll be working on it throughout the summer, adding the LED support, similar to G Home. Best of luck!

PulseAudio Bluetooth Speaker crash on Raspberry Pi

I just bought a JBL speaker, tested it on my phone and proceeded with this tutorial on my Raspberry Pi:
https://www.raspberrypi.org/magpi/bluetooth-audio-raspberry-pi-3/
I managed to pair and trust the speaker, but I can't connect to the device from bluetoothctl, only from audio settings.
Problem is, most of the times it doesn't work. I've managed to have audio for 3 seconds in a timespan of ... 4 hours.
This is where PulseAudio crashes:
E: [pulseaudio] bluez4-util.c: org.bluez.Manager.GetProperties() failed: org.freedesktop.DBus.Error.UnknownMethod: Method "GetProperties" with signature "" on interface "org.bluez.Manager" doesn't exist
I've tried a lot of things from forums, nothing worked.
Thank you for your help!
I had a similar problem, but then I used a USB bluetooth adaptor for connecting to my speaker, and now I get a nice stable connection all the time.
I can't be 100% sure that this will fix your problem, but give it a try. It seems that the built in bluetooth adaptor for rasp Pi 3 isn't great. I used an Asus adaptor, but if you need to buy one, you can find a list of the officially supported adaptors # https://www.raspberrypi.org/.
Stephen

PulseAudio static noise for 10 minutes after boot

I am building a Bluetooth audio receiver as an embedded system with the CHIP sbc (single board computer) from getchip.com. Pretty similar to Raspberry Pi, runs Debian Jessie, too.
I am using the onboard 3.5mm jack as an audio output. I configured PulseAudio to receive the Bluetooth audio and redirect it to the ALSA sound driver.
Everything works flawlessly except for static noise on the output.
Directly after boot there is a medium loud sum in the few hundred Hz region.
It´s always in the background, even if I play something via bluetooth or locally via CLI.
The interesting part is that it disappears after exactly 10min and 10sec after powerup, so I think exactly 10min after the startup of PulseAudio or ALSA.
I couldn´t find a reason for it.
I tried the tsched=0 fix in /etc/pulse/system.pa
I unloaded the module suspend-on-idle in /etc/pulse/system.pa
And by the way, I´m running PulseAudio in system-mode, as I´m using it as an embedded system and not a multi-user configuration. I hope I get help from you anyway ;-)
Maybe you have an idea where this noise could come from?
It has to be some sort of software configuration issue, otherwise it wouldn´t disappear after exactly 10mins.
I´ll add the PulseAudio and ALSA configuration files later this day.
Thanks in advance!
Fortunately I solved the problem on my own:
The C.H.I.P. from NextThing has a 3.5mm TRRS jack, which does not only output stereo audio but component video as well.
Now if you plug in a standard 3.5mm jack, the ground pin does does interfere with the component video connector.
Thats why there was this humming noise on the audio output. And thats why it disappeared exactly after 10mins, because the screen idle time is 10min, I think.
So I have to admit, that it was indeed not a programming question as it was a connection issue. Thanks anyway for the quick answer!

DAC pops on Song Start/Stop in Raspbian

This has been a plaguing issue for the Raspberry Pi install of Raspbian (Debian Wheezy) since it was first built. Talking directly to the Raspberry Pi foundation and the Raspbian team has given me no luck.
The issue itself is that the DAC doesn't initialize until it starts playing a song. It then will turn itself off when done, causing another pop. When using this for a pure music player it is infuriating to say the least, especially when the pop is loud.
I have heard this on VLC, MOCP and MPD. This has been covered in the Pi forums, but no answers are found: http://www.raspberrypi.org/phpBB3/viewtopic.php?f=38&t=8783
I turn to you at Stack Overflow to see if there is a way to solve this issue. My idea is to initialize it at start-up so the pop only happens when it boots up, though I don't know how to control the ALSA to do that.
Hopefully a solution can be found.
Thanks!
I've experienced the same crackling and popping noises on the Raspberry Pi's analog output when using mpd. The problem is also discussed here: https://github.com/raspberrypi/linux/issues/128
Your idea of configuring the audio hardware to be initialized only once at boot time is exactly what I did to solve the problem. It's possible to do this using the PulseAudio sound system, which works as a proxy between the audio hardware and programs that want to output sound. For example, audio players like mpd can be configured to use PulseAudio as audio backend.
PulseAudio has a configuration option (module-suspend-on-idle) that configures audio hardware sleep. Disabling audio hardware sleep fixed all crackling and popping noises for me.
I've outlined the necessary steps in closer detail on my blog: http://dbader.org/blog/crackle-free-audio-on-the-raspberry-pi-with-mpd-and-pulseaudio
I have the same problem and resolution is to use either USB audio or HDMI audio output (however converting hdmi audio to analog audio is not easy, converter >40$). It is caused by broadcom firmware. They were saying on rpi forum that it is on the list, but no one knows when it will be really fixed ...
Update: I have tried Creative Play! USB audio, it is the same, however the "click" is not that loud. So it is not 100% solution, we have to wait for the fix.
By using the Aureon Dual USB sound card I got zero popping from my raspi. Before I had popping at every song.
I have read that using the Aureon is impossible without limiting the usb ports to version 1.1, but this was not the case for me. It worked out of the box. One slight problem remains, I cannot insert the sound card when the raspi is on, it will reboot. But that's not a problem for me, I never remove the sound card.
My raspi runs raspbian wheezy and plays music via mpd and an nfs share.

Resources