Hey!
PeGe wrote:OK, but I actually didn't criticize your method.
I'm sorry, I didn't want to sound that rude...
PeGe wrote:What I did criticize was Apple, for once introducing the non-configurable "go-to-sleep" feature, that was forced upon the users.
Well, I never had the problem, that my iPhone went to sleep when it's screen was off. I researched a bit on google and found some threads of people who tell, that they also have this problem.
I'm interested in this wifi stuff and therefore investigated a little further:
I turned off "Background app refresh" and turned on "Wifi-Assist" in settings and monitored the state of the iPhone-wifi on the router with this command for about 30 minutes:
Code: Select all
while true; do wl -i eth1 sta_info AA:BB:CC:DD:EE:FF; sleep 1; done;
The phone definitely went into sleep mode, but it did not disconnect from the router (at least as far as I can see from the constant logging on the router).
Here you can see a picture with the interesting parts marked:

- WifiLog.jpg (72.33 KiB) Viewed 5668 times
- The first thing the picture shows is the current idle time, which I think is the time no packet has been transmitted to or from the phone. When it reached 59 seconds it reset to 0.
- The second thing marked is "PS" in the "flags" line. It states, that the radio of the iPhone is in "Power Safe" mode at the moment. I googled again and stumbled across these power safe mechanism descriptions from the IEEE 802.11-standard.
tl;dr you can look them up
here,
here or
here.
The standard power safe mode PSM seems to use so called
beacons, which is like a heartbeat signal transmitted every few 100ms. The device turns the radio off and checks every few beacons if there are new packets waiting for it.
I even found the settings for these beacons in my ASUS RT-AC68U in Wireless->Professional.

- RouterSettings.jpg (101.9 KiB) Viewed 5668 times
Racierox wrote:Thanks for the replies. This is unfortunately not the solution for me then.
I'll look into the Bluetooth Beacon, looks promising!
Racierox: Maybe you should have a look in those settings and compare with the picture, maybe it's different on your router.
- The third thing is the RX and TX-rate of the last packet. TX even dropped to 1Mbps after a few seconds/minutes.
I use the latest iOS 10.3 beta.
It would be interesting if the problem is related to iOS devices or misconfigured/buggy routers, as I also read in one of the links above. Maybe it is also related to Wifi-sync, iCloud, Find my iPhone, etc. settings from iPhone (things which could prevent the phone from disconnecting from the router). Even if I have disabled background app refresh, maybe these are things which cannot be disabled to transmit their data in the background.
Maybe someone else with an iOS device has this set up already?
Best regards,
Surroot