OP25 Still unable to get Bluetooth audio out of OP25

Status
Not open for further replies.

w8jfj

Member
Premium Subscriber
Joined
Oct 30, 2013
Messages
74
Location
Central Michigan
I have been running OP25 on a Raspberry 3B+ (Buster) for a while. Audio is available at the AV jack, also on the local LAN via LiquidSoap and Icecast.

Regarding BlueTooth my BT speaker connects just fine and I can shoot a wave file to it and it plays using aplay command with the -D parameter. Previously I was able to play audio from a browser page on the BT speaker. That's not working now.

If I try to "connect" to the BT speaker using the audio icon (upper right corner) I get a message back "Failed to connect to Bluetooth device - Device not found by PulseAudio" (the bluetooth connection from the Pi to the BT speaker happens at boot via the /etc/rc.local).

I have tried various combinations in OP25.liq of commenting/uncommenting the ALSA and PulseAudio lines to get the OP25 audio to the BTspeaker. Is there another line I need to add to OP25.liq?

I wonder if I have some linkage missing in the BlueAlsa & PulseAudio connection.

my OP25.sh


./rx.py --nocrypt --args 'rtl' -N 'LNA:49' -s 1000000 -o 0 -d +200 -x 2 -f 853.9375e6 -T trunk.tsv -q -1 -V -2 -w 2> stderr-stream0.55 -v -10 -l http:0.0.0.0:8080

my OP25.liq

#!/usr/bin/liquidsoap

# Example liquidsoap streaming from op25 to icecast
# (c) 2019-2021 gnorbury@bondcar.com, wllmbecks@gmail.com
#

set("log.stdout", true)
set("log.file", false)
set("log.level", 1)

# Make the native sample rate compatible with op25
set("frame.audio.samplerate", 8000)

input = mksafe(input.external(buffer=0.25, channels=2, samplerate=8000, restart_on_error=false, "./audio.py -x 1.5 -s"))
# Consider increasing the buffer value on slow systems such as RPi3. e.g. buffer=0.25
# Longer buffer results in less choppy audio but at the expense of increased latency.



# OPTIONAL AUDIO SIGNAL PROCESSING BLOCKS
# Uncomment to enable
#
# High pass filter
#input = filter.iir.butterworth.high(frequency = 200.0, order = 4, input)

# Low pass filter
#input = filter.iir.butterworth.low(frequency = 3250.0, order = 4, input)

# Compression
input = compress(input, attack = 2.0, gain = 0.0, knee = 13.0, ratio = 2.0, release = 12.3, threshold = -18.0, rms_window = 1.0)

# Normalization
input = normalize(input, gain_max = 6.0, gain_min = -6.0, target = -16.0, threshold = -65.0)



# LOCAL AUDIO OUTPUT
# Uncomment the appropriate line below to enable local sound
#
# Default audio subsystem
out (input)
#
# PulseAudio
#output.pulseaudio(input)
#
# ALSA
#output.alsa(input)



# ICECAST STREAMING
# Uncomment to enable output to an icecast server
# Change the "host", "password", and "mount" strings appropriately first!
# For metadata to work properly, the host address given here MUST MATCH the address in op25's meta.json file
#
output.icecast(%mp3(bitrate=16, samplerate=22050, stereo=false), description="op25", genre="Public Safety", url="", fallible=false, icy_metadata="false", host="localhost", port=8000, mount="op25", password="*******", mean(input))
 

boatbod

Member
Joined
Mar 3, 2007
Messages
3,339
Location
Talbot Co, MD
Unless your BT is configurd as the default audio device, the liquidsoap script you posted is not going to work because it is only outputting to the default destination using the default sound system.

Whatever device name you are using for aplay -D can also be used in the output.alsa(input) section of the liquidsoap script.
Code:
ouput.alsa(input, device="your_bt_device_name_here")
Don't forget to comment out the default output
Code:
#out(input)
 

w8jfj

Member
Premium Subscriber
Joined
Oct 30, 2013
Messages
74
Location
Central Michigan
No luck with that change.

Here is my aplay command that does produce audio to the BT speaker:

sudo aplay -D bluealsa:DEV=08:EB:ED:B5:43:19 /usr/share/sounds/alsa/Noise.wav

I can see where the BT Speaker is connected on Bluetooth after booting.

It also appears in the audio icon (upper right). I get a message back "Failed to connect to Bluetooth device - Device not found by PulseAudio" if I try to click on it.

I still cannot get it to even play audio from a browser.

Some where I must have the different audio processors bound up.

Thanks, John.
 

hdphil

Member
Joined
Oct 17, 2008
Messages
30
W8jfj,
did you get your bluetooth speaker working?

I've also been fighting the same issue, and just got it working....
so this is what helped to make it work,


Code:
# LOCAL AUDIO
# Uncomment the appropriate line below to enable local sound
#
# Default audio subsystem
# out(speaker)
#
# PulseAudio
output.pulseaudio(input)
#
# ALSA
# output.alsa(input)

And i found this information:


scroll down to " How do I get it?"
followed the instructions.

1633057897380.png

well worth it,

Philip

edit:
I just tried it on my other system ..... Worked!
 
Last edited:

w8jfj

Member
Premium Subscriber
Joined
Oct 30, 2013
Messages
74
Location
Central Michigan
W8jfj,
did you get your bluetooth speaker working?

I've also been fighting the same issue, and just got it working....
so this is what helped to make it work,


Code:
# LOCAL AUDIO
# Uncomment the appropriate line below to enable local sound
#
# Default audio subsystem
# out(speaker)
#
# PulseAudio
output.pulseaudio(input)
#
# ALSA
# output.alsa(input)

And i found this information:


scroll down to " How do I get it?"
followed the instructions.

View attachment 110212

well worth it,

Philip

edit:
I just tried it on my other system ..... Worked!
Phil, thanks for the pointers. I walked through the instructions. everything seems to have updated and installed properly. However when I went to swap over the audio:

" To swap over the volume and input selector on the taskbar from ALSA to PulseAudio, after your Raspberry Pi has restarted, right-click a blank area on the taskbar and choose Add / Remove Panel Items. Find the plugin labelled Volume Control (ALSA/BT) in the list, select it and click Remove; then click the Add button, find the plugin labelled Volume Control (PulseAudio) and click Add. "

My existing plugin was just labeled "Volume Control" did not have the ALSA/BT. And when trying to all the Volume Control (PulseAudio) that was not found.

I must have missed a step to get the pulseaudio bluetooth installed. Any suggestions.

Thanks, John.
 

hdphil

Member
Joined
Oct 17, 2008
Messages
30
are you able to connect to your bluetooth speaker?

a right click on the speaker icon brings up this:

1633274901658.png


then click on device profiles:

1633274981797.png

notice the red sliders on device profile? that may be different , i'm not sure

did you do all of the possible updates?

maybe do a fresh install on another sd card,

Philip

oh, i had to do a restart for it to work
 
Last edited:

w8jfj

Member
Premium Subscriber
Joined
Oct 30, 2013
Messages
74
Location
Central Michigan
are you able to connect to your bluetooth speaker?

a right click on the speaker icon brings up this:

View attachment 110316


then click on device profiles:

View attachment 110317

notice the red sliders on device profile? that may be different , i'm not sure

did you do all of the possible updates?

maybe do a fresh install on another sd card,

Philip

oh, i had to do a restart for it to work
Well, I did do a reboot, as mentioned in the "how to get page". I think I am one step back as I do not have the BlueTooth icon at the top of my screen either.
 
Status
Not open for further replies.
Top