I'm using Android Studio trying to get the gateway's MAC using the getBSSID method. However, it never shows it correctly. My gateway is xx:xx:xx:xx:xx:f0, but this method returns xx:xx:xx:xx:xx:f2. I tried with another router (xx:xx:xx:xx:xx:xb), and I got it wrong too (xx:xx:xx:xx:xx:xc).
WifiManager wifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE);
WifiInfo wifiInfo = wifiManager.getConnectionInfo();
return wifiInfo.getBSSID();
Why is that? Am I doing something wrong?