If you don’t want your Raspberry Pi WiFi to go sleep,trythatsolution
iw command is not persistant, I added
/sbin/iw wlan0 set power_save off to
/etc/rc.local right before
exit 0 to have it set at startup (no need for
sudo since rc.local already is run with admin rights).