Cannot use Bluetooth 5 USB stick to: hcitool scan

Hello everyone,

I am trying to read some Xiaomi Mi Thermometer 2 which have been flashed with custom firmware (see here for details on that: https://github.com/pvvx/ATC_MiThermometer )

I can read the data from a windows computer so all is well, however, I want to configure my OpenWrt router to do that due to power consumption reasons.

I have bought a rather random Bluetooth stick: Hama Bluetooth v5.0 (see the manual here, although there are no real technical details https://manuals.plus/hama/053312-bluetooth-v5-0-class-2-usb-adapter-manual ).

On my Archer C7 v2 I have flashed 22.03.2
opkg install bluez-daemon
/etc/init.d/bluetoothd enable
/etc/init.d/bluetoothd start

root@OpenWrt:~# hciconfig hci0 up

root@OpenWrt:~# hciconfig
hci0:   Type: Primary  Bus: USB
        BD Address: 00:0A:CD:40:54:48  ACL MTU: 1021:6  SCO MTU: 255:12
        UP RUNNING
        RX bytes:1379 acl:0 sco:0 events:88 errors:0
        TX bytes:1148 acl:0 sco:0 commands:88 errors:0

root@OpenWrt:~# hcitool scan
Scanning ...
root@OpenWrt:~#

No results are returned here. What I really need is the: hcitool scanle, but before that, not even the normal scan works.

Here are the logs in case you see anything that needs fixing:

logread

Sun Dec 25 11:54:33 2022 user.info kernel: [  338.338673] kmodloader: loading kernel modules from /etc/modules.d/*
Sun Dec 25 11:54:33 2022 kern.info kernel: [  338.383844] hid: raw HID events driver (C) Jiri Kosina
Sun Dec 25 11:54:33 2022 kern.info kernel: [  338.414380] Bluetooth: Core ver 2.22
Sun Dec 25 11:54:33 2022 kern.info kernel: [  338.418120] NET: Registered protocol family 31
Sun Dec 25 11:54:33 2022 kern.info kernel: [  338.422672] Bluetooth: HCI device and connection manager initialized
Sun Dec 25 11:54:33 2022 kern.info kernel: [  338.429132] Bluetooth: HCI socket layer initialized
Sun Dec 25 11:54:33 2022 kern.info kernel: [  338.434079] Bluetooth: L2CAP socket layer initialized
Sun Dec 25 11:54:33 2022 kern.info kernel: [  338.439234] Bluetooth: SCO socket layer initialized
Sun Dec 25 11:54:33 2022 kern.info kernel: [  338.448037] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
Sun Dec 25 11:54:33 2022 kern.info kernel: [  338.453488] Bluetooth: BNEP filters: protocol multicast
Sun Dec 25 11:54:33 2022 kern.info kernel: [  338.458819] Bluetooth: BNEP socket layer initialized
Sun Dec 25 11:54:33 2022 kern.info kernel: [  338.473381] usbcore: registered new interface driver btusb
Sun Dec 25 11:54:33 2022 kern.info kernel: [  338.484193] Bluetooth: HCI UART driver ver 2.3
Sun Dec 25 11:54:33 2022 kern.info kernel: [  338.488792] Bluetooth: HCI UART protocol H4 registered
Sun Dec 25 11:54:33 2022 kern.info kernel: [  338.494003] Bluetooth: HCI UART protocol BCSP registered
Sun Dec 25 11:54:33 2022 kern.info kernel: [  338.499472] Bluetooth: HCI UART protocol ATH3K registered
Sun Dec 25 11:54:33 2022 kern.info kernel: [  338.508713] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
Sun Dec 25 11:54:33 2022 kern.info kernel: [  338.514827] Bluetooth: HIDP socket layer initialized
Sun Dec 25 11:54:33 2022 kern.info kernel: [  338.524575] Bluetooth: RFCOMM TTY layer initialized
Sun Dec 25 11:54:33 2022 kern.info kernel: [  338.529654] Bluetooth: RFCOMM socket layer initialized
Sun Dec 25 11:54:33 2022 kern.info kernel: [  338.534932] Bluetooth: RFCOMM ver 1.11
Sun Dec 25 11:54:33 2022 user.info kernel: [  338.540923] kmodloader: done loading kernel modules from /etc/modules.d/*
Sun Dec 25 11:54:33 2022 user.info kernel: [  338.645706] kmodloader: loading kernel modules from /etc/modules.d/*
Sun Dec 25 11:54:33 2022 user.info kernel: [  338.665673] kmodloader: done loading kernel modules from /etc/modules.d/*
Sun Dec 25 11:54:33 2022 user.info kernel: [  338.826948] kmodloader: loading kernel modules from /etc/modules.d/*
Sun Dec 25 11:54:33 2022 user.info kernel: [  338.846787] kmodloader: done loading kernel modules from /etc/modules.d/*
Sun Dec 25 11:54:34 2022 user.info kernel: [  338.943649] kmodloader: loading kernel modules from /etc/modules.d/*
Sun Dec 25 11:54:34 2022 user.info kernel: [  338.963393] kmodloader: done loading kernel modules from /etc/modules.d/*
Sun Dec 25 11:54:34 2022 user.info kernel: [  339.120378] kmodloader: loading kernel modules from /etc/modules.d/*
Sun Dec 25 11:54:34 2022 user.info kernel: [  339.140190] kmodloader: done loading kernel modules from /etc/modules.d/*
Sun Dec 25 11:54:34 2022 user.info kernel: [  339.237280] kmodloader: loading kernel modules from /etc/modules.d/*
Sun Dec 25 11:54:34 2022 user.info kernel: [  339.257117] kmodloader: done loading kernel modules from /etc/modules.d/*
Sun Dec 25 11:54:34 2022 user.info kernel: [  339.354647] kmodloader: loading kernel modules from /etc/modules.d/*
Sun Dec 25 11:54:34 2022 user.info kernel: [  339.374446] kmodloader: done loading kernel modules from /etc/modules.d/*
Sun Dec 25 11:54:36 2022 daemon.info bluetoothd[4368]: Bluetooth daemon 5.64
Sun Dec 25 11:54:36 2022 daemon.info bluetoothd[4368]: Starting SDP server
Sun Dec 25 11:54:36 2022 daemon.err bluetoothd[4368]: src/rfkill.c:rfkill_init() Failed to open RFKILL control device
Sun Dec 25 11:54:36 2022 daemon.info bluetoothd[4368]: Bluetooth management interface 1.18 initialized
Sun Dec 25 11:54:36 2022 daemon.err bluetoothd[4368]: Failed to set blocked keys: Invalid Parameters (0x0d)
Sun Dec 25 11:54:36 2022 kern.err kernel: [  341.243446] Bluetooth: hci0: expected 8706 bytes, got 36 bytes

dmesg

[  338.414380] Bluetooth: Core ver 2.22
[  338.418120] NET: Registered protocol family 31
[  338.422672] Bluetooth: HCI device and connection manager initialized
[  338.429132] Bluetooth: HCI socket layer initialized
[  338.434079] Bluetooth: L2CAP socket layer initialized
[  338.439234] Bluetooth: SCO socket layer initialized
[  338.448037] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[  338.453488] Bluetooth: BNEP filters: protocol multicast
[  338.458819] Bluetooth: BNEP socket layer initialized
[  338.473381] usbcore: registered new interface driver btusb
[  338.484193] Bluetooth: HCI UART driver ver 2.3
[  338.488792] Bluetooth: HCI UART protocol H4 registered
[  338.494003] Bluetooth: HCI UART protocol BCSP registered
[  338.499472] Bluetooth: HCI UART protocol ATH3K registered
[  338.508713] Bluetooth: HIDP (Human Interface Emulation) ver 1.2
[  338.514827] Bluetooth: HIDP socket layer initialized
[  338.524575] Bluetooth: RFCOMM TTY layer initialized
[  338.529654] Bluetooth: RFCOMM socket layer initialized
[  338.534932] Bluetooth: RFCOMM ver 1.11
[  338.540923] kmodloader: done loading kernel modules from /etc/modules.d/*
[  338.645706] kmodloader: loading kernel modules from /etc/modules.d/*
[  338.665673] kmodloader: done loading kernel modules from /etc/modules.d/*
[  338.826948] kmodloader: loading kernel modules from /etc/modules.d/*
[  338.846787] kmodloader: done loading kernel modules from /etc/modules.d/*
[  338.943649] kmodloader: loading kernel modules from /etc/modules.d/*
[  338.963393] kmodloader: done loading kernel modules from /etc/modules.d/*
[  339.120378] kmodloader: loading kernel modules from /etc/modules.d/*
[  339.140190] kmodloader: done loading kernel modules from /etc/modules.d/*
[  339.237280] kmodloader: loading kernel modules from /etc/modules.d/*
[  339.257117] kmodloader: done loading kernel modules from /etc/modules.d/*
[  339.354647] kmodloader: loading kernel modules from /etc/modules.d/*
[  339.374446] kmodloader: done loading kernel modules from /etc/modules.d/*
[  341.243446] Bluetooth: hci0: expected 8706 bytes, got 36 bytes

I have also tried two previous versions of OpenWrt with no success, but there's no point in spamming here with all those logs.

Any ideas what I should try / check / fix / debug ? I can do most things except recompiling.

Thanks in advance for your support!!

Wondering if you got anywhere with this?

I have the exact same issue but on a Gl-iNet E750, OpenWrt 22.03.4 r20123-38ccc47687 (Kernel 5.10)

Bluetooth adapter EDUP EP-3536 (realtek chipset) that works fine on Ubuntu 22 (which has a newer Kernel 6.2)

No, I never figured it out, so I gave up on the idea. I'm using a Windows setup (3Watts average) which I was using for some other purposes.

Oh, and a totally unrelated "fun" fact. I am continuously BLE scanning on the Windows computer and I have already burned the Bluetooth cards on two different laptops after a few months. It appears the Wifi+Bluetooth cards were never designed for this continuous operation. I am now using external Bluetooth sticks (TP Link).