echo 'clearing dmesg...';
sudo dmesg -c && clear;
DEVICE=$(rfkill list all | grep -o 'hci*.');
sudo hciconfig ${DEVICE} down;
sudo rmmod btusb;
sudo service bluetooth stop;
sudo modprobe btusb;
sudo hciconfig ${DEVICE} up;
echo 'n~~rfkill:';
rfkill unblock bluetooth;
sudo service bluetooth start;
rfkill list all;
echo "n~~~DMESG:";
sudo dmesg | grep -i bluetooth;
echo 'n~~~bluetooth status:';
sudo service bluetooth status;
echo 'n~~~if failed try manually:';
exit 0
bluetoothctl power on;
bluetoothctl devices;
read DEVICE_TO_CONNECT;
bluetoothctl connect ${DEVICE_TO_CONNECT}
echo "~~~nFINISH UP:n~~~~run bluetoothctl;n~~~~~power on && devices && connect";