Is it possible to get the router brand from the Wifi spot that the user is currently using?
I would like to know if the router brand is technicolor, thomson and...
Thank you.
Is it possible to get the router brand from the Wifi spot that the user is currently using?
I would like to know if the router brand is technicolor, thomson and...
Thank you.
Add permission in manifest
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
In Code
public String getWifiName(Context context) {
WifiManager manager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE);
if (manager.isWifiEnabled()) {
WifiInfo wifiInfo = manager.getConnectionInfo();
if (wifiInfo != null) {
DetailedState state = WifiInfo.getDetailedStateOf(wifiInfo.getSupplicantState());
if (state == DetailedState.CONNECTED || state == DetailedState.OBTAINING_IPADDR) {
return wifiInfo.getSSID();
}
}
}
return null;
}
If you can get the Mac address of the router the user Is connected to, you can then use Wireshark's OUI database in order to guess the brand of the router.
You can check out the answers to this question to see how to get the current APs MAC in android.
Furthermore, the site WikiDevi has the most comprehensive wireless device DB I know of. You can get the relationship router-interface brand from the respective product page.