List Access Points (AP) in a different way

Post Reply
nbk
Junior Member
Posts: 5
Joined: Wed Apr 06, 2011 1:00 pm

List Access Points (AP) in a different way

Post by nbk » Wed Apr 06, 2011 1:04 pm

Hi there,
I hope this is the right forum to post this.

I was looking for a way to find the signal strength, the mac addresses from the different APs, etc, as you tool does.
However, I have seen that you use the Vista command 'netsh wlan show networks mode=bssid' to get wireless information, as stated in the website.

I was looking for another method, since I would like a quicker way to get directly from the system, and since you have programmed this tool, you may be the right person to ask for this ;)

Do you know how could I do this otherwise?
I don't mind whether to do this in C++, C, Java..., but I would like a more programming method rather than metaprogramming.

I hope you can help me ;)

Hopefully, if I find out how to do this I could share the tool I am intending to do as opensource as you do ;)

Best regards,
NBK.

User avatar
ACalcutt
Vistumbler / TechIdiots Admin
Vistumbler / TechIdiots Admin
Posts: 1162
Joined: Sun Oct 21, 2007 6:50 pm
Location: Rutland, MA
Contact:

Re: List Access Points (AP) in a different way

Post by ACalcutt » Wed Apr 06, 2011 10:28 pm

Vistumbler also has the option to use native wifi (available in the options menu), unfortunately it does not give all the information needed (mainly mac address and channel). Native wifi is provided by this Autoit UDF( http://www.autoitscript.com/forum/topic ... functions/ ) which uses the microsoft wlanapi.dll available after XP SP3". I've tried to add the missing mac address and channel information based on the information online, but I was never able to figure it out.

Vistumbler is written in AutoIt which is not the best language for this type of tool, but what I know at the moment. Autoit is more a scripting/automation language, but it has great documentation, great community, and many useful UDFs that do all sorts of things. I would eventually like to move to a better language, but I first need to learn a new one. I have considered learning C# since it would also help in my job (we have many internal apps that use some form of .NET)

I am always looking to work with the community to improve vistumbler. If you have any ways you think the code can be improved defiantly let me know :-). I would love to have full native wifi support.


For other languages you could look at InSSIDer as a base, the are also open source and use C#

nbk
Junior Member
Posts: 5
Joined: Wed Apr 06, 2011 1:00 pm

Re: List Access Points (AP) in a different way

Post by nbk » Thu Apr 07, 2011 3:43 am

Hi ACalcutt.

Actually, after looking a while a found "inSSIDer 2.0", written in C# which does quite of the same.
The make calls to WMI, I guess.
Basically, what they do is this:
us. generation-nt. com / msndis-80211-bssidlistscan-using-wmi-c-help-24662242.html (it says Your post looks too spamy for a new user, please remove off-site URLs. , so I add spaces to the URL).

It helped me quite a lot.
I wanted to do it in Java, but I gave up and ended up adapting to C# (by now), maybe I will do a port to java in a near future.

Thank you for the information!

User avatar
ACalcutt
Vistumbler / TechIdiots Admin
Vistumbler / TechIdiots Admin
Posts: 1162
Joined: Sun Oct 21, 2007 6:50 pm
Location: Rutland, MA
Contact:

Re: List Access Points (AP) in a different way

Post by ACalcutt » Sat Apr 09, 2011 10:53 am

As far as I am aware the wmi object "MSNDis_80211_BSSIList" is no longer available in vista and 7. I've tested a few example scripts and don't seem to get any information back. I can see a bunch of other people having this issue (like this http://stackoverflow.com/questions/2217 ... xp-to-win7 )

nbk
Junior Member
Posts: 5
Joined: Wed Apr 06, 2011 1:00 pm

Re: List Access Points (AP) in a different way

Post by nbk » Sat Apr 09, 2011 4:45 pm

Yes, you are right.
They managed in a different way for newer system, they use the Native Wifi API (msdn . microsoft . com/en-us/library/ms705969.aspx (again the spaces because of the spam filter)).

User avatar
ACalcutt
Vistumbler / TechIdiots Admin
Vistumbler / TechIdiots Admin
Posts: 1162
Joined: Sun Oct 21, 2007 6:50 pm
Location: Rutland, MA
Contact:

Re: List Access Points (AP) in a different way

Post by ACalcutt » Sat Apr 09, 2011 7:03 pm

That API is what is what the Native Wifi UDF I currently use uses. I just haven't been able to figure out how to get the mac addresss out of it. I have seen examples of getting the mac for access points you have connected to (ones that have a wireless profile), but not in the listing of access points. I know it must be possible, but i am not familiar with the dlls calls enough to take the C# examples and make something that works with AutoIT

nbk
Junior Member
Posts: 5
Joined: Wed Apr 06, 2011 1:00 pm

Re: List Access Points (AP) in a different way

Post by nbk » Sun Apr 10, 2011 5:38 am

Actually they use another library to do that. It is ManagedWifi (Apache licence).

You can find it here: managedwifi . codeplex . com (again spaces for the spamy filter).

nbk
Junior Member
Posts: 5
Joined: Wed Apr 06, 2011 1:00 pm

Re: List Access Points (AP) in a different way

Post by nbk » Sun Apr 10, 2011 5:38 am

I hope this can help you ;)

Post Reply