Today I installed Ubuntu 18.04 x64 LTS on a Dell Latitude E6410i with Windows 7 pre-installed. I connected to my new JBL Flip4 speaker with Bluetooth 4.2 and with A2DP V1.3, AVRCP V1.6, HFP V1.6, and HSP V1.2, and paired it successfully.
I want to auto-connect to the speaker at login; it should connect every time I login to Ubuntu, but does not.
After study, I found suggestions on the web (like Autoconnect to a bluetooth speaker in Ubuntu 16.04), but I can't find rc.local
in my system. Also, I installed bt-autoconnect which does not help.
How should I proceed to resolve this?
Work Around
Note:
Below Procedure Tested with my
JBL Xtreme
OS:
Ubuntu 18.04
at your present Situation that is you have already paired your BT device and while booting your BT device is On,
after login try this..
Open Terminal and run
bluetoothctl
The Output will be similar to this
Output:
run
connect aa:bb:cc:dd:ee:ff
at the prompt[bluetooth]#
Example:
This Means if you can run the command
bluetoothctl
and then at the[bluetooth]#
prompt if you can inputconnect aa:bb:cc:dd:ee:ff
The Bluetooth Device will connect.So this can be done with a single command in terminal like this, after your first login open Terminal and run this command.
echo "connect aa:bb:cc:dd:ee:ff" | bluetoothctl
Example:
so the command
echo "connect aa:bb:cc:dd:ee:ff" | bluetoothctl
is working..This means if we can run this command at login without human interaction.. the Bluetooth Device which is Paired and already Turned on at the time of Boot will connect in the above manual way..
mkdir ~/bin
(Create this directory if you dont have already.. Otherwise Ignore this step)touch ~/bin/btautoconnect.sh
gedit ~/bin/btautoconnect.sh
Paste the Below Content:
Save & Close the File.
chmod +x ~/bin/btautoconnect.sh
create a .desktop file named
btautoconnect.desktop
in~/.config/autostart/
touch ~/.config/autostart/btautoconnect.desktop
Open the fiel with gedit and copy paste the content below this command
gedit ~/.config/autostart/btautoconnect.desktop
Content:
Credits: https://ubuntuforums.org/showthread.php?t=2365083
In Ubuntu sound-problems are due to installed drivers. If this speaker is the newest and most trendiest hardware, you have no good chances and would have to wait 2 to 8 months until driver is present at Linux Community. But you could try to install following packages in terminal :
Then switch on bluetooth and see if your speaker is supported :
Good luck or be patient for at maximum 8 months.