Solved

list of available wireless networks

Posted on 2009-07-13
4
684 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 87

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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article will show, step by step, how to integrate R code into a R Sweave document
In the modern office, employees tend to move around the workplace a lot more freely. Conferences, collaborative groups, flexible seating and working from home require a new level of mobility. Technology has not only changed the behavior and the expe…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

762 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now