I use this function to get device MAC address
public static String getMacAddress(){
try {
return loadFileAsString("/sys/class/net/eth0/address")
.toUpperCase().substring(0, 17);
} catch (IOException e) {
e.printStackTrace();
return null;
}
}
Now I need to also get mac address of router this ethernet is connected to. How can I do that?