home-assistant / core

:house_with_garden: Open source home automation that puts local control and privacy first.
https://www.home-assistant.io
Apache License 2.0
72.81k stars 30.51k forks source link

Intel AX210, Retrying setup: Bluetooth adapter None with address 04:CF:4B:E1:92:49 not found #91155

Closed vgomenyuk closed 1 year ago

vgomenyuk commented 1 year ago

The problem

Bluetooth coordinator is not working: Intel Wi-Fi 6E BT 5.3 AX210 (AX210NGW) M.2 2230/2232 card

My installation: Home Assistant OS as VM inside Proxmox VE.

Recently BT coordinator was working well while next conditions:

BT log error:

Please help. Much appreciate!

What version of Home Assistant Core has the issue?

core-2023.4.2

What was the last working version of Home Assistant Core?

No response

What type of installation are you running?

Home Assistant OS

Integration causing the issue

Bluetooth

Link to integration documentation on our website

https://www.home-assistant.io/integrations/bluetooth

Diagnostics information

home-assistant_bluetooth_2023-04-10T06-27-39.563Z.log

Example YAML snippet

No response

Anything in the logs that might be useful for us?

# BT logs when Proxmox kernel 5.15.104-1-pve + Home Assistant OS 9.5 was installed:
dmesg | grep -i blue
Apr 08 10:50:47 proxmox systemd[1195]: Stopped target Bluetooth.
Apr 08 10:50:47 proxmox systemd[1]: Stopped target Bluetooth.
Apr 08 10:50:52 proxmox systemd[1]: systemd-rfkill.service: Succeeded.
Apr 08 10:50:55 proxmox kernel: usb 1-8: reset full-speed USB device number 6 using xhci_hcd
Apr 08 10:50:56 proxmox kernel: usb 1-8: USB disconnect, device number 6
Apr 08 10:50:56 proxmox QEMU[5983]: kvm: libusb_release_interface: -4 [NO_DEVICE]
Apr 08 10:50:56 proxmox QEMU[5983]: kvm: libusb_release_interface: -4 [NO_DEVICE]
Apr 08 10:50:56 proxmox kernel: usb 1-8: new full-speed USB device number 7 using xhci_hcd
Apr 08 10:50:56 proxmox kernel: usb 1-8: New USB device found, idVendor=8087, idProduct=0032, bcdDevice= 0.00
Apr 08 10:50:56 proxmox kernel: usb 1-8: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Apr 08 10:50:56 proxmox kernel: Bluetooth: hci0: Device revision is 0
Apr 08 10:50:56 proxmox kernel: Bluetooth: hci0: Secure boot is enabled
Apr 08 10:50:56 proxmox kernel: Bluetooth: hci0: OTP lock is enabled
Apr 08 10:50:56 proxmox kernel: Bluetooth: hci0: API lock is enabled
Apr 08 10:50:56 proxmox kernel: Bluetooth: hci0: Debug lock is disabled
Apr 08 10:50:56 proxmox kernel: Bluetooth: hci0: Minimum firmware build 1 week 10 2014
Apr 08 10:50:56 proxmox kernel: Bluetooth: hci0: Bootloader timestamp 2019.40 buildtype 1 build 38
Apr 08 10:50:56 proxmox kernel: Bluetooth: hci0: Found device firmware: intel/ibt-0041-0041.sfi
Apr 08 10:50:56 proxmox kernel: Bluetooth: hci0: Boot Address: 0x100800
Apr 08 10:50:56 proxmox kernel: Bluetooth: hci0: Firmware Version: 172-6.23
Apr 08 10:50:56 proxmox systemd[1195]: Reached target Bluetooth.
Apr 08 10:50:56 proxmox systemd[1]: Starting Load/Save RF Kill Switch Status...
Apr 08 10:50:56 proxmox systemd[1]: Reached target Bluetooth.
Apr 08 10:50:56 proxmox systemd[1]: Started Load/Save RF Kill Switch Status.
Apr 08 10:50:58 proxmox kernel: Bluetooth: hci0: Waiting for firmware download to complete
Apr 08 10:50:58 proxmox kernel: Bluetooth: hci0: Firmware loaded in 1518206 usecs
Apr 08 10:50:58 proxmox kernel: Bluetooth: hci0: Waiting for device to boot
Apr 08 10:50:58 proxmox kernel: Bluetooth: hci0: Device booted in 25408 usecs
Apr 08 10:50:58 proxmox kernel: Bluetooth: hci0: Malformed MSFT vendor event: 0x02
Apr 08 10:50:58 proxmox kernel: Bluetooth: hci0: Found Intel DDC parameters: intel/ibt-0041-0041.ddc
Apr 08 10:50:58 proxmox kernel: Bluetooth: hci0: Applying Intel DDC parameters completed
Apr 08 10:50:58 proxmox kernel: Bluetooth: hci0: Firmware timestamp 2023.6 buildtype 1 build 59564
Apr 08 10:51:01 proxmox systemd[1]: systemd-rfkill.service: Succeeded.
Apr 08 10:51:25 proxmox pvedaemon[1185]: <root@pam> successful auth for user 'root@pam'
Apr 08 10:53:25 proxmox pvedaemon[1183]: <root@pam> successful auth for user 'root@pam'
Apr 08 10:55:25 proxmox pve-guests[1228]: <root@pam> end task UPID:proxmox:000004CD:00000564:64311B87:startall::root@pam: OK
Apr 08 10:55:25 proxmox systemd[1]: Finished PVE guests.
Apr 08 10:55:25 proxmox systemd[1]: Starting Proxmox VE scheduler...
Apr 08 10:55:26 proxmox pvescheduler[7540]: starting server
Apr 08 10:55:26 proxmox systemd[1]: Started Proxmox VE scheduler.
Apr 08 10:55:26 proxmox systemd[1]: Reached target Multi-User System.
Apr 08 10:55:26 proxmox systemd[1]: Reached target Graphical Interface.
Apr 08 10:55:26 proxmox systemd[1]: Starting Update UTMP about System Runlevel Changes...
Apr 08 10:55:26 proxmox systemd[1]: systemd-update-utmp-runlevel.service: Succeeded.
Apr 08 10:55:26 proxmox systemd[1]: Finished Update UTMP about System Runlevel Changes.
[4.666945] Bluetooth: hci0: command 0xfc05 tx timeout
[4.666961] Bluetooth: hci0: Reading Intel version command failed (-110)

