Disable Bluetooth power-saving to improve device connectivity
sed -i.bak -e '/^#ControllerMode = dual/s/^#//; /^ControllerMode = le/!s/^ControllerMode = dual$/ControllerMode = le/' -e '/^#AutoEnable=true/s/^#//; /^AutoEnable=false/!s/^AutoEnable=true$/AutoEnable=false/' /etc/bluetooth/main.conf
Modifies the /etc/bluetooth/main.conf configuration file to disable Bluetooth power-saving settings that can lead to poor or intermittent communication with devices, particularly low-power ones.