views:

72

answers:

1

Hi,

I'd like to find out a way to enumerate all available wifi networks using Java 6.0 and any third-party API.

Unfortunately, I'm not able to find a solution to this problem, all I got is a library that I can't use because I don't have any example.

I'll be very pleased if someone could help me.

The target platform is Win XP/7.

Edit: the library I found is named jwlanscan

Rob

A: 

I am not sure that jwlanscan is intended as a library. I downloaded it and it seems that it contains a gui application that scans for wireless networks and displays information about them. There is also a utility class that scans for information and writes the information to the console. I guess you could use that and parse the information, but I don't think there is a public API intended for the purpose you are looking for.

DaveJohnston
Ok. I'm quite surprised, because I knew that some librairies exist for android. I'm still looking forward :)
Rob
If you open up the jar file and decompile the class files you can see how they do it. It is basically done using JNI. There are two Native methods `getNetworkAdapterInfo` and `getWirelessApInfo`. So you could just use the dll that is included and call the native methods. Not sure of the licence implications though.
DaveJohnston
Nice ! Thank you very much, my goal isn't to set up a product that has to be selled, but is mainly self educative. So u help me in great way :)
Rob