Added script to set volume of BT headset to max.

This commit is contained in:
Markus Birth 2020-06-14 02:05:10 +02:00
parent b1401ac41b
commit d8f4404110
Signed by: mbirth
GPG Key ID: A9928D7A098C3A9A
2 changed files with 17 additions and 0 deletions

View File

@ -1,5 +1,9 @@
# enter settings and rename to CONFIG
# Bluetooth headset MAC address (all uppercase, e.g. 01_23_45_AB_CD_EF)
BTHEADSET_MAC=01_23_45_AB_CD_EF
# Notification recipients
NMA_RECIPIENT=012345...NotifyMyAndroid-API-KEY...6789abcdef
PROWL_RECIPIENT=012345...Prowl API Key...6789abcdef
PUSHOVER_RECIPIENT=012345...PushOver API Key...6789abcdef

13
bt_volmax.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/sh
HERE=$(dirname $0)
. $HERE/CONFIG
# https://unix.stackexchange.com/questions/437468/bluetooth-headset-volume-too-low-only-in-arch/562381#562381
# Needs patched bluetoothd. Find 48 8b 46 70 66 83 78 0a 7f and change 7f to ff.
# Query current volume
dbus-send --print-reply --system --dest=org.bluez /org/bluez/hci0/dev_${BTHEADSET_MAC}/sep1/fd0 org.freedesktop.DBus.Properties.Get string:org.bluez.MediaTransport1 string:Volume
# Set AirPod Pro volume to max. (Needs patched bluetoothd! See above!)
dbus-send --print-reply --system --dest=org.bluez /org/bluez/hci0/dev_${BTHEADSET_MAC}/sep1/fd0 org.freedesktop.DBus.Properties.Set string:org.bluez.MediaTransport1 string:Volume variant:uint16:127