From 17ae2d47412d8ae4f78bc21631c6e60d5955811a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20=C4=8Cerm=C3=A1k?= Date: Tue, 1 Jul 2025 17:32:07 +0200 Subject: [PATCH] Do not disable RPi Bluetooth if Wi-Fi is not present (#4132) This reverts commit eab18076ad7717ff4bce848b95fdb4e6c9f88f29. This change was added in #2948 as a workaround for all-zero adapter appearing in the HA frontend (#2944). With changes implemented in [1], this is no longer needed, the only minor issue is that the ghost adapter still appears in hciconfig (and other utilities') output as reported in [2]. However, this should be less problematic than the Bluetooth being unavailable if WiFi is disabled through disable-wifi DT overlay, so let's start with removing the workaround. Fixes #2975 [1] https://github.com/Bluetooth-Devices/bluetooth-adapters/pull/105 [2] https://github.com/raspberrypi/linux/issues/5756 --- .../package/pi-bluetooth/hcidisable.service | 10 ---------- .../package/pi-bluetooth/pi-bluetooth.mk | 1 - 2 files changed, 11 deletions(-) delete mode 100644 buildroot-external/package/pi-bluetooth/hcidisable.service diff --git a/buildroot-external/package/pi-bluetooth/hcidisable.service b/buildroot-external/package/pi-bluetooth/hcidisable.service deleted file mode 100644 index 2548d8f4c..000000000 --- a/buildroot-external/package/pi-bluetooth/hcidisable.service +++ /dev/null @@ -1,10 +0,0 @@ -[Unit] -Description=Remove HCI kernel driver if WiFi/Bluetooth module is not present -ConditionPathExists=!/sys/bus/sdio/devices/mmc1:0001:1 - -[Service] -Type=forking -ExecStart=/usr/sbin/modprobe -r hci_uart - -[Install] -WantedBy=hassos-hardware.target diff --git a/buildroot-external/package/pi-bluetooth/pi-bluetooth.mk b/buildroot-external/package/pi-bluetooth/pi-bluetooth.mk index c0afd85d6..5b244be6b 100644 --- a/buildroot-external/package/pi-bluetooth/pi-bluetooth.mk +++ b/buildroot-external/package/pi-bluetooth/pi-bluetooth.mk @@ -12,7 +12,6 @@ PI_BLUETOOTH_LICENSE_FILES = debian/copyright define PI_BLUETOOTH_INSTALL_TARGET_CMDS $(INSTALL) -d $(TARGET_DIR)/etc/systemd/system/hassos-hardware.target.wants $(INSTALL) -m 0644 $(BR2_EXTERNAL_HASSOS_PATH)/package/pi-bluetooth/hciuart.service $(TARGET_DIR)/usr/lib/systemd/system/ - $(INSTALL) -m 0644 $(BR2_EXTERNAL_HASSOS_PATH)/package/pi-bluetooth/hcidisable.service $(TARGET_DIR)/usr/lib/systemd/system/ $(INSTALL) -m 0644 $(BR2_EXTERNAL_HASSOS_PATH)/package/pi-bluetooth/bthelper@.service $(TARGET_DIR)/usr/lib/systemd/system/ $(INSTALL) -d $(TARGET_DIR)/usr/bin