News for hackers. Stuff that matters.
Re:DIY IP-KVM Based on Raspberry Pi by pizza on Sunday October 29, 2023 @07:36PM (#38063945)
Would love a bluetooth muxer via rpi.

Have a few devices that keep conflicting with one another and acquiring the connection to my bluetooth headset. I have to go through the hassle of navigating to the offending device's bluetooth settings, disconnect it, go to my desired device's settings (which, although it reports it is connected, doesn't actually produce any sound), disconnect it, then reconnect it. Each time.

I'd rather have them all stay connected (maybe one cheap dongle per endpoint) to my rpi and then route to the intended destination with just a press of a physical toggle/key/slider etc, or via phone app.

Additionally would like to be able to simultaneously mix multiple audio sources to the one headset.. oh, and all of this with no latency overhead, please :)

Re:DIY IP-KVM Based on Raspberry Pi by deegles on Monday October 30, 2023 @12:02AM (#38065539)
You could do it with a 4 channel mixer and USB audio devices hooked up to one Bluetooth transmitter... I don't know about latency though and good luck with the cable management!

Rolls MX51S Mini Mix 2 Four-Channel Mixer https://a.co/d/48XLqLi

USB to RCA https://a.co/d/iam01Xj

Bluetooth 5.0 Transmitter 3-in-1 https://a.co/d/47TuAMn

Re:DIY IP-KVM Based on Raspberry Pi by adamzegelin on Monday October 30, 2023 @01:17AM (#38065955)
Probably do-able using Pipewire/Pulseaudio.

I just tried, and I'm able to pair both my Macbook Pro and iPhone to my Linux desktop PC. The PC has Kensington Bluetooth USB dongle. Both the MBP and iPhone can simultaneously play audio over Bluetooth and I can route the incoming audio to a pair of wired headphones. The volume of each stream is independently adjustable via `pavucontrol`.

I also tried pairing a bluetooth headset, but the audio was choppy. Maybe too much bandwidth for 3 devices streaming audio at once? Maybe another dongle would work?

Note that at one point I was experimenting with receiving BT audio on my PC. I can't remember the exact set of configuration changes needed to make this work (if any -- it might've worked out of the box). But the stack is BlueZ + Pipewire on Archlinux.

Pipewire (and Pulse) have a lot of modules and config knobs. Might be possible to get auto-switch working too. They also expose a D-Bus interface, so control from some sort of e.g. Python webapp from your phone is likely.

Re:DIY IP-KVM Based on Raspberry Pi by consp on Monday October 30, 2023 @03:53AM (#38066719)
> I also tried pairing a bluetooth headset, but the audio was choppy.

Try reconnecting it. I have the same problem with my headset sometimes and reconnecting fixes it. My best guess is the implementation of the two Bluetooth modules don't play nice with each other. I have no troubles connecting to a different pc.

Re:DIY IP-KVM Based on Raspberry Pi by Nextgrid on Monday October 30, 2023 @06:55AM (#38067850)
Definitely possible, and I've done a similar proof of concept using PipeWire with "Wireplumber" as the GUI to map the required inputs/outputs to a wired headset.

The problem was that I had no clue where to even begin to make this setup persistent so I could eventually put it all on a GUI-less RPi, so I gave up.

Re:DIY IP-KVM Based on Raspberry Pi by midasuni on Monday October 30, 2023 @05:27AM (#38067266)
So a normal analog 3.5mm input into a cheap mixer?

20 years on and bluetooth still can’t get the ease and reliability of a 50 cent audio cable.

Re:DIY IP-KVM Based on Raspberry Pi by redserk on Monday October 30, 2023 @06:24AM (#38067632)
Depends on your devices. My Airpods switch between my iPhone, Macbook, and iPad without issue.
Re:DIY IP-KVM Based on Raspberry Pi by fensgrim on Monday October 30, 2023 @11:02AM (#38070281)
I had plans to do such project for exactly same reasons since, like, 2011..

Wanted to have pulseaudio/alsa dmix handling multiple streams/mixing them out with a help of dedicated hardware BT/DAC-ADC-BT path, with a goal to have smart handling of voice calls over music on the go, fake 5.1 in the room, and a voice enhancer / fast rewind for call streams..

Then, Volumio took enough of the raspberry-based hifi market (despite having no bluetooth support, lol) that I've declared these plans no-go as investing in this solely for fun wasn't that enticing, compared to just getting a spare set of equipment to separate work/home audio.

Re:DIY IP-KVM Based on Raspberry Pi by magixx on Monday October 30, 2023 @12:34PM (#38071786)
I think the reverse of this kind of exists in the from of Bluetooth to 3.5mm receivers. The one I have and most I've seen support two connections so I can have both PC and laptop output sound on some speakers. You could probably chain a multi input receiver to a single output transmitter via 3.5mm to your Bluetooth headphones and just toggle connections on the receiver to select the device you want your headphones to use.

The bad news is the latency which is about 200ms regularly and 40ms with APT Low Latency or 80ms with APT Adaptive. If you go BT > BT RX > BT TX > BT this might be doubled. Both devices will also need to support the same codes and only newer devices support APT Adaptive.