Solved

list of available wireless networks

Posted on 2009-07-13
4
698 Views
Last Modified: 2013-11-09
I'm trying to create list of available wireless networks
I need to get their names
I use Windows XP, C# and DDK, so I have access to System.Management objects
I just started this project
0
Comment
Question by:C_sharp_beaver
4 Comments
 
LVL 88

Assisted Solution

by:rindi
rindi earned 20 total points
ID: 24847786
Use netstumbler to scan your area for wireless senders:

http://www.netstumbler.com/
0
 
LVL 20

Accepted Solution

by:
alainbryden earned 380 total points
ID: 24849208
The Managed Wifi API wrapper for the Native Wifi API provided with Windows XP for C# can do this:
http://www.codeplex.com/managedwifi

See the attached code for something that should get a list of available networks.

--
Alain
WlanClient client = new WlanClient();
foreach ( WlanClient.WlanInterface wlanIface in client.Interfaces )
{
    // Lists all available networks
    Wlan.WlanAvailableNetwork[] networks = wlanIface.GetAvailableNetworkList( 0 );
    foreach ( Wlan.WlanAvailableNetwork network in networks )
    {                     
        Console.WriteLine( "Found network with SSID {0}.", GetStringForSSID(network.dot11Ssid));
    }
}
 
static string GetStringForSSID(Wlan.Dot11Ssid ssid)
{
    return Encoding.ASCII.GetString( ssid.SSID, 0, (int) ssid.SSIDLength );
}

Open in new window

0
 
LVL 44

Assisted Solution

by:Darr247
Darr247 earned 100 total points
ID: 24854859
If you want source to give you ideas of different ways to do things, check out sourceforge.net e.g.
http://sourceforge.net/search/?type_of_search=soft&words=netstumbler&search=Search

Be sure to read and understand the licensing included with a specific project before you just copy & paste routines to your own project, of course. Here's a simplified explanation of (some of) the different license levels - http://www.linux.com/news/biz-os/legal/26690-licensing-101-for-open-source-projects-choosing-an-open-source-license
0
 

Author Closing Comment

by:C_sharp_beaver
ID: 31603032
The best solution was from alainbryden as question was about C#, .NET and XP development
Netstumbler is perfect product but no access to source code and output also should pass some corrections until uploaded for example into MapPoint. Even if I use it a lot, some data that I can see on screen not found in logs.
Many perfect ideas that arrive from Linux development require huge modification for Windows
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
This is about my first experience with programming Arduino.
An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question