![]() * from the appropriate bytes of the IPv6 address. * Allocate a byte array for storing the EUI-48 MAC address, then fill it * Make sure that this is an fe80::/64 link-local address.įinal byte ipv6Bytes = ipv6.getAddress() Private static byte getMacAddressFromIpv6(final Inet6Address ipv6) * The EUI-48 MAC address as a byte array, null on error. * the Wikipedia article "IPv6 address" at * See the note about "local addresses" fe80::/64 and the section about "Modified EUI-64" in * Gets an EUI-48 MAC address from an IPv6 link-local address. See the Wikipedia page IPv6 Address, particularly the note about "local addresses" fe80::/64 and the section about "Modified EUI-64". Getting the WiFi IPv6 address only requires. 4 Touch Status and then scroll down to read your device's Wi-Fi MAC address. 3 Touch the More tab in the top-right corner and then touch About device. (You may need to swipe left or right first to locate it). E.g., the IPv6 address "fe80::1034:56ff:fe78:9abc" corresponds to the MAC address "12-34-56-78-9a-bc". Where do I find the WiFi MAC address in my Samsung Galaxy Note 10.1 or 8.0 1 From the Home screen touch Apps. You can get the MAC address from the IPv6 local address. Hopefully this code will still work in later Android versions.ĮDIT: Also in Android 6 release this works Somehow I heared that reading the File from "/sys/class/net/" + networkInterfaceName + "/address" will not work since Android N will be released and also there can be differences between the different manufacturers like Samsung etc. You can get the WiFi MACAddress with (Android M Preview 2): public static String getWifiMacAddress() // for now eat exceptions In Android M the MACAddress will be "unreadable" for WiFi and Bluetooth.
0 Comments
Leave a Reply. |