morrolinux / mpradio-py

Morrolinux's Pirate radio (PiFmAdv wrapper with Bluetooth and mp3 support) - Stream music to your car's FM radio or use it as a Bluetooth speaker via headphone jack
73 stars 11 forks source link

Streaming from bluetooth (alsa pcm/bluez issues) #61

Closed dwijenchawra closed 3 years ago

dwijenchawra commented 3 years ago

Hey there, I installed this as per the instructions on a Raspberry Pi B+ running the latest raspbian 10 release, and I have been having issues with the Bluetooth streaming from my phone. I followed all the install instructions and checked the logs and found some useful tidbits that may help in debugging.

command: ./mpradio.py https://pastebin.com/r9P1irsf

command: sudo systemctl status bluealsa.service https://pastebin.com/sdSRigpM

command: cat /var/log/bluetooth_dev [Wed Dec 30 20:53:04 GMT 2020]: Start Bluetooth played connection

I'm able to broadcast to fm using the test sound and the mp3 files in /pirateradio/. I'm familiar with cmd so please let me know if there's any other info I can provide

Any help would be greatly appreciated!

dwijenchawra commented 3 years ago

Huh, after reading the other open issues, it turns out that the Bluetooth audio doesn't work if there are no music files in /pirateradio/. I also encountered the slowed audio, which was fixed by a quick reboot. Not sure why that matters but I would assume it's something to do with the program crashing after it's unable to find files.

dwijenchawra commented 3 years ago

There are also stuttering issues with the Pi B+, every 20 ish seconds it loops back about half a second of audio. I will test on a Pi 3 and see whether it is simply low specs. The Pi 3 was on max overclock.

dwijenchawra commented 3 years ago

Still occurs with the Pi 3, i have tested the pi_fm_adv program separately with no issues, and playing local files also works fine. I have also disabled wifi on the board. Any way I can debug this? Not sure which log file to look at, or if this would be logged at all.

dwijenchawra commented 3 years ago

making a new issue for the stuttering, as the original issue has been resolved