root@bpi-r64:~# mkdir -p /lib/firmware/mediatek
root@bpi-r64:~# wget https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/mediatek/mt7622pr2h.bin
root@bpi-r64:~# cp mt7622pr2h.bin /lib/firmware/mediatek/
root@bpi-r64:~# apt-get update
root@bpi-r64:~# apt-get install bluez
root@bpi-r64:~# reboot
#boot kernel with applied tty-patch and increased scpsys-sleep
===== bluetoothctl =====
# bluetoothctl
[bluetooth]# help
Menu main:
Available commands:
-------------------
advertise Advertise Options Submenu
scan Scan Options Submenu
gatt Generic Attribute Submenu
list List available controllers
show [ctrl] Controller information
select Select default controller
devices List available devices
paired-devices List paired devices
system-alias Set controller alias
reset-alias Reset controller alias
power Set controller power
pairable Set controller pairable mode
discoverable Set controller discoverable mode
agent Enable/disable agent with given capability
default-agent Set agent as the default one
advertise Enable/disable advertising with given type
set-alias Set device alias
scan Scan for devices
info [dev] Device information
pair [dev] Pair with device
trust [dev] Trust device
untrust [dev] Untrust device
block [dev] Block device
unblock [dev] Unblock device
remove Remove device
connect Connect device
disconnect [dev] Disconnect device
menu Select submenu
version Display version
quit Quit program
exit Quit program
help Display help about this program
export Print evironment variables
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# agent on
Agent is already registered
[bluetooth]# default-agent
Default agent request successful
[bluetooth]# scan on
Discovery started
[CHG] Controller 00:00:46:76:22:01 Discovering: yes
[bluetooth]# devices #already paired, so remove first
Device B4:9D:0B:5F:2A:B9 Aquaris X5 Plus
[bluetooth]# remove B4:9D:0B:5F:2A:B9
[DEL] Device B4:9D:0B:5F:2A:B9 Aquaris X5 Plus
Device has been removed
[NEW] Device B4:9D:0B:5F:2A:B9 Aquaris X5 Plus
[bluetooth]# pair B4:9D:0B:5F:2A:B9
Attempting to pair with B4:9D:0B:5F:2A:B9
[CHG] Device B4:9D:0B:5F:2A:B9 Connected: yes
Request confirmation
[agent] Confirm passkey 953871 (yes/no): yes
[CHG] Device B4:9D:0B:5F:2A:B9 Paired: yes
Connection successful
[CHG] Device B4:9D:0B:5F:2A:B9 UUIDs: 00001103-0000-1000-8000-00805f9b34fb
...
[CHG] Device B4:9D:0B:5F:2A:B9 UUIDs: 936da01f-9abd-4d9d-80c7-02af85c822a8
Authorize service
[agent] Authorize service 00001108-0000-1000-8000-00805f9b34fb (yes/no): Request canceled
[CHG] Device B4:9D:0B:5F:2A:B9 ServicesResolved: no
[CHG] Device B4:9D:0B:5F:2A:B9 Connected: no
===== issues =====
grep bluetooth /var/log/syslog
if it shows something like this on connect:
bluetoothd[197]: a2dp-source profile connect failed for MAC:OF:BT:DEVICE: Protocol not available
you need to install pulseaudio-module-bluetooth and restart bluetoothd
apt install --no-install-recommends pulseaudio-module-bluetooth
systemctl restart bluetooth