Current Wifi Check for 2.4Ghz

Hi, I am using CNCopyCurrentNetworkInfo to get the SSID of the current wifi connection. I am wondering if there is a way to tell whether this WiFi is 2.4 or 5.0Ghz? Is there another function I could call to check this?


Thank you

Accepted Reply

I am using

CNCopyCurrentNetworkInfo
to get the SSID of the current wifi connection.

Be aware that

CNCopyCurrentNetworkInfo
has changed in iOS 13 beta. WWDC 2019 Session 708 Designing for Privacy has some general background on this change and the docs have been updated with the details.

I am wondering if there is a way to tell whether this WiFi is 2.4 or 5.0Ghz?

No. iOS has always placed strict limits on what apps can do with Wi-Fi, and there’s never been a supported API for getting low-level Wi-Fi information like this.

The idea is we have an accessory that needs to connect to the user's home wifi network.

My recommendation here is that you support Wireless Accessory Configuration (WAC) in your accessory. This post has links to more info on that technology.

Share and Enjoy

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

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

Replies

You'd need to talk to the device(s), first, and even then you risk assumptions - For example, 802.11ac devices can't connect to a Wi-Fi router in 802.11n-only mode. In other words, I don't think there is a lever you can pull via code to know for certain. Just because a device is capable, doesn't mean a specific configuration is in use/available. Same as if a network name includes 5.0 in it's name...doesn't mean you can count on that being true.


Perhaps if you explained your end goal for wanting this ability, someone could offer suggestions.

If anyone has another way to check if the current wifi network is 2.4g or 5.0g, I am still looking for a solution. Although I can check the name of the wifi network for the number "5" this is not 100% reliable so I would like to have some alternatives. Thanks!

I am using

CNCopyCurrentNetworkInfo
to get the SSID of the current wifi connection.

Be aware that

CNCopyCurrentNetworkInfo
has changed in iOS 13 beta. WWDC 2019 Session 708 Designing for Privacy has some general background on this change and the docs have been updated with the details.

I am wondering if there is a way to tell whether this WiFi is 2.4 or 5.0Ghz?

No. iOS has always placed strict limits on what apps can do with Wi-Fi, and there’s never been a supported API for getting low-level Wi-Fi information like this.

The idea is we have an accessory that needs to connect to the user's home wifi network.

My recommendation here is that you support Wireless Accessory Configuration (WAC) in your accessory. This post has links to more info on that technology.

Share and Enjoy

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

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

Thank you, I appreciate your help.