Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5103

Raspberry Pi OS • Re: Best way to disable WiFi Power Save?

$
0
0
One way is to create a file (using sudo) in /etc/NetworkManager/conf.d with the file type ".conf" e.g., powersave.conf, with the contents

Code:

wifi.powersave=off
Make the file protection 600 and reboot.
Thanks @bls
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
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.

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



Viewing all articles
Browse latest Browse all 5103

Trending Articles