# Logs after upgrade to Proxmox 6.2.9-1-pve + Home Assistant OS 10.0.rc3:
dmesg | grep -i blue
[    0.472327] Bluetooth: Core ver 2.22
[    0.472423] NET: Registered PF_BLUETOOTH protocol family
[    0.472797] Bluetooth: HCI device and connection manager initialized
[    0.473969] Bluetooth: HCI socket layer initialized
[    0.474314] Bluetooth: L2CAP socket layer initialized
[    0.474676] Bluetooth: SCO socket layer initialized
[    2.979288] Bluetooth: hci0: Firmware timestamp 2022.51 buildtype 1 build 56683
[    2.991260] Bluetooth: hci0: Found device firmware: intel/ibt-0041-0041.sfi
[    2.992340] Bluetooth: hci0: Boot Address: 0x100800
[    2.993080] Bluetooth: hci0: Firmware Version: 191-39.22
[    3.011003] Bluetooth: hci0: FW download error recovery failed (-19)
[    4.278142] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    4.278148] Bluetooth: BNEP filters: protocol multicast
[    4.278154] Bluetooth: BNEP socket layer initialized
[    9.681140] Bluetooth: hci0: unexpected event for opcode 0xfc1e
[    9.684524] Bluetooth: hci0: Firmware timestamp 2022.51 buildtype 1 build 56683
[    9.686990] Bluetooth: hci0: Found device firmware: intel/ibt-0041-0041.sfi
[    9.687042] Bluetooth: hci0: Boot Address: 0x100800
[    9.687044] Bluetooth: hci0: Firmware Version: 191-39.22
[    9.711274] Bluetooth: hci0: FW download error recovery failed (-19)
[   16.375837] Bluetooth: hci0: unexpected event for opcode 0xfc1e
[   16.377225] Bluetooth: hci0: Firmware timestamp 2022.51 buildtype 1 build 56683
[   16.379453] Bluetooth: hci0: Found device firmware: intel/ibt-0041-0041.sfi
[   16.379500] Bluetooth: hci0: Boot Address: 0x100800
[   16.379502] Bluetooth: hci0: Firmware Version: 191-39.22
[   16.403553] Bluetooth: hci0: FW download error recovery failed (-19)
[   35.159915] Bluetooth: hci0: unexpected event for opcode 0x100e
[   35.160688] Bluetooth: hci0: unexpected event for opcode 0x100e
[   35.161184] Bluetooth: hci0: unexpected event for opcode 0x100e
[   35.161711] Bluetooth: hci0: unexpected event for opcode 0x100e
[   35.162317] Bluetooth: hci0: unexpected event for opcode 0x100e
[   35.163224] Bluetooth: hci0: unexpected event for opcode 0x100c
[   35.164171] Bluetooth: hci0: unexpected event for opcode 0xfc1e
[   35.166156] Bluetooth: hci0: Firmware timestamp 2022.51 buildtype 1 build 56683
[   35.168368] Bluetooth: hci0: Found device firmware: intel/ibt-0041-0041.sfi
[   35.168412] Bluetooth: hci0: Boot Address: 0x100800
[   35.168414] Bluetooth: hci0: Firmware Version: 191-39.22
[   35.192077] Bluetooth: hci0: FW download error recovery failed (-19)

