Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I find the MAC address of my Access point in Android?

Tags:

Can my Android app find the MAC address of the Wifi access point it is connected to?

The docs for android.net.wifi.WifiInfo getMacAddress() don't provide any details.

See http://developer.android.com/reference/android/net/wifi/WifiInfo.html#getMacAddress().

I'm assuming this is the Mac address of my phone. Can I find the Mac address of the access point?

like image 313
Michael Levy Avatar asked May 19 '11 19:05

Michael Levy


People also ask

Does a wireless access point have a MAC address?

The MAC address of your access point is listed on the stickerlocated on the bottom of the access point. It is listed below theserial number. The LAN/Wireless and WAN MAC address can be obtained by logginginto the web-based configuration of the router.

What is a Wi-Fi MAC address Android?

What is a MAC address? For those that might not know, a MAC (Media Access Control) address is a unique identifier, assigned to a device's network interface controller. This address can be used to track a device on Wi-Fi networks.


2 Answers

getBSSID() of WifiInfo class will return MAC address of remote access point.

BSSID explained here.

like image 180
ahmet alp balkan Avatar answered Sep 22 '22 15:09

ahmet alp balkan


The following method will return the MAC address of the access point, null if there is no network currently connected.

public String getMacId() {      WifiManager wifiManager = (WifiManager) getSystemService(Context.WIFI_SERVICE);     WifiInfo wifiInfo = wifiManager.getConnectionInfo();     return wifiInfo.getBSSID(); } 
like image 20
Tamal Samui Avatar answered Sep 19 '22 15:09

Tamal Samui