My application (not mobile application) needs to scan WiFi MAC addresses of mobile phones that are in my range.
For now I can only test it with m开发者_JAVA百科y laptop. So I would like to connect my wireless card in laptop with my java application so application could scan for addresses. In near future, I will connect my application with different WiFi detector.
My WiFi card is Intel(R) PRO/Wireless 3945ABG Network Connection
Stackoverflow and google only shows results for android mobile development.
What API can you recommend?
This is tricky and maybe impossible, depending on precisely what you want - feel free to view this as a list of warnings or starting points, depending on how brave you feel :)
- to obtain MAC addresses you need to capture raw packets, which isn't possible using pure Java; you'll need to use something like jNetPcap which wraps the (native) libpcap packet sniffing library
- to determine whether a MAC address is likely to belong to a mobile phone, you'll need the list of Organizationally Unique Identifiers which links the first three bytes of a MAC address with the device manufacturer; mind that the OUI list might not be sufficient, since Apple (for instance) makes phones and other devices
- to see all wireless traffic you'll need a driver that supports putting the wifi interface into monitor mode - these don't exist for all platforms/devices
- the devices may not be sending any data...
精彩评论