WifiAware Endpoint usage and impact on infrastructure Wifi

  1. Are the Wifi-Aware's WAEndpoint's discovered ephemeral? I'm trying to understand what's the best way to reconnect a disconnected WifiAware connection - Can I just cache the endpoint and start a new connection with the same endpoint or do I need to browse again and get a new WAEndpoint?
  2. My use case requires both WifiAware connection to another device and the devices also need to be connected to infrastructure wifi most of the time. I'm concerned about the WifiAware's connection having any impact on infrastructure wifi. What is the impact on the infrastructure wifi here in comparison to using the Apple peer to peer wifi(That Multipeer framework or Network framework use)?
Answered by DTS Engineer in 863794022

There are three different questions here, so let me tackle them in turn.


Are the Wifi-Aware's WAEndpoint’s discovered ephemeral?

That’s a matter of definition (-:

Our recommendation is that you treat an endpoint like other networking objects, that is, it’s fine to continue using it while your app is running, but it’s best to drop it when your app gets suspended [1].

Also, keep in mind that you can only connect while the publisher is still running, and that gets increasingly unlikely as time goes by.


What is the impact on the infrastructure wifi here in comparison to using the Apple peer to peer wifi … ?

Wi-Fi Aware certainly can have an impact on infrastructure Wi-Fi. I don’t have any concrete info about that impact, or how it compares to Apple peer-to-peer Wi-Fi. However, you will likely see a difference depending on how you use Wi-Fi Aware, and specifically what performance mode you use (.realtime vs .bulk).


Assuming I would be connected to the devices over a long period of time (lets say 12 hours in a day)

That’s quite a big assumption. It should be feasible to maintain a connection for that long, assuming you generate traffic to stop the connection being closed on idle. However, to do that you’d have to stay running — that is, not be suspended — and that’s hard to achieve for 12 hours on iOS. And it becomes even harder if the device is on battery, so it’s not clear how realistic your scenario is.

Regardless, I wouldn’t expect the power impact of Wi-Fi Aware to be significantly great that that of infrastructure Wi-Fi.

Keep in mind that Wi-Fi isn’t a huge power sink in general. Sure, it consumes a measurable amount of power, but that’s tiny compared to how much power is used by the CPU and GPU if you run them at full speed.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] In the currently implementation is the endpoint is likely to remain valid until the device restarts, but the guidance here allows for things to change in the future.

Adding a related question -

  1. Assuming I would be connected to the devices over a long period of time(lets say 12 hours in a day) What is the impact on battery usage in using Wifi-Aware compared to Infrastructure Wifi/ Ethernet/ Apple Peer to Peer Wifi through Network Framework?
Accepted Answer

There are three different questions here, so let me tackle them in turn.


Are the Wifi-Aware's WAEndpoint’s discovered ephemeral?

That’s a matter of definition (-:

Our recommendation is that you treat an endpoint like other networking objects, that is, it’s fine to continue using it while your app is running, but it’s best to drop it when your app gets suspended [1].

Also, keep in mind that you can only connect while the publisher is still running, and that gets increasingly unlikely as time goes by.


What is the impact on the infrastructure wifi here in comparison to using the Apple peer to peer wifi … ?

Wi-Fi Aware certainly can have an impact on infrastructure Wi-Fi. I don’t have any concrete info about that impact, or how it compares to Apple peer-to-peer Wi-Fi. However, you will likely see a difference depending on how you use Wi-Fi Aware, and specifically what performance mode you use (.realtime vs .bulk).


Assuming I would be connected to the devices over a long period of time (lets say 12 hours in a day)

That’s quite a big assumption. It should be feasible to maintain a connection for that long, assuming you generate traffic to stop the connection being closed on idle. However, to do that you’d have to stay running — that is, not be suspended — and that’s hard to achieve for 12 hours on iOS. And it becomes even harder if the device is on battery, so it’s not clear how realistic your scenario is.

Regardless, I wouldn’t expect the power impact of Wi-Fi Aware to be significantly great that that of infrastructure Wi-Fi.

Keep in mind that Wi-Fi isn’t a huge power sink in general. Sure, it consumes a measurable amount of power, but that’s tiny compared to how much power is used by the CPU and GPU if you run them at full speed.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] In the currently implementation is the endpoint is likely to remain valid until the device restarts, but the guidance here allows for things to change in the future.

The 12 hour usage I mentioned is sporadic where one of the devices could be going into sleep intermittently and the other device is always active(and connected to power). The idea here is to have the devices be connected always but given that one of the devices can go to sleep, my initial thought was to have the active device be publishing always when there are no active connections. From my tests so far, it looks like the system stops the publishing after a few minutes if it doesnt find any connections. So I was restarting the publisher every time it stops so that its in "always publishing" mode to detect whenever the other device comes out of sleep and connect to it. I observe similar behaviour with the connection as well - the connection drops after a few minutes of inactivity so I need to have some kind of heartbeat to keep the connection alive.

This makes me think if Wifi-Aware may not be the right fit for this use-case and probably using Network framework may be a better fit here.

Thanks for explaining more about the context.

The 12 hour usage I mentioned is sporadic where one of the devices

Are these both Apple devices?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Are these both Apple devices?

Yes, That is correct.

Yeah, then old school Apple peer-to-peer Wi-Fi is an option, and I agree that you should investigate that before going further with Wi-Fi Aware.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

WifiAware Endpoint usage and impact on infrastructure Wifi
 
 
Q