-
Notifications
You must be signed in to change notification settings - Fork 940
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bluetooth adapter showing on Yellow with CM4 without Bluetooth (OS 11.2.rc1) #2944
Comments
I can reproduce this problem on my end. It seems that the kernel Bluetooth initialization creates an hci0 device in any case. I am not sure if we can prevent that though 🤔 The Bluetooth daemon seems to correctly detect that there is no controller:
To me it seems that the Core makes the assumption when there is a hci0 device that there is a Bluetooth controller behind it? We'll need to check what Raspberry Pi OS is doing in this situation, but I don't think they have something their code which disables the in-kernel/device-tree Bluetooth/HCI interface based on WiFi/Bluetooth chip availability 🤔 /cc @bdraco |
For completeness, Yellow hciconfig reports this:
And that seems to be the case on Yellow as well:
|
If the WiFi/Bluetooth module is not present on the SDIO bus, remove the HCI driver. This avoids hci0 interface to be present. Current Home Assistant Core versions show a Bluetooth device as soon as a hci device is present. With this change there won't be a Bluetooth device shown.
…2948) * Remove kernel HCI driver if no WiFi/Bluetooth module present (#2944) If the WiFi/Bluetooth module is not present on the SDIO bus, remove the HCI driver. This avoids hci0 interface to be present. Current Home Assistant Core versions show a Bluetooth device as soon as a hci device is present. With this change there won't be a Bluetooth device shown. * Update buildroot-external/package/pi-bluetooth/hcidisable.service Co-authored-by: Jan Čermák <[email protected]> --------- Co-authored-by: Jan Čermák <[email protected]>
…2948) * Remove kernel HCI driver if no WiFi/Bluetooth module present (#2944) If the WiFi/Bluetooth module is not present on the SDIO bus, remove the HCI driver. This avoids hci0 interface to be present. Current Home Assistant Core versions show a Bluetooth device as soon as a hci device is present. With this change there won't be a Bluetooth device shown. * Update buildroot-external/package/pi-bluetooth/hcidisable.service Co-authored-by: Jan Čermák <[email protected]> --------- Co-authored-by: Jan Čermák <[email protected]>
This is what I get if the CM4 has BLE. Can someone post what shows up when it doesn't? # docker exec -it homeassistant /bin/bash
homeassistant:/config# python3
Python 3.11.6 (main, Oct 22 2023, 22:02:45) [GCC 12.2.1 20220924] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from bluetooth_adapters import get_adapters
>>> adapters = get_adapters()
>>> import asyncio
>>> asyncio.run(adapters.refresh())
>>> adapters.adapters
{'hci0': {'address': 'E4:5F:01:D0:EA:29', 'sw_version': 'homeassistant', 'hw_version': 'usb:v1D6Bp0246d0546', 'passive_scan': True, 'manufacturer': 'Raspberry Pi Trading Ltd', 'product': None, 'vendor_id': None, 'product_id': None}} |
Thanks. I think the simple solution might be to ignore 00:00.... on Linux |
This should be resolved with #2948, no other fix/workaround should be needed, at least on RPi with HAOS. But it's worth noting it's still present on RPi OS (see the linked issue above). |
IMHO, #2948 is really a work around. It could even be problematic in cases a external connected Bluetooth adapter is used 😰 I guess the typical use case is a USB attached Bluetooth adapter, which I think should not be affected by removing the So ideally, we should have Home Assistant Core check the state of the Once Core is able to deal with that device, or we/Raspberry Pi folks find a nicer way how to disable the Bluetooth interface when using krnbt on CM4's without a WiFi/Bluetooth module, we should get rid of the work around introduced in #2948. Until then, I'd like to keep this open as a reminder to get this properly fixed. |
@bdraco so there is another case where an hci device shows up with 00:00:00:00:00:00: Systems running HAOS with a newer Intel WiFi/Bluetooth adapter. |
So the idea is to ignore adapters with |
Hello,
So I guess that something has changed in the latest version ? |
There hasn't been any activity on this issue recently. To keep our backlog manageable we have to clean old issues, as many of them have already been resolved with the latest updates. |
I'm not sure why, but as of OS 11.2.rc1 I have a bluetooth adapter showing up.
Could be related to supervisor but I don't notice any changes related to that.
It discovers hci0 but never inits on my HA Yellow (as my CM4 does not have wireless).
I don't have a big understanding of how the OS works but I assume it might be related to #2931 by @sairon.
Host logs:
Core:
Originally posted by @tjorim in #2940 (comment)
The text was updated successfully, but these errors were encountered: