Help to reconnect outputs with wireplumber
Jean-Philippe Lambert
spamme.pipewire at mailnull.com
Tue Aug 20 10:22:01 UTC 2024
Hello,
I am trying to set-up a fleet of headless Raspberry Pi with bluetooth
speakers.
I was impressed that it works very well with almost the default
configuration of pipewire.
> pi at dotpi-asterismes-001:~ $ uname -a
> Linux dotpi-asterismes-001 6.6.31+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.31-1+rpt1 (2024-05-29) aarch64 GNU/Linux
> pi at dotpi-asterismes-001:~ $ pipewire --version
> pipewire
> Compiled with libpipewire 0.3.65
> Linked with libpipewire 0.3.65
> pi at dotpi-asterismes-001:~ $ wireplumber --version
> wireplumber
> Compiled with libwireplumber 0.4.13
> Linked with libwireplumber 0.4.13
> pi at dotpi-asterismes-001:~ $ apt list --installed '*blue*'
> Listing... Done
> bluez-firmware/stable,stable,now 1.2-9+rpt3 all [installed,automatic]
> bluez/stable,now 5.66-1+rpt1+deb12u1 arm64 [installed,automatic]
> libbluetooth3/stable,now 5.66-1+rpt1+deb12u1 arm64 [installed,automatic]
> libspa-0.2-bluetooth/stable,now 0.3.65-3+rpt8+deb12u1 arm64 [installed,automatic]
> pi-bluetooth/stable,stable,now 0.1.20 all [installed]
I only changed one bluetooth property, for wireplumber to start without
login:
> -- load this before /usr/share/wireplumber/bluetooth.lua.d/90-enable-all.lua
>
> -- do not start and stop bluez with login: always run
> bluez_monitor.properties["with-logind"] = false
However, around 15 minutes after starting the bluetooth speaker, the
transport is disconnected, not matter if sound is being played or not.
This might be a problem with bluez, as I had the same problem without
pipewire, with bluez and jackd. (But not with the speakers, as I can use
them with phones for hours without interruption.)
The clients are moved to a "Dummy output". When I restart the bluetooth
speaker, a new transport is created.
> pi at dotpi-asterismes-001:~ $ bluetoothctl
> [DEL] Transport /org/bluez/hci0/dev_10_94_97_24_D0_13/sep1/fd2
> [DEL] Endpoint /org/bluez/hci0/dev_10_94_97_24_D0_13/sep1
> [CHG] Device 10:94:97:24:D0:13 Connected: no
> [CHG] Device 10:94:97:24:D0:13 Connected: yes
> [NEW] Endpoint /org/bluez/hci0/dev_10_94_97_24_D0_13/sep1
> [NEW] Transport /org/bluez/hci0/dev_10_94_97_24_D0_13/sep1/fd3
> [CHG] Transport /org/bluez/hci0/dev_10_94_97_24_D0_13/sep1/fd3 Delay: 0x05dc (1500)
> [CHG] Transport /org/bluez/hci0/dev_10_94_97_24_D0_13/sep1/fd3 Volume: 0x002f (47)
> [CHG] Transport /org/bluez/hci0/dev_10_94_97_24_D0_13/sep1/fd3 Volume: 0x0032 (50)
> [Ast-01]#
> pi at dotpi-asterismes-002:~ $ pw-top
> S ID QUANT RATE WAIT BUSY W/Q B/Q ERR FORMAT NAME
> R 28 1024 48000 151.2us 0.6us 0.01 0.00 0 Dummy-Driver
> R 67 0 0 31.4us 82.2us 0.00 0.00 0 + cpal_client_out
> S 29 0 0 --- --- --- --- 0 Freewheel-Driver
> S 36 0 0 --- --- --- --- 0 Midi-Bridge
> S 57 0 0 --- --- --- --- 0 v4l2_input.platform-bcm2835-isp.2
> S 59 0 0 --- --- --- --- 0 v4l2_input.platform-bcm2835-isp.3
> S 61 0 0 --- --- --- --- 0 v4l2_input.platform-bcm2835-isp.6
> S 63 0 0 --- --- --- --- 0 v4l2_input.platform-bcm2835-isp.7
> S 66 0 0 --- --- --- --- 0 bluez_output.10_94_97_24_D0_13.1
I would like to automatically reconnect the clients from the dummy
output to the new 'bluez_output.*' Could you please help me to do that?
Thank you for your help,
Jean-Philippe Lambert
More information about the Pipewire-devel
mailing list