Reputation: 173
How to find wifi network interface from the returned result of
NetworkInterface.getNetworkInterfaces();
Upvotes: 0
Views: 648
Reputation: 1
Solution for windows 10 (and probably other platforms):
NetworkInterface.getName() returns a name of pattern <interface type>[<index>], where interface type is one of "lo", "wlan", "eth", "ppp", "net". So your interface's name needs to match the regular expression "wlan\d+".
For searching a wifi adapter among the enumeration NetworkInterface.getNetworkInterfaces() you may also filter by NetworkInterface.isUp(), NetworkInterface.isLoopback() .
Upvotes: 0
Reputation: 55334
That information cannot be obtained using Java. You can only retrieve the interface's name and address(es).
Upvotes: 1