Additional information

Currently have installed Home Assistant as VM inside Proxmox: Linux proxmox 6.2.9-1-pve #1 SMP PREEMPT_DYNAMIC PVE 6.2.9-1 (2023-03-31T10:48Z) x86_64.

Home assistant system information:

Version core-2023.4.2 Installation Type Home Assistant OS Development false Supervisor true Docker true User root Virtual Environment false Python Version 3.10.10 Operating System Family Linux Operating System Version 6.1.22 CPU Architecture x86_64 Configuration Directory /config

Home Assistant Supervisor Host Operating System Home Assistant OS 10.0.rc3 Update Channel beta Supervisor Version supervisor-2023.04.0 Agent Version 1.5.1 Docker Version 23.0.2

home-assistant[bot] commented 1 year ago

Hey there @bdraco, mind taking a look at this issue as it has been labeled with an integration (bluetooth) you are listed as a code owner for? Thanks!

Code owner commands Code owners of `bluetooth` can trigger bot actions by commenting: - `@home-assistant close` Closes the issue. - `@home-assistant rename Awesome new title` Renames the issue. - `@home-assistant reopen` Reopen the issue. - `@home-assistant unassign bluetooth` Removes the current integration label and assignees on the issue, add the integration domain after the command.

(message by CodeOwnersMention)


bluetooth documentation bluetooth source (message by IssueLinks)

lukbe commented 1 year ago

