查找Wifi路由器范围内的设备的MAC地址 [英] Find MAC Addresses of devices in range of Wifi router

查看:109
本文介绍了查找Wifi路由器范围内的设备的MAC地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在研究一个树莓派项目,该项目需要wifi加密狗(Realtek RTL8188CUS)来获取附近未与其连接的设备的MAC地址.我最初曾想通过tcpdump进行此操作,但这些日志似乎只显示连接到wifi网络的设备的信息.因此,我想找出的是:如何接收网络范围内但未连接的日志或MAC地址列表.

I'm currently working on a raspberry pi project that would require the wifi dongle (Realtek RTL8188CUS) to obtain the MAC addresses of nearby devices that have not connected to it. I had originally thought of doing this through tcpdump but those logs only seem to display the info of devices connected to the wifi network. So what I'm trying to figure out is: how to receive a log or list of MAC addresses within range of the network but are not connected to it.

推荐答案

我想您需要wifi监视器功能.您可以在此处中找到适配器是否提供此功能.据我所知,我确实使用了相同的适配器,但在使用这些适配器设置raspi到raspi adhoc连接时遇到了问题-请参阅此处.移到edimax EW-7711UAN(RT2870/RT3070-rt2800usb)时,它的工作原理就像魅力一样.

I guess you need the wifi monitor feature. You can find out if your adapter provides this capability here. As far as I can tell, I did use the same adapters and had problems setting up a raspi to raspi adhoc connection with these adapters - see here. While moving over to edimax EW-7711UAN (RT2870/RT3070 - rt2800usb) turned out to work like charm.

据我所知,cfg80211,mac80211,nl80211最初不支持rtl8188cus,因此您可能必须自己编译驱动程序,才能将某些无线功能称为"iw".在眼前."iw"标志为您提供了对无线配置和监视模式的简单访问,请参见此处.您可以通过"iw"网络访问几种无线模式.在此处进行了描述.

As I understood the rtl8188cus are not initially supported by cfg80211, mac80211, nl80211 and thus you might have to compile the drivers yourself to have some wireless features as "iw" at hand. The "iw" provides you pretty simple access to wireless configuration and also monitor mode, see here. Several wireless modes you can access by "iw" are described here.

显示器(MON)模式

监控模式是仅被动模式,不传输任何帧.所有传入的数据包都将完全未经过滤地移交给主机.此模式对于查看网络上的情况很有用.

Monitor (MON) mode

Monitor mode is a passive-only mode, no frames are transmitted. All incoming packets are handed over to the host computer completely unfiltered. This mode is useful to see what's going on on the network.

使用mac80211,除了常规设备外,还可以使网络设备处于监视模式,这对于在使用网络时观察网络很有用.但是,并非所有硬件都完全支持此功能,因为并非所有硬件都可以配置为在其他操作模式之一中显示所有数据包.监控器模式界面始终以尽力而为"的方式工作.基础.

With mac80211, it is possible to have a network device in monitor mode in addition to a regular device, this is useful to observe the network whilst using it. However, not all hardware fully supports this as not all hardware can be configured to show all packets while in one of the other operating modes. Monitor mode interfaces always work on a "best effort" basis.

摘自 http://wireless.kernel.org/en/用户/文档/模式

因此,使用合适的硬件是一个很好的起点.

So using appropriate hardware is a good point to start at.

这篇关于查找Wifi路由器范围内的设备的MAC地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