I recently had the opportunity to setup a Raspberry Pi 4 in a headless configuration and ran into an interesting issue around the WiFi configuration with Bullseye.
When logging in via SSH the following text was visible at the bottom of the motd;
Wi-Fi is currently blocked by rfkill.
Use raspi-config to set the country before use.
It turns out that Bullseye will disable the WiFi driver in the kernel unless the country code is set.
This is really only an issue if you are using the Raspberry Pi in a headless configuration without the desktop GUI.
What’s the workaround?
I edited the wpa_supplicant.conf file in /etc/wpa_supplicant as follows, adding the US country code;
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=US
Then you need to copy the file /etc/wpa_supplicant/wpa_supplicant.conf to /boot and reboot.
sudo cp /etc/wpa_supplicant/wpa_supplicant.conf /boot
sudo init 6
When the Raspberry Pi booted back up… the wireless drive was loaded and I was able to connect to the intended wireless network.
Cheers!
Saar Koren says
Thank you! This solved the issue for me on Raspberry Pi 3 Model B. Other results I found were missing the part where you copy the file to /boot.