site  contact  subhomenews

Automatic launch of MSCW when BT audio device connected

October 21, 2020 — BarryK

When you click on the Blueman tray applet, then search for and connect a bluetooth audio device, another step still remains, to choose it as the default output (or input).

The default audio device is chosen by the Multiple Sound Card Wizard (MSCW), script /usr/sbin/mscw.

What I have been working on, is to get MSCW to launch automatically after Blueman (or any other BT connection utility) has made a connection to an audio device.

I have achieved this by adding a rule to /etc/udev/rules.d/91-pup_event.rules, to run a script when a bluetooth device is added: /usr/local/pup_event/bluetooth-add

Script 'bluetooth-add' will detect a newly-connected BT audio device, and run MSCW.

Everything seems OK, it works, however, there is one big fatal problem: 'bluetoothd' keeps crashing. Here is what 'dmesg' reports:

[ 8577.554723] bluetoothd[3559]: segfault at 3c00000020 ip 00007fdda6a59df5 sp 00007ffc111ea2a0 error 6 in[7fdda6a36000+76000]

I compiled the latest Bluez, version 5.55, same problem. The challenge now is to avoid the crashing. 

Tags: easy