Bluetooth autoconnect

  • Maybe just a myself-reminder. but I have saved a gist with the udev rules needed for letting my LE box to autoswitch the output audio device on bluetooth connected device.

    The outcome is:
    BT connected -> pulse active (A2DP output)
    BT disconnected -> alsa active (HDMI output)

    Feel free to comment or suggest improvements.

    Edited once, last by witokondoria (October 12, 2016 at 9:18 PM).


  • Maybe just a myself-reminder. but I have saved a gist with the udev rules needed for letting my LE box to autoswitch the output audio device on bluetooth connected device.

    The outcome is:
    BT connected -> pulse active (A2DP output)
    BT connected -> alsa active (HDMI output)

    Feel free to comment or suggest improvements.

    What is the purpose of this? How the pulse and alsa can active together? Why the HDMI output when BT connected?

  • Just to say I use this with audioprofilesswitcher, so instead of pointing to your bluetoothHandler.sh I use a couple of shell scripts to switch audio profiles.
    eg as simple as

    Code
    [code]
    #!/bin/sh
    
    
    /usr/bin/kodi-send --action="RunScript(script.audio.profiles,1)"


    [/code]
    It works great for me, many thanks for documenting it.


  • Just to say I use this with audioprofilesswitcher, so instead of pointing to your bluetoothHandler.sh I use a couple of shell scripts to switch audio profiles.
    eg as simple as

    Code
    [code]
    #!/bin/sh
    
    
    /usr/bin/kodi-send --action="RunScript(script.audio.profiles,1)"


    [/code]
    It works great for me, many thanks for documenting it.

    Maybe this works better?

    Edited once, last by Bloksel (November 17, 2016 at 12:21 PM).

  • Maybe this works better?

    I did think about combining, but I couldn't see an advantage. What am I missing?