BT function not working on Ubuntu Mate image. (CM4/M2S)

Hello,

I tried Ubuntu Mate ( 2023-01-12-ubuntu-20.04-mate-desktop-bpi-cm4-aarch64-sd-emmc.img). But the BT function not working for scanning BT device. (such as TWS earphone).

I also installed bluez and tried sudo bluetoothctl and scan on , it shows :Failed to start discovery: org.bluez.Error.NotReady.

How to solve this problem?

Thanks

I think this works on Armbian, which is anyway highly recommended. Ubuntu is old, buggy and unmaintained.

Download from official page: β†’ Bananapi CM4 io and M2S – Armbian

Any update ? The Bluetooth function in official image cannot be used. This should be solved. We cannot jump to other OS at will.

check the bluetooth rfkill state and rtk bluetooth service state

# rfkill list
# systemctl status rtk-hciuart.service

● rtk-hciuart.service - Attach /dev/ttyS1 to BlueZ stack Loaded: loaded (/lib/systemd/system/rtk-hciuart.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2023-10-17 04:20:57 IST; 6min ago Process: 2995 ExecStartPre=/usr/sbin/rfkill unblock bluetooth (code=exited, status=0/SUCCESS) Main PID: 3020 (rtk_hciattach) Tasks: 1 (limit: 3398) Memory: 1.3M CGroup: /system.slice/rtk-hciuart.service └─3020 /usr/sbin/rtk_hciattach -n -s 115200 ttyS1 rtk_h5

Oct 17 04:20:57 bananapi systemd[1]: Starting Attach /dev/ttyS1 to BlueZ stack… Oct 17 04:20:57 bananapi rfkill[2995]: unblock set for type bluetooth Oct 17 04:20:57 bananapi systemd[1]: Started Attach /dev/ttyS1 to BlueZ stack.

This log looks good. I open blueman-manager, but it cannot find any bluetooth earbubs.

did you connect two attenna cables? If so, execute the following commands and show the logs

# rfkill list
# hcitool dev
# hcitool scan
0: bt-dev: Bluetooth
	Soft blocked: no
	Hard blocked: no
1: phy0: Wireless LAN
	Soft blocked: yes
	Hard blocked: no
2: hci0: Bluetooth
	Soft blocked: no
	Hard blocked: no
	
	
	
Devices:
	hci0	C4:3C:B0:AD:C4:96
	
	
Scanning ...
Inquiry failed: Connection timed out

I tried other official image ( Debian and Khadas build root(Ubuntu)) had same problem.

Bt scan well on mate after bootup. On gnome, you can restart rtk-hciuart.service after bootup or disable blueman-mechanism.service and using bt with bluetoothctl.

@August

systemctl restart rtk-hciuart.service
systemctl disable blueman-mechanism.service

working for me . Thanks !

1 Like