Hey my android connect commuicates with a special device.
The remote device is connected to my home network as well as the android device. They communicate via a socket. How can I find out the mac adress of that device now?
Thanks, Best regards
Hey my android connect commuicates with a special device.
The remote device is connected to my home network as well as the android device. They communicate via a socket. How can I find out the mac adress of that device now?
Thanks, Best regards
The Address Resolution Protocol (ARP) is what maps ethernet addresses (the MAC address) to IP addresses (the 192.168.2.115 one). You can examine your devices arp table using the arp
command. For instance:
% adb shell arp -a
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
fox.home.network (192.168.0.1) at 00:0x:yz:00:01:00 [ether] on eth0
You can also use snmp to examine the routing tables on routers on your network to fetch arp/ip maps quite often.
A socket does not provide access to MAC addresses. You need the device's IP address on the network in order to communicate with it.