Allow App to connect to wifi access point

My company is developing a wifi enabled device which uses the ESP8266 module.


This module can only connect to 2.4Ghz wifi access points.


The manufacturer of the module supplies and API which can be used to send an ssid and network key to the module in order to allow it to connect to the wifi network, however for this to work the iPhone must be connected to a 2.4Ghz access point.


The problem we have is that dual band routers often present their 5Ghz and 2.4Ghz access points with the same ssid.


So we would like to write an App which can see all the available wifi access points and force the iPhone to connect to the 2.4GHz access point.


We have been told that this is not possible using the public API but that there may be an approval process we could go through to gain access to a lower level API which would be able to control the wifi settings on an iPhone?


Is this correct?


Is what we are trying to do possible?

Accepted Reply

iOS does not have a general purpose Wi-Fi scanning API. You can read about the Wi-Fi APIs it does have in QA1942 iOS Wi-Fi Management APIs.

You wrote:

We have been told that this is not possible using the public API

Correct.

but that there may be an approval process we could go through to gain access to a lower level API which would be able to control the wifi settings on an iPhone?

As far as I know this is not true. I’m not sure where this is coming from but I have two suspicions:

  • Back in the day it was possible to access various private Wi-Fi management APIs. Since then the iOS sandbox has been enhanced to protect against this.

  • Some of the APIs mentioned in QA1942 require special arrangements with Apple:

    • NEHotSpotHelper is an API for hotspot helper apps, and thus is not suited for accessory developers like yourself. This is restricted in two ways. Firstly, access to the API is gated by a special entitlement that’s only granted to hotspot helper apps. Secondly, the API itself was specifically designed for its intended purpose and has restrictions that make it unsuitable for accessory management.

    • Wireless Accessory Configuration (WAC) is probably appropriate for your user-level task, but it requires that your device be built under the aegis of MFi.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Replies

thank you

I'm sorry I don't understand, are you thanking me for my question or have I broken Forum equitique by not saying "thank you" at the end of my question?


If I have been rude I apologise unreservedly and hope very much that someone will be able to help me with my questions.


Thank you.

iOS does not have a general purpose Wi-Fi scanning API. You can read about the Wi-Fi APIs it does have in QA1942 iOS Wi-Fi Management APIs.

You wrote:

We have been told that this is not possible using the public API

Correct.

but that there may be an approval process we could go through to gain access to a lower level API which would be able to control the wifi settings on an iPhone?

As far as I know this is not true. I’m not sure where this is coming from but I have two suspicions:

  • Back in the day it was possible to access various private Wi-Fi management APIs. Since then the iOS sandbox has been enhanced to protect against this.

  • Some of the APIs mentioned in QA1942 require special arrangements with Apple:

    • NEHotSpotHelper is an API for hotspot helper apps, and thus is not suited for accessory developers like yourself. This is restricted in two ways. Firstly, access to the API is gated by a special entitlement that’s only granted to hotspot helper apps. Secondly, the API itself was specifically designed for its intended purpose and has restrictions that make it unsuitable for accessory management.

    • Wireless Accessory Configuration (WAC) is probably appropriate for your user-level task, but it requires that your device be built under the aegis of MFi.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Thanks!


This was exactly the clarification we required.