Reconnecting RPI on WLAN without rebooting in order to get 5Ghz

I have 14 RPIs connected to my Router (Fritzbox 6591). 12 of them can connect with 5 GHz. But when I have a power loss or a reboot of my router, they all reconnect with 2.4 GHz after rebooting.

A second reboot of the RPIs brought them back to 5GHz but this interrupted my applications on these RPIs.

After quite some time of research in forums I found a solution to reconnect to my WLAN on the 5GHz network without rebooting. It only needs 2 nodes.

In few cases you have to run it twice

[{"id":"d93a61053c3c1138","type":"inject","z":"b0bb63dea1066d9a","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":220,"y":400,"wires":[["58724090944c5d8b"]]},{"id":"58724090944c5d8b","type":"function","z":"b0bb63dea1066d9a","name":"reconnect WiFi","func":"msg.payload = \"sudo ip link set wlan0 down && sleep 1 && sudo ip link set wlan0 up\"\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":420,"y":420,"wires":[["22f1b275fb4fa70a"]]},{"id":"22f1b275fb4fa70a","type":"exec","z":"b0bb63dea1066d9a","command":"sudo","addpay":"payload","append":"","useSpawn":"false","timer":"","oldrc":false,"name":"","x":570,"y":420,"wires":[[],[],[]]}]

Assuming that the two networks have different SSIDs then only give the Pis the credentials for the 5GHz SSID.

both networks have the same SSID which is required for my mesh network.

Sorry, replied to wrong name.

My wifi 6 router lets me set different ssids for 5GHz and 2.4GHz, but you say that's not an option for you.

Does it let you set the same ssid but different passwords for the two bands?

Also, does it really matter which one they connect to?

you are right, it works with both net works of course but I have quite a number of shellies and other IOT stuff which only run on 2.4 GHz. Therefore I think it is better for my RPIs, which are more important, that they run on a different and faster frequency (5GHz)

Really, I wouldn't worry about it unless you are having problems.

no, only one password for both networks

This may be useful, I have never used nmcli to manage wifi so not tested it.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.