-2

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.

Rúben Dias
  • 520
  • 1
  • 7
  • 16

2 Answers2

0

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;
 }
sasikumar
  • 12,540
  • 3
  • 28
  • 48
  • With that code I can get the wifi name, you are right, but i want to get the router brand, like I said in my question... But thanks btw – Rúben Dias Sep 19 '15 at 10:43
0

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.

Community
  • 1
  • 1