0

Tl;Dr Multiple bluetooth devices throttle bl-data causing audio skipping. Can external bl-dongle be set up to be used in one application and integrated module in other?


I'm trying to setup Raspberry Pi 4 B as a bluetooth speaker system. At the same time I want RasPi to be able to collect some sensor data from RuuviTag via bluetooth. However, this seems to cause some troubles with audio.

First of all, I have set a newly installed Raspberry to read sensor data and store it to Influx database that is readable by Grafana. Instructions mostly as in Ruuvi forum The main idea is to use RuuviCollector for bluetooth data reading. This part works fine on its own.

Now, I wish to be able to stream music from my phone to the Raspberry that has a Hifiberry Amp2 hat installed. In this part of the project I followed the instructions in Raspberry forum.

From the beginning I noticed that audio was heavily clipping and skipping, making music unrecognizable. I tried to fix this issue as it seemed to have something to do with Pulseaudio. Something happened after following AskUbuntu-forum solution when I added latency offset and the audio was fixed, but now the data did not load from sensor to cloud.

After some tests I noticed that if phone is connected and I restart RuuviCollector the audio starts skipping again, and if I restart bluetooth service and connect to phone audio the music is OK while RuuviCollector fails to get data from the sensor.

So the issue here seems to be with multiple bluetooth devices communicating simultaneously with Raspberry Pi. Any tips how to fix this issue? I ordered an external bluetooth dongle but while waiting shipment I fear that it may not solve the problem. Is it possible to use two different bluetooth devices (external dongle and integrated bl-module) in different applications to avoid bottle necking? Or is this probably fixed with using external dongle? Or is there something to try with the internal bluetooth module?

I'll happily provide more info about the issue if needed. I'm still a beginner with raspberry so please provide CLI commands to execute so I can provide log data or outputs to consider.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.