Hello friends!
Apologies as I figured this out over 2 weeks ago but didn't have the time to write it down since. Your replies to the thread reminded me to come share my findings.
Note: I did an update of Home Assistant Operating System while typing this stuff down, and I think it deleted the DT Blobs I mention below in step 4. I'll keep an eye out during the next HassOS update and report back here...
So, I did go and read up a little more on the concept of Device Tree Overlays.
For now, this is how I managed to disable Bluetooth and Wi-Fi:
Disabling built-in Wi-Fi / Bluetooth from Raspberry Pi 4 / CM4 running HassOS
-
SSH to the Yellow and check that the devices are up:
ssh [email protected] -p 22222
ip a show wlan0
hcitool dev
You should see something like that:
# ip a show wlan0
3: wlan0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether d8:3a:dd:78:5x:xx brd ff:ff:ff:ff:ff:ff
# hcitool dev
Devices:
hci0 D8:3A:DD:78:5X:XX
- Add the following 2 lines under the [all] section in the file /mnt/boot/config.txt.
I personally do it with vi /mnt/boot/config.txt
dtoverlay=disable-wifi
dtoverlay=disable-bt
Note: at the time of writing, there's already this line in there:
device_tree=bcm2711-rpi-cm4-ha-yellow.dtb
And I've also added these 2 lines because I like my Pi 4s to be faster:
over_voltage=6
arm_freq=2000
- Here's the trick: currently HassOS doesn't have the Device Tree Overlay Blobs necessary to disable these 2 devices. Add them manually with these commands:
cd /mnt/boot/overlays/
curl -L -O https://github.com/raspberrypi/firmware/raw/master/boot/overlays/disable-wifi.dtbo
curl -L -O https://github.com/raspberrypi/firmware/raw/master/boot/overlays/disable-bt.dtbo
- Reboot and run the commands from step 2) again:
# ip a show wlan0
Device "wlan0" does not exist.
# hcitool dev
Devices:
Gone! (for now)...