This question is very much related to How to turn off Wireless power management permanently, albeit when using systemd-networkd to manage hardware.
I have a headless Raspberry Pi Model 3 connected to a printer whose only job it is to collect print jobs (CUPS) and forward them to the printer (using the AirPrint protocol mostly). Sometimes I cannot ping it. I suspect that the wireless card powers down after awhile. I can rule out connectivity issues because it is near an access point. Is there any way to influence this in my unit configuration? I could not find it documented anywhere.
wlan0.network
[Match]
Name=wlan0
[Network]
DHCP=yes
#Domains=local
[DHCP]
RouteMetric=20
And yes, I know I can do iwconfig wlan0 power off
to disable power management on the device. I just like having static configuration files:
So I am looking for an equivalent to NetworkManager's
/etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
[connection]
wifi.powersave = 2