문제

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 using 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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top