简体   繁体   English

如何在Android中扫描局域网中其他设备的MAC地址?

[英]How to scan MAC address of other devices in a local network in Android?

有没有一种清晰的方法并且可以轻松实现以扫描本地网络以获取连接到我在android中的WiFi网络的设备的MAC地址?

I don't believe that Android will allow you access to raw sockets in order to send ARP requests, so probably the easiest way is to sand some traffic (this can be any kind of traffic) to all IP addresses in the network forcing the phone to get the MAC addresses for all IPs via ARP. 我不相信Android会允许您访问原始套接字以发送ARP请求,因此最简单的方法可能是对网络中的所有IP地址进行一些流量(这可以是任何流量)的流量通过ARP获取所有IP的MAC地址。 Then you can read the ARP cache ( /proc/net/arp ) and get the IP to MAC mappings. 然后,您可以读取ARP缓存( /proc/net/arp )并获取IP到MAC的映射。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在Android上获取本地网络中所有设备的IP地址和名称 - How to get IP address and names of all devices in local network on Android 如何在Android中以编程方式在网络上查找其他WiFi设备的IP地址 - How to find IP address of OTHER WiFi Devices on network programmatically in android 如何获取java中local.network上机器的MAC地址 - How to get the MAC address of machine on local network in java 如何在android中获取连接到同一网络的设备的mac地址? - How to get mac addresses of devices connected to the same network in android? 如何继续使用SSDP在Android的本地网络上搜索设备? - How to keep using SSDP to search for devices on local network on Android? 找到连接到同一Wifi网络的所有设备的MAC地址 - Find the MAC address of all devices connected to the same Wifi network 如何将套接字绑定到Android上的本地wifi网络地址? - How to bind a socket to local wifi network address on Android? 如何在android中准确扫描所有设备连接到wifi的IP和Mac地址? - How to scan IP and Mac address of all Device Connected to wifi in android accurately? 如何以编程方式通过Wifi获取连接到交换机网络的其他设备的IP地址? - How to get Ip address of other devices connected to switch network via Wifi programmatically? 安卓低功耗。 是否可以使用正则表达式作为过滤器来扫描 Mac 地址? - Android BLE. Is it possible to use a regex as a filter to scan for Mac Address?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM