[Request]: Get WiFi frequency info: 2.4 Ghz or 5 Ghz?
Plugin
network_info_plus
Use case
We're working on provisioning ESP devices, and it is crucial that these devices are only compatible with 2.4 GHz networks. We have to prevent the user from attempting to provision such devices on 5 GHz networks because it will fail.
Currently, I couldn't find any official way in Flutter to check if the device is connected to a 2.4 GHz or 5 GHz network.
Proposal
This feature could be added to the network_info_plus package.
For example:
final frequency = await NetworkInfo().getWifiFrequency();
print('WiFi frequency: $frequency);
I'm working on this. @dJani97
I'm working on this. @dJani97
@Umar1312 any update on this? Can i somehow make sure 2 users are in the same wifi, when the wifi has the same ssid name for 5ghz and 2.4ghz, if i compare the bssids and remove the last 2 chars? 😅
I have a wifi like that and only the last 2 characters are different, do you know if this is normally the case? This is very hard to Google..
I got this feature working on android, but couldn't get it to work on iOS owing to some elevated permission it requires to get those details. Have not been able to get it working on iOS, and I don't think my PR will be approved having only Android Compatibility.
@bettysteger Also I don't think that's a reliable way to match networks-matching BSSIDs. A lot of routers allow having completely separate names for 2.4 and 5 Ghz connections
Understandable. Since this feature is blocked because of platform restrictions, would it make sense to design the API of the package in such a way that it accommodates both platforms? For example, the network info class could have a field frequency of type enum WifiNetworkFrequency with three options: ghz24, ghz5, unknown, and we return unknown by default on iOS.
Wdyt?
@jeroenbloom I'll try doing the above this weekend.
any update?