Hello, I did update of the proxmox today and I have same problem = same error message in home assistant :( Bluetooth adapter None with address....

Proxmeox shell:

root@pve:~# dmesg | grep -i blue
[   10.017624] Bluetooth: Core ver 2.22
[   10.017645] NET: Registered PF_BLUETOOTH protocol family
[   10.017646] Bluetooth: HCI device and connection manager initialized
[   10.017650] Bluetooth: HCI socket layer initialized
[   10.017652] Bluetooth: L2CAP socket layer initialized
[   10.017656] Bluetooth: SCO socket layer initialized
[   12.179377] Bluetooth: hci0: Reading Intel version command failed (-110)
[   12.179377] Bluetooth: hci0: command 0xfc05 tx timeout
[  246.569090] Bluetooth: hci0: command 0xfc05 tx timeout
[  246.569092] Bluetooth: hci0: Reading Intel version command failed (-110)
[  271.428511] Bluetooth: hci0: command 0xfc05 tx timeout
[  271.432604] Bluetooth: hci0: Reading Intel version command failed (-110)

Home asistant error: Reading Intel version command failed (-110)

The Bluetooth adapter is visible in the Hardware overview in HA, I tried to search 8087. However, I am not able to add Bluetooth device after removal in the HA.

Intel nuc 8i3bek

Milinator commented 1 year ago

Same problem for me and my Intel Nuc since today.

Edit: I fixed it by using a different HA integration which does the same. As I did that, everything got back to normal and I didn't even needed the new integration.

Destix commented 1 year ago

Same here with CSR8510 A10 (0a12:0001) by cyber-blue(HK)Ltd

Solved: Just added usb.autoConnect.device0 = "0x781:0x7101" to config https://kb.vmware.com/s/article/1648

chatziko commented 1 year ago

Solved: Just added usb.autoConnect.device0 = "0x781:0x7101" to config https://kb.vmware.com/s/article/1648

I guess this is for vmware, right? Any similar trick for proxmox?

chatziko commented 1 year ago

Still no solution, but I ran a couple of tests which might be useful. Proxmox 7.4, kernel 5.15.104, NUC 8i7BEH.

el1-x commented 1 year ago

@chatziko I'm not sure this will fix your issue but I had a similar issue with the Bluetooth on my Intel AX210 and passing through to HA from Proxmox. I was able to resolve the issue by blacklisting the driver on the host (Proxmox).

Create a file in the /etc/modprobe.d/ folder. The file should contain a single line blacklist btusb

chatziko commented 1 year ago

@el1-x thanks for the suggestion, unfortunately it didn't work :disappointed:

I have an external bluetooth adapter that works fine (without blacklisting). Also the internal adapter works on a debian vm but not on HA. Strange...

vgomenyuk commented 1 year ago

Unfortunately, blacklisting didn't help me as well. I've bought USB Bluetooth 5.1 adapter based on Realtek RTL8761BU, it works perfectly without any additional configuration steps, just from the box after pressing configure button in HA.

chatziko commented 1 year ago

I'm happy to report that upgrading to HA OS 10.2 solved the problem for me!

vgomenyuk commented 1 year ago

Interesting, but I have still the same issue with HA OS 10.2. No changes.

el1-x commented 1 year ago

I'm happy to report that upgrading to HA OS 10.2 solved the problem for me!

Awesome! Looks like I have the same outcome, all working for me too.

chatziko commented 1 year ago

Likely fixed by https://github.com/home-assistant/operating-system/pull/2553

d-d commented 1 year ago

TLDR; It works for me on Proxmox 7.4-4 using Kernel 5.3.19-2-pve but not with 5.15 or 6.2.

Environment:

Bluetooth has been stable for months on this system but since it is a lab system it gets updates applied whenever they are released by proxmox and HA. At some point, the system started failing with "Bluetooth: hci0: Reading Intel version command failed (-110)" Googling this hints at a kernel bug - https://bugzilla.kernel.org/show_bug.cgi?id=215167

Ineffective workarounds tested:

Troubleshooting done:

Not yet tested: The patch suggested in https://bugzilla.kernel.org/show_bug.cgi?id=215167#c48

Finally something worked again:

Log entries from the successful boot:

root@pve:~# journalctl -b | egrep -i lueto

Jun 09 08:21:23 pve kernel: Bluetooth: Core ver 2.22
Jun 09 08:21:23 pve kernel: Bluetooth: HCI device and connection manager initialized
Jun 09 08:21:23 pve kernel: Bluetooth: HCI socket layer initialized
Jun 09 08:21:23 pve kernel: Bluetooth: L2CAP socket layer initialized
Jun 09 08:21:23 pve kernel: Bluetooth: SCO socket layer initialized
Jun 09 08:21:23 pve kernel: Bluetooth: hci0: Bootloader revision 0.1 build 42 week 52 2015
Jun 09 08:21:23 pve kernel: Bluetooth: hci0: Device revision is 2
Jun 09 08:21:23 pve kernel: Bluetooth: hci0: Secure boot is enabled
Jun 09 08:21:23 pve kernel: Bluetooth: hci0: OTP lock is enabled
Jun 09 08:21:23 pve kernel: Bluetooth: hci0: API lock is enabled
Jun 09 08:21:23 pve kernel: Bluetooth: hci0: Debug lock is disabled
Jun 09 08:21:23 pve kernel: Bluetooth: hci0: Minimum firmware build 1 week 10 2014
Jun 09 08:21:23 pve kernel: Bluetooth: hci0: Found device firmware: intel/ibt-17-16-1.sfi
Jun 09 08:21:23 pve systemd[1]: Reached target Bluetooth.
Jun 09 08:21:25 pve kernel: Bluetooth: hci0: Waiting for firmware download to complete
Jun 09 08:21:25 pve kernel: Bluetooth: hci0: Firmware loaded in 1606590 usecs
Jun 09 08:21:25 pve kernel: Bluetooth: hci0: Waiting for device to boot
Jun 09 08:21:25 pve kernel: Bluetooth: hci0: Device booted in 13862 usecs
Jun 09 08:21:25 pve kernel: Bluetooth: hci0: Found Intel DDC parameters: intel/ibt-17-16-1.ddc
Jun 09 08:21:25 pve kernel: Bluetooth: hci0: Applying Intel DDC parameters completed
Jun 09 08:21:25 pve kernel: Bluetooth: hci0: Firmware revision 0.1 build 108 week 45 2022

After a successful boot with pve kernel 5.13, it is possible to boot again with 6.2.11-2-pve however the firmware is not loaded, but instead flagged as "already loaded".


root@pve:~# dmesg | egrep -i uetoot
[    8.147892] Bluetooth: Core ver 2.22
[    8.147920] NET: Registered PF_BLUETOOTH protocol family
[    8.147922] Bluetooth: HCI device and connection manager initialized
[    8.147926] Bluetooth: HCI socket layer initialized
[    8.147929] Bluetooth: L2CAP socket layer initialized
[    8.147934] Bluetooth: SCO socket layer initialized
[    8.882761] Bluetooth: hci0: Found device firmware: intel/ibt-17-16-1.sfi
[    8.882788] Bluetooth: hci0: Boot Address: 0x40800
[    8.882789] Bluetooth: hci0: Firmware Version: 108-45.22
[    8.882791] Bluetooth: hci0: Firmware already loaded

Home Assistant OS 10.2 + Core 2023.6.1 is successfully running with Bluetooth after this 6.2.11-2-pve boot. Remains to see if it is stable.

The intel firmware loading might be what changed between 5.13 and 5.15 - and there appears to have been done some refactoring in the kernel during that window. https://github.com/torvalds/linux/commit/019a1caa7fd2c9bb689f9a15fe8cb1d53aa6d8b8 Perhaps someone with greater kernel coding skills than I have could take a look here to find if something changed with the firmware loading.

el1-x commented 1 year ago

Just to confirm - Do you have an AX210 in your NUC? From what I can tell, your model is supplied with an Intel Wireless-AC 9560 soldered down package using the Intel CNVio interface and not USB/PCIe

I had issues with my AX210 but they were solved with the recent HAOS update. I am currently using Proxmox 7.4-3 with the 6.2.11-2-pve kernel. However, I had BT working under the 5.15 kernel by blacklisting bt-usb.

I am wondering whether the issue you are experiencing is different the one experienced by AX210 users.... :thinking:

d-d commented 1 year ago

@el1-x You are right, it is a Wireless-AC 9560 + Bluetooth 5.0 integrated Wireless on the NUC8i5BEH I tested above. The issue could be different from AX210 or it could be related to something in the btintel.c kernel code, as all the intel bluetooth code seems to be shared between different models. See also https://bugzilla.kernel.org/show_bug.cgi?id=213829

el1-x commented 1 year ago

It is a peculiar case and even more so that you do not see any resolution using a 6.2+ kernel.

tommyjlong commented 1 year ago

I'll add as an FYI since its a slight variant: NUC: NUC11TNHi5 (i5Gen11) with AX201=>WiFi6/BT5 (Not AX210). QEMU/KVM x86_64 running HA 2023.6.2, Supervisor 2023.06.2, Operating System 10.2 9 (uname -r => 6.1.29)

[Ubuntu 22.04 Host] $lsusb =>Bus 003 Device 004: ID 8087:0026 Intel Corp. AX201 Bluetooth

[HA Guest]: #lsusb => Bus 001 Device 006: ID 8087:0026

#dmesg:
[    0.421912] Bluetooth: Core ver 2.22
[    0.422216] NET: Registered PF_BLUETOOTH protocol family
[    0.422502] Bluetooth: HCI device and connection manager initialized
[    0.422848] Bluetooth: HCI socket layer initialized
[    0.423213] Bluetooth: L2CAP socket layer initialized
[    0.423485] Bluetooth: SCO socket layer initialized
[    2.840236] usb 1-6: New USB device found, idVendor=8087, idProduct=0026, bcdDevice= 0.02
[    2.841196] usb 1-6: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.951226] usbcore: registered new interface driver btusb
[    5.015097] Bluetooth: hci0: command 0xfc05 tx timeout
[    5.015097] Bluetooth: hci0: Reading Intel version command failed (-110)

