Open tpnthr opened 2 months ago
@tpnthr
Bluetooth seems to work here. I needed also to activate the search for BT devices on my phone.
hcitool dev
Devices: hci0 A8:41:F4:A4:03:9D
hcitool -i hci0 scan
Scanning ...
And I can pair the discovered device :
https://simpleit.rocks/linux/shell/connect-to-bluetooth-from-cli/
Maybe to some extend relevant because I did some tweaks as well:
sudo nano /etc/modprobe.d/blacklist.conf
blacklist pgdrv blacklist btusb blacklist btrtl blacklist btbcm blacklist btintel
https://github.com/Joshua-Riek/ubuntu-rockchip/issues/286
journalctl -u bluetooth.service
Aug 30 19:33:16 han-desktop bluetoothd[775]: /org/bluez/hci0/dev_3C_13_5A_21_43_E9/fd0: fd(42) ready
To get rid of : bluetoothd: sap-server: Operation not permitted error :
https://raspberrypi.stackexchange.com/questions/40839/sap-error-on-bluetooth-service-status
Done everything above :(
root@radxa-desktop:/home/radxa# journalctl -u bluetooth.service Aug 19 13:37:27 radxa-desktop systemd[1]: Starting bluetooth.service - Bluetooth service... Aug 19 13:37:27 radxa-desktop (uetoothd)[768]: bluetooth.service: ConfigurationDirectory 'bluetooth' already exists but the mode is different. (File system: 755> Aug 19 13:37:27 radxa-desktop bluetoothd[768]: Bluetooth daemon 5.72 Aug 19 13:37:27 radxa-desktop bluetoothd[768]: Starting SDP server Aug 19 13:37:27 radxa-desktop bluetoothd[768]: src/plugin.c:plugin_init() System does not support csip plugin Aug 19 13:37:27 radxa-desktop bluetoothd[768]: profiles/audio/micp.c:micp_init() D-Bus experimental not enabled Aug 19 13:37:27 radxa-desktop bluetoothd[768]: src/plugin.c:plugin_init() System does not support micp plugin Aug 19 13:37:27 radxa-desktop bluetoothd[768]: src/plugin.c:plugin_init() System does not support vcp plugin Aug 19 13:37:27 radxa-desktop bluetoothd[768]: src/plugin.c:plugin_init() System does not support mcp plugin Aug 19 13:37:27 radxa-desktop bluetoothd[768]: src/plugin.c:plugin_init() System does not support bass plugin Aug 19 13:37:27 radxa-desktop bluetoothd[768]: src/plugin.c:plugin_init() System does not support bap plugin Aug 19 13:37:27 radxa-desktop bluetoothd[768]: Bluetooth management interface 1.22 initialized Aug 19 13:37:27 radxa-desktop bluetoothd[768]: Battery Provider Manager created Aug 19 13:37:27 radxa-desktop bluetoothd[768]: profiles/sap/server.c:sap_server_register() Sap driver initialization failed. Aug 19 13:37:27 radxa-desktop bluetoothd[768]: sap-server: Operation not permitted (1) Aug 19 13:37:27 radxa-desktop systemd[1]: Started bluetooth.service - Bluetooth service. Aug 19 13:37:29 radxa-desktop bluetoothd[768]: Endpoint registered: sender=:1.39 path=/MediaEndpoint/A2DPSource/ldac Aug 19 13:37:29 radxa-desktop bluetoothd[768]: Endpoint registered: sender=:1.39 path=/MediaEndpoint/A2DPSink/aptx_hd Aug 19 13:37:29 radxa-desktop bluetoothd[768]: Endpoint registered: sender=:1.39 path=/MediaEndpoint/A2DPSource/aptx_hd Aug 19 13:37:29 radxa-desktop bluetoothd[768]: Endpoint registered: sender=:1.39 path=/MediaEndpoint/A2DPSink/aptx Aug 19 13:37:29 radxa-desktop bluetoothd[768]: Endpoint registered: sender=:1.39 path=/MediaEndpoint/A2DPSource/aptx Aug 19 13:37:29 radxa-desktop bluetoothd[768]: Endpoint registered: sender=:1.39 path=/MediaEndpoint/A2DPSink/sbc Aug 19 13:37:29 radxa-desktop bluetoothd[768]: Endpoint registered: sender=:1.39 path=/MediaEndpoint/A2DPSource/sbc
and now:
`radxa@radxa-desktop:~$ sudo systemctl status bluetooth [sudo] password for radxa: × bluetooth.service - Bluetooth service Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; preset> Drop-In: /etc/systemd/system/bluetooth.service.d └─01-disable-sap-plugin.conf Active: failed (Result: exit-code) since Fri 2024-08-30 21:23:42 CEST; 21s> Docs: man:bluetoothd(8) Process: 1937 ExecStart=/usr/lib/bluetooth/bluetoothd --noplugin=sap (code=> Main PID: 1937 (code=exited, status=203/EXEC) CPU: 21ms
Aug 30 21:23:42 radxa-desktop systemd[1]: bluetooth.service: Scheduled restart > Aug 30 21:23:42 radxa-desktop systemd[1]: bluetooth.service: Start request repe> Aug 30 21:23:42 radxa-desktop systemd[1]: bluetooth.service: Failed with result> Aug 30 21:23:42 radxa-desktop systemd[1]: Failed to start bluetooth.service - B> `
https://raspberrypi.stackexchange.com/questions/40839/sap-error-on-bluetooth-service-status This instruction messed everything :)
`radxa@radxa-desktop:/$ sudo systemctl status bluetooth Warning: The unit file, source configuration file or drop-ins of bluetooth.serv> × bluetooth.service - Bluetooth service Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; preset> Drop-In: /etc/systemd/system/bluetooth.service.d └─01-disable-sap-plugin.conf Active: failed (Result: exit-code) since Fri 2024-08-30 21:26:31 CEST; 5mi> Docs: man:bluetoothd(8) Process: 4396 ExecStart=/usr/lib/bluetooth/bluetoothd --noplugin=sap (code=> Main PID: 4396 (code=exited, status=203/EXEC) CPU: 21ms
Aug 30 21:26:31 radxa-desktop systemd[1]: bluetooth.service: Scheduled restart > Aug 30 21:26:31 radxa-desktop systemd[1]: bluetooth.service: Start request repe> Aug 30 21:26:31 radxa-desktop systemd[1]: bluetooth.service: Failed with result> Aug 30 21:26:31 radxa-desktop systemd[1]: Failed to start bluetooth.service - B> lines 1-15/15 (END) radxa@radxa-desktop:/$ sudo systemctl restart bluetooth.service Warning: The unit file, source configuration file or drop-ins of bluetooth.service changed on disk. Run 'systemctl daemon-reload' to reload units. Job for bluetooth.service failed because the control process exited with error code. See "systemctl status bluetooth.service" and "journalctl -xeu bluetooth.service" for details. radxa@radxa-desktop:/$ systemctl status bluetooth.service Warning: The unit file, source configuration file or drop-ins of bluetooth.serv> × bluetooth.service - Bluetooth service Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; preset> Drop-In: /etc/systemd/system/bluetooth.service.d └─01-disable-sap-plugin.conf Active: failed (Result: exit-code) since Fri 2024-08-30 21:32:57 CEST; 18s> Docs: man:bluetoothd(8) Process: 4833 ExecStart=/usr/lib/bluetooth/bluetoothd --noplugin=sap (code=> Main PID: 4833 (code=exited, status=203/EXEC) CPU: 22ms
Aug 30 21:32:57 radxa-desktop systemd[1]: bluetooth.service: Scheduled restart > Aug 30 21:32:57 radxa-desktop systemd[1]: bluetooth.service: Start request repe> Aug 30 21:32:57 radxa-desktop systemd[1]: bluetooth.service: Failed with result> Aug 30 21:32:57 radxa-desktop systemd[1]: Failed to start bluetooth.service - B>
radxa@radxa-desktop:/$ journalctl -xeu bluetooth.service ░░ The job identifier is 5600 and the job result is failed. Aug 30 21:32:57 radxa-desktop systemd[1]: bluetooth.service: Scheduled restart > ░░ Subject: Automatic restarting of a unit has been scheduled ░░ Defined-By: systemd ░░ Support: http://www.ubuntu.com/support ░░ ░░ Automatic restarting of the unit bluetooth.service has been scheduled, as th> ░░ the configured Restart= setting for the unit. Aug 30 21:32:57 radxa-desktop systemd[1]: bluetooth.service: Start request repe> Aug 30 21:32:57 radxa-desktop systemd[1]: bluetooth.service: Failed with result> ░░ Subject: Unit failed ░░ Defined-By: systemd ░░ Support: http://www.ubuntu.com/support ░░ ░░ The unit bluetooth.service has entered the 'failed' state with result 'exit-> Aug 30 21:32:57 radxa-desktop systemd[1]: Failed to start bluetooth.service - B> ░░ Subject: A start job for unit bluetooth.service has failed ░░ Defined-By: systemd ░░ Support: http://www.ubuntu.com/support ░░ ░░ A start job for unit bluetooth.service has finished with a failure. ░░ ░░ The job identifier is 5687 and the job result is failed. `
@tpnthr
That is unfortunate! I suppose that you did a 'systemctl daemon-reload' to reload bluetoothd daemon? BTW I only did the first answer with Add "--noplugin=sap" at the end of the "ExecStart" Line .
AIC8800 Bluetooth is kind of fucked in general, I would look at aic8800-bluetooth.service or the following code.
#!/bin/bash
rfkill unblock all
/usr/bin/hciattach -s 1500000 /dev/ttyS1 any 1500000 flow nosleep
sleep 2
while read -r; do
echo "bt_test > $REPLY"
case "$(tr -d '\r' <<< "$REPLY")" in
"hci recv thread ready (nil)")
echo "Device reset successfully."
exit 0
;;
"dev_open fail")
echo "Unable to open /dev/ttyS1. Is Bluetooth already up?"
exit 1
;;
esac
done < <(timeout 1 bt_test -s uart 1500000 "/dev/ttyS1")
echo "Command timed out."
exit 2
Mmmm.. maybe I did some other stuff too?! I also added experimental support to Ubuntu.
To enable Bluez experimental features in Ubuntu:
-Open /etc/bluetooth/main.conf as root Find the section with :
# Enables kernel experimental features, alternatively a list of UUIDs
# can be given.
# Possible values: true,false,<UUID List>
# Possible UUIDS:
# d4992530-b9ec-469f-ab01-6c481c47da1c (BlueZ Experimental Debug)
# 671b10b5-42c0-4696-9227-eb28d1b049d6 (BlueZ Experimental Simultaneous Central and Peripheral)
# 15c0a148-c273-11ea-b3de-0242ac130004 (BlueZ Experimental LL privacy)
# 330859bc-7506-492d-9370-9a6f0614037f (BlueZ Experimental Bluetooth Quality Report)
# a6695ace-ee7f-4fb9-881a-5fac66c629af (BlueZ Experimental Offload Codecs)
# 6fbaf188-05e0-496a-9885-d6ddfdb4e03e (BlueZ Experimental ISO socket)
# Defaults to false.
KernelExperimental = true
-Reboot or run systemctl restart bluetooth
Don’t skip the last step – if you do, nothing will change.
On my system current state of bluetooth server:
systemctl status bluetooth
● bluetooth.service - Bluetooth service Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; preset: enabled) Active: active (running) since Fri 2024-08-30 22:09:17 CEST; 58min ago Docs: man:bluetoothd(8) Main PID: 798 (bluetoothd) Status: "Running" Tasks: 1 (limit: 28132) Memory: 3.6M (peak: 4.1M) CPU: 88ms CGroup: /system.slice/bluetooth.service └─798 /usr/libexec/bluetooth/bluetoothd --noplugin=sap
Now it shows me `radxa@radxa-desktop:~$ systemctl status bluetooth ● bluetooth.service - Bluetooth service Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; preset: enabled) Active: active (running) since Fri 2024-08-30 23:31:50 CEST; 38s ago Docs: man:bluetoothd(8) Main PID: 3336 (bluetoothd) Status: "Running" Tasks: 1 (limit: 28132) Memory: 756.0K (peak: 1.2M) CPU: 51ms CGroup: /system.slice/bluetooth.service └─3336 /usr/libexec/bluetooth/bluetoothd --noplugin=sap
Aug 30 23:31:50 radxa-desktop bluetoothd[3336]: Starting SDP server Aug 30 23:31:50 radxa-desktop bluetoothd[3336]: Excluding (cli) sap Aug 30 23:31:50 radxa-desktop bluetoothd[3336]: src/plugin.c:plugin_init() System does not support csip plugin Aug 30 23:31:50 radxa-desktop bluetoothd[3336]: profiles/audio/micp.c:micp_init() D-Bus experimental not enabled Aug 30 23:31:50 radxa-desktop bluetoothd[3336]: src/plugin.c:plugin_init() System does not support micp plugin Aug 30 23:31:50 radxa-desktop bluetoothd[3336]: src/plugin.c:plugin_init() System does not support vcp plugin Aug 30 23:31:50 radxa-desktop bluetoothd[3336]: src/plugin.c:plugin_init() System does not support mcp plugin Aug 30 23:31:50 radxa-desktop bluetoothd[3336]: src/plugin.c:plugin_init() System does not support bass plugin Aug 30 23:31:50 radxa-desktop bluetoothd[3336]: src/plugin.c:plugin_init() System does not support bap plugin Aug 30 23:31:50 radxa-desktop bluetoothd[3336]: Bluetooth management interface 1.22 initialized `
interface shows me that
radxa@radxa-desktop:~$ dmesg | grep -i bluetooth [ 13.529594] Bluetooth: Core ver 2.22 [ 13.529609] NET: Registered PF_BLUETOOTH protocol family [ 13.529612] Bluetooth: HCI device and connection manager initialized [ 13.529618] Bluetooth: HCI socket layer initialized [ 13.529622] Bluetooth: L2CAP socket layer initialized [ 13.529634] Bluetooth: SCO socket layer initialized [ 15.320262] usb 3-1.3: Product: Bluetooth Radio [ 25.981332] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 25.981348] Bluetooth: BNEP filters: protocol multicast [ 25.981364] Bluetooth: BNEP socket layer initialized **[ 514.977207] Bluetooth: hci0: Failed to read codec capabilities (-22)** [ 514.980504] Bluetooth: MGMT ver 1.22 [ 514.988695] Bluetooth: RFCOMM TTY layer initialized [ 514.988715] Bluetooth: RFCOMM socket layer initialized [ 514.988734] Bluetooth: RFCOMM ver 1.11 **[ 541.249398] Bluetooth: hci0: urb 0000000066412dbb failed to resubmit (2) [ 541.563207] Bluetooth: hci0: Failed to read codec capabilities (-22)** [ 541.566641] Bluetooth: MGMT ver 1.22 radxa@radxa-desktop:~$
[ 541.563207] Bluetooth: hci0: Failed to read codec capabilities (-22) [ 541.249398] Bluetooth: hci0: urb 0000000066412dbb failed to resubmit (2)
@tpnthr
Looks good actually.
My journalctl and lsmod:
You can try : sudo modprobe rtk_btusb && dmesg | grep rtk
sudo modprobe rtk_btusb && dmesg | grep rtk - worked like magic!!! Thank you
What happened?
Rock 5b+ ubuntu don't see Bluetooth devices. Bluetooth device is discovered Services are running Blueman is installed, but still no devices shown nearby. Can anyone help me with that?
Kernel version
6.1.0-1025-rockchip
SBC model
rock 5b+
What operating system are you seeing this problem on?
Ubuntu 24.04 LTS (Noble Nombat)
Relevant logs