I have a Raspberry Pi that I need it to remain connected to my WiFi constantly (at least as soon as the WiFI becomes available). In practice, however, I have noticed that when there are problems with the WiFi, it gets disconnected and it takes quite a lot of time to reconnect (e.g. 1 minute). Even worst, there are some rare occasions when the RPi after disconnecting, it does not try to reconnect back at all.

My question is, is there any CRON-driven (and lightweight hopefully) script that will force (at second granularity) the RPi since its very boot, to be trying to reconnect (in case it is not connected) to a specific WiFi AP?

I have `sudo iwconfig wlan0 power off` in `/etc/rc.local` but the problem remains.

My RPi is:


    PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
    NAME="Raspbian GNU/Linux"
    VERSION_ID="11"
    VERSION="11 (bullseye)"
    VERSION_CODENAME=bullseye
    ID=raspbian
    ID_LIKE=debian