openhab / openhabian

openHABian - empowering the smart home, for Raspberry Pi and Debian systems
https://community.openhab.org/t/13379
ISC License
820 stars 251 forks source link

Wi-Fi unblock #1659

Closed mstormi closed 2 years ago

mstormi commented 2 years ago

Ever been wondering about this message on login to fresh installs.

Wi-Fi is currently blocked by rfkill.
Use raspi-config to set the country before use.

Seems somewhere along the way (@ bullseye release?) Wi-Fi has been disabled in Raspi OS by default. I have read about issues with installing from Wi-Fi albeit did not analyze but I think it might not work today. I've added rfkill unblock wifi to the beginning of first-boot.bash to enable it on any new openHABian install Not fully sure about consequences but @ecdye wanted to make you aware.

PS do we need to release a new image ?

ecdye commented 2 years ago

I think we intentionally only unblocked it if needed on line 103 to prevent it from taking up system resources and being used as a security backdoor. It doesn't really matter but, no a new image release should not be necessary because wifi setup on first boot already unblocks, technically speaking all adding the unblock command earlier in the file does is prevent the warning message from popping up.

I suspect that it is disabled by default because of some regulatory issue on unnecessary signal transmission in the UK but that is a guess based off of something I think I heard of but could be completely wrong.

mstormi commented 2 years ago

because wifi setup on first boot already unblock

I have been and still am unsure about installing via hotspot. That's the fallback when you have neither Ethernet connected nor Wi-Fi configured. Didn't try but guess it does not work without that unblocking I inserted.

ecdye commented 2 years ago

No it should, I'll look at it more later, but I have actually successfully used the WiFi hotspot before to setup. I did it while testing changes a few weeks ago.

mstormi commented 2 years ago

did you double check? any outstanding action ?

ecdye commented 2 years ago

I did, I left your unblock in and removed one of the now redundant ones. I don't think this will harm anything and as such didn't have a problem leaving it in.