3

我正在寻找有关如何在 Mac OSX 上设计应用程序以使用附近的 WiFi 扫描设备(移动设备:android 或 ios)的信息。

CoreWLAN 似乎受到限制,因为它只能扫描 AirPorts 和无线路由器(接入点),还是我错了?

如果有一个框架/库允许我这样做,这可以与 Mac(比如 MacBookPro)的内置 WiFi 接口一起使用,还是我需要 WiFi 配件。我想开发一个用于研究的应用程序。

我注意到 Mac OSX Lion 现在提供 AirDrop,但这只是 MacOSX 独有的功能还是我们可以用于开发的功能?

相关问题: 使用 wifi 发现移动设备

4

2 回答 2

3

CoreWLAN will let you scan for beaconing APs (access points), but won't help you find unconnected STA (station) 802.11 interfaces. But this isn't a limitation of the APIs - it is the nature of 802.11. 802.11 STA interfaces don't "beacon" - only APs do.

As Tim said above, if the host / device your code is running on is a member of an 802.11 BSS (network), then you would use standard network discovery protocols above the 802.11 layer, such as Bonjour, which in Cocoa or CococaTouch is available via the NSNetService class and related classes.

What Tim said was not quite accurate though - Bonjour can find services on non-Apple systems (think printers, for instance). They just need to implement mDNS and DNS-SD properly.

于 2011-08-12T04:28:28.813 回答
0

您可以为此使用 Bonjour,但它不会接收非 Apple 设备发送的任何信号。
Bonjour 的内置NSNetService(在 Mac 和 iOS 中都可用)应该完全满足您的需求。

于 2011-08-11T14:26:42.547 回答