Skip to content

[xiaomi-beryllium] Bluetooth broken on 6.12-qcom, bootmac doesn't help

As reported by user badrihippo on our main channel: BT is not working, hci0 seems soft locked on boot, but even unlocking it does not help. Neither does bootmac...

I'm doing the test with mobian-qcom-phosh-20240915 official image

mobian@mobian:~$ dpkg -l | grep linux-image-6
ii  linux-image-6.6-qcom                  6.6.23+qcom-1                          arm64        Linux 6.6 for qcom devices
mobian@mobian:~$ bluetoothctl
Waiting to connect to bluetoothd...[bluetooth]# Agent registered
[bluetooth]# info
Missing device address argument
No default controller available
quit
mobian@mobian:~$ hciconfig
hci0:   Type: Primary  Bus: UART
        BD Address: 39:90:21:64:07:00  ACL MTU: 1024:7  SCO MTU: 60:8
        DOWN 
        RX bytes:894 acl:0 sco:0 events:71 errors:0
        TX bytes:233595 acl:0 sco:0 commands:968 errors:0

mobian@mobian:~$ sudo rfkill list
[sudo] password di mobian: 
0: hci0: Bluetooth
        Soft blocked: yes
        Hard blocked: no
1: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no
mobian@mobian:~$ sudo rfkill unblock 0
mobian@mobian:~$ sudo rfkill list
0: hci0: Bluetooth
        Soft blocked: no
        Hard blocked: no
1: phy0: Wireless LAN
        Soft blocked: no
        Hard blocked: no
mobian@mobian:~$ hciconfig
hci0:   Type: Primary  Bus: UART
        BD Address: 39:90:21:64:07:00  ACL MTU: 1024:7  SCO MTU: 60:8
        DOWN 
        RX bytes:894 acl:0 sco:0 events:71 errors:0
        TX bytes:233595 acl:0 sco:0 commands:968 errors:0

mobian@mobian:~$ bluetoothctl
Waiting to connect to bluetoothd...[bluetooth]# Agent registered
[bluetooth]# info
Missing device address argument
No default controller available
power on
No default controller available
[bluetooth]# quit
mobian@mobian:~$ sudo /usr/local/bin/bootmac -b
Set Powered for hci0 failed with status 0x11 (Invalid Index)
Set Public Address for hci0 failed with status 0x11 (Invalid Index)
mobian@mobian:~$ hciconfig
hci0:   Type: Primary  Bus: UART
        BD Address: 39:90:21:64:07:00  ACL MTU: 1024:7  SCO MTU: 60:8
        DOWN 
        RX bytes:894 acl:0 sco:0 events:71 errors:0
        TX bytes:233595 acl:0 sco:0 commands:968 errors:0

Looking in the attached journal, following lines seem strange to me

Oct 08 17:37:56 mobian kernel: Bluetooth: hci0: QCA Downloading qca/crnv21.bin
Oct 08 17:37:56 mobian kernel: Bluetooth: hci0: QCA TLV with error stat 0x0 rtype 0x4 (0x5)
Oct 08 17:37:56 mobian kernel: Bluetooth: hci0: QCA setup on UART is completed
Oct 08 17:37:56 mobian systemd[1]: Finished user-runtime-dir@103.service - User Runtime Directory /run/user/103.
Oct 08 17:37:56 mobian kernel: Bluetooth: hci0: unexpected cc 0x204b length: 1 < 3
Oct 08 17:37:56 mobian kernel: Bluetooth: hci0: Opcode 0x204b failed: -38

journalctl_BT_beryllium_20240919

as reference, usually I see something like

ott 08 19:38:03 mobian kernel: Bluetooth: hci0: QCA Downloading qca/oneplus6/crnv21.bin
ott 08 19:38:03 mobian kernel: Bluetooth: hci0: QCA setup on UART is completed

Maybe the kernel is taking the wrong FW file? Or is there any chance for droid-juicer to be dropping the wrong FW file?

mobian@mobian:~$ md5sum /lib/firmware/updates/qca/beryllium/crnv21.bin 
2c535585a56c09907c4c613bf54f15e9  /lib/firmware/updates/qca/beryllium/crnv21.bin
mobian@mobian:~$ md5sum /lib/firmware/qca/crnv21.bin 
e31b6b4fc3eb807dac73b0838dfa3265  /lib/firmware/qca/crnv21.bin

As comparison

marco@mobian:~$ md5sum /lib/firmware/updates/qca/oneplus6/crnv21.bin 
114219c89e2beb093a3600276d37be41  /lib/firmware/updates/qca/oneplus6/crnv21.bin
marco@mobian:~$ md5sum /lib/firmware/qca/crnv21.bin 
e31b6b4fc3eb807dac73b0838dfa3265  /lib/firmware/qca/crnv21.bin