开发者

Detect or discover iOS devices or Android devices nearby using WiFi on Mac OSX

开发者 https://www.devze.com 2023-03-27 03:44 出处:网络
I\'m looking for info on how to design an app on Mac OSX to scan for devices (mobile: android or ios) using WiFi that are near by.

I'm looking for info on how to design an app on Mac OSX to scan for devices (mobile: android or ios) using WiFi that are near by.

CoreWLAN seems limited in that it can only scan AirPorts and Wireless routers (access points) only, or am I wrong?

If there is a framework/library allowing me to do this can this work with Mac's (say a MacBookPro) built-in WiFi interface or do I need a WiFi accessory. I want to develop an app for research.

I noticed that Mac OSX Lion now offers AirDrop, but is that just a feature unique to MacOSX or is it something we can use for development?

Related Qs: discover mobile devices usi开发者_开发技巧ng wifi


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.


You can use Bonjour for this, though it won't pick up any signals sent by non Apple devices.
Bonjour's built-in NSNetService (which is available in both Mac and iOS) should perfectly fit your needs.

0

精彩评论

暂无评论...
验证码 换一张
取 消