Reputation: 8270
How can I capture the MAC address (hardware address) of any access point in Java?
Upvotes: 0
Views: 1137
Reputation: 49547
If you have multiple access point and you know ip-addresses
of these point than you can do
InetAddress add = InetAddress.getByName("enter ip here");
NetworkInterface ni = NetworkInterface.getByInetAddress(add);
Take a look at NetworkInterface.getHardwareAddress() method of NetworkInterface class in java. It returns
Returns the hardware address (usually MAC) of the interface if it has one and if it can be accessed given the current privileges.
Upvotes: 2