Skip to content

Instantly share code, notes, and snippets.

@shiveshabhishek
Created July 21, 2022 09:49
Show Gist options
  • Save shiveshabhishek/6fea0269f5cab940b345beed0127d67b to your computer and use it in GitHub Desktop.
Save shiveshabhishek/6fea0269f5cab940b345beed0127d67b to your computer and use it in GitHub Desktop.
Linux Bluetooth fix
## Source: https://simpleit.rocks/linux/shell/connect-to-bluetooth-from-cli/
## https://unix.stackexchange.com/questions/258074/error-when-trying-to-connect-to-bluetooth-speaker-org-bluez-error-failed
1. Identify your computer bluetooth
hcitool dev
Devices:
hci0 A3:3E:XX:XX:G3:86
2. Scan available devices
hcitool -i hci0 scan
Scanning ...
FC:XX:XX:XX:XX:FE n/a
3. Trust the discovered device
bluetoothctl
[bluetooth]# trust FC:XX:XX:XX:XX:FE
[CHG] Device FC:XX:XX:XX:XX:FE Trusted: yes
4. Connect
[bluetooth]# connect FC:XX:XX:XX:XX:FE
Attempting to connect to FC:XX:XX:XX:XX:FE
Failed to connect: org.bluez.Error.Failed
FIX:
This may be due to the pulseaudio-module-bluetooth package not being installed. Install it if it missing, then restart pulseaudio.
sudo apt install pulseaudio-module-bluetooth
pulseaudio -k
pulseaudio --start
shivesh@shivesh-machine:~/kind$ bluetoothctl
Agent registered
[CHG] Controller 3C:58:C2:F5:F6:12 Pairable: yes
[bluetooth]# connect 41:xx:87:0F:xx:D1
Attempting to connect to 41:xx:87:0F:xx:D1
[CHG] Device 41:xx:87:0F:xx:D1 Connected: yes
Connection successful
[CHG] Device 41:xx:87:0F:xx:D1 ServicesResolved: yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment