Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8035

Graphics, sound and multimedia • Re: Does bluetooth audio work with Raspberry Pi OS LITE?

$
0
0
Should work, you just need to do the right thing. I wrote a whitepaper on this, but I cannot find it in PIP, maybe I haven't released it yet? Anyway, the process is:

Code:

$ bluetoothctl discoverable onMake the device pairable with other devices.$ bluetoothctl pairable onScan for {BT} devices in range.$ bluetoothctl scan onTurn off scanning:$ bluetoothctl scan off`bluetoothctl` also has an interactive mode, invoked by using the command with no parameters. The following example runs up the interactive mode, where the "list" command is entered, and shows the results when run on a {pi-prefix} 4 running {pios} Lite Bookworm.$ bluetoothctlAgent registered[bluetooth]# listController D8:3A:DD:3B:00:00 Pi4Lite [default][bluetooth]# You can now type commands in to the interpreter and they will be executed.A typical process for pairing with, and then connecting to a device may be as follows.$ bluetoothctlAgent registered[bluetooth]# discoverable onChanging discoverable on succeeded[CHG] Controller D8:3A:DD:3B:00:00 Discoverable on[bluetooth]# pairable onChanging pairable on succeeded[CHG] Controller D8:3A:DD:3B:00:00 Pairable on[bluetooth]# scan on< could be a long list of devices in the vicinity >[bluetooth]# pair [mac address of device, from the scan command, or from the device itself, in the form xx:xx:xx:xx:xx:xx][bluetooth]# scan off[bluetooth]# connect [same mac address]The {BT} device should now appear in the list of sinks, as shown in this example from a {pios} Lite installation. You can now make this the default, and play back audio to it.$ pactl list sinks short69 alsa_output.platform-bcm2835_audio.stereo-fallbackPipeWire s16le 2ch 48000HzSUSPENDED70 alsa_output.platform-107c701400.hdmi.hdmi-stereoPipeWires32le 2ch 48000HzSUSPENDED71 bluez_output.CA_3A_B2_CA_7C_55.1PipeWires32le 2ch 48000HzSUSPENDED$ pactl set-default-sink 71$ paplay <example_audio_file>

Statistics: Posted by jamesh — Tue Nov 26, 2024 4:39 pm



Viewing all articles
Browse latest Browse all 8035

Trending Articles