BTW, this is my first attempt at passing the NUC's integrated bluetooth to HA Guest, so can't tell if it worked on other HA kernel versions or not. BTW, this does work on the Host (when not passing to the VM). Ubuntu uname -r =>5.19.0-43-generic

bdraco commented 1 year ago

You might try HAOS 10.3 https://github.com/home-assistant/operating-system/releases/tag/10.3

Add patch to fix Bluetooth LE advertisement stall (https://github.com/home-assistant/operating-system/issues/2535) (https://github.com/home-assistant/operating-system/pull/2598) agners

tommyjlong commented 1 year ago

I just gave 10.3 a try hoping it might be able to fix it, but still has the same failure.

amoshydra commented 1 year ago

I have been facing the same issue since the launch of 10. My Bluetooth devices work perfectly fine on 9.5. I can get it working again by downgrading from 10 -> 9.5 (ha os update --version 9.5, followed by a Hardware restart)

I am using SwitchBot bluetooth integration.

Tried:

Running: Intel NUC NUC7CJYS - Intel® Wireless-AC 9462

Home Assistant is running inside Proxmox 7: (Linux homeserver 5.15.74-1-pve #1 SMP PVE 5.15.74-1 (Mon, 14 Nov 2022 20:17:15 +0100) x86_64 GNU/Linux)

vgomenyuk commented 1 year ago

After upgrade Proxmox VE to 8.0.3 based on Debian 12 and kernel 6.2.16-3-pve, I don't see the Intel AX210 BT adapter anymore in Proxmox devices list, so I can't add it to HA VM. Also there are nothing found in Proxmox startup log file related to Intel AX210 BT adapter , even error logs that were present before, right now are gone. Any ideas how to resolve an issue? Much appreciate for your help!

bdraco commented 1 year ago

duplicate of https://github.com/home-assistant/core/issues/92379