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

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

问题描述

我目前正在开发一个 raspberry pi 项目,该项目需要 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 临时连接时遇到了问题 - 请参阅 此处.在转移到 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.

据我所知,rtl8188cus 最初不受 cfg80211、mac80211、nl80211 的支持,因此您可能必须自己编译驱动程序才能拥有一些无线功能,例如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.

Monitor 模式是一种被动模式,不传输任何帧.所有传入的数据包都完全未经过滤地移交给主机.此模式有助于查看网络上发生的情况.

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天全站免登陆