Skip to content

Instantly share code, notes, and snippets.

@lucaspar
Last active August 10, 2022 23:02
Show Gist options
  • Save lucaspar/69133d1c9abc40d2f1595a907a5765cb to your computer and use it in GitHub Desktop.
Save lucaspar/69133d1c9abc40d2f1595a907a5765cb to your computer and use it in GitHub Desktop.
[ FIX ] Sets phone as audio source for laptop speakers through bluetooth 🔉
#######################################################################
## Sets phone as audio source for laptop speakers through bluetooth ##
#######################################################################
# check bluetooth
rfkill list
# if bluetooth blocked, run
rfkill unblock bluetooth
# scan, trust, and pair with phone
sudo bluetoothctl
[bluetooth]# power on
[bluetooth]# agent on
[bluetooth]# default-agent
[bluetooth]# scan on
[NEW] Device XX:XX:XX:XX:XX:XX Probe
[bluetooth]# scan off
[bluetooth]# trust XX:XX:XX:XX:XX:XX
[bluetooth]# pair XX:XX:XX:XX:XX:XX
Attempting to pair with XX:XX:XX:XX:XX:XX
[CHG] Device XX:XX:XX:XX:XX:XX Connected: yes
[CHG] Device XX:XX:XX:XX:XX:XX UUIDs: ...
[CHG] Device XX:XX:XX:XX:XX:XX UUIDs: ...
[CHG] Device XX:XX:XX:XX:XX:XX UUIDs: ...
[CHG] Device XX:XX:XX:XX:XX:XX UUIDs: ...
[CHG] Device XX:XX:XX:XX:XX:XX UUIDs: ...
[CHG] Device XX:XX:XX:XX:XX:XX UUIDs: ...
[CHG] Device XX:XX:XX:XX:XX:XX UUIDs: ...
[CHG] Device XX:XX:XX:XX:XX:XX UUIDs: ...
[CHG] Device XX:XX:XX:XX:XX:XX Paired: yes
Pairing successful
[CHG] Device XX:XX:XX:XX:XX:XX Connected: no
[bluetooth]# connect XX:XX:XX:XX:XX:XX
Attempting to connect to XX:XX:XX:XX:XX:XX
[CHG] Device XX:XX:XX:XX:XX:XX Connected: yes
Connection successful
[bluetooth]# quit
# now phone audio should appear as an Input Device, like the microphone
# then load loopback module if necessary, mapping the input device to an output:
pacmd load-module module-loopback latency_msec=5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment