Solved

list of available wireless networks

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

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Question has a verified solution.

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

Suggested Solutions

If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
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 …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

911 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

20 Experts available now in Live!

Get 1:1 Help Now