You shouldn't need to screw with the client if the router hangs and needs to be restarted. Once the router comes back up the client should get a new address when its DHCP lease expires. That said, if the DHCP lease time is too short, you could indeed have a problem.Thanks @blsOne way is to create a file (using sudo) in /etc/NetworkManager/conf.d with the file type ".conf" e.g., powersave.conf, with the contentsMake the file protection 600 and reboot.Code:
wifi.powersave=off
I would like to ask you something else. My router (via dhcp) assign static local ip adresses to my raspberries (e.g. 192.168.0.101) based on mac adress. Router is no good and sometimes loose conection, and I need to restart Pi-s. Is it posible to be run a script in NetworkManager (nmcli), if wi-fi connection to router is donw to restart only wlan interfece on Pi - not reboot it all.
Thanks
In any case, to restart a connection with NM, you need the connection name, which you either already know or can obtain with `sudo nmcli c show`. Use that to replace "<connection-name>" below.
Then, to restart a connection you can simply do
Code:
sudo nmcli c down <connection-name>sudo nmcli c up <connection-name>
Statistics: Posted by bls — Tue Nov 26, 2024 2:10 pm