How to scan the wireless devices which exist on the network

You could use the Managed Wifi API. It's just a wrapper for the Native Wifi Api, which is available to Windows XP and later versions.

This code should show the available networks:

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 );
}

if you are ready to invest money then u can use WiFi-Manager/Advanced WiFi-Manager

WiFi-Manager is a developer tool that allows you to manage WiFi connections and settings in Windows XP SP2 and Windows Vista using one set of API functions, although these versions of Windows use absolutely different APIs for wireless network management. Also, WiFi-Manager provides a COM interface for all API functions so you can simply control WiFi settings from VB or such .NET languages as VB.NET or C#.

WiFi-Manager contains functions for enumerating WiFi adapters, enumerating available networks and getting their settings, functions for connecting and disconnecting to networks, functions for working with wireless networks profiles, etc.

Advanced WiFi-Manager is a next-generation tool, it supports all features WiFi-Manager has but also can use NDIS to manage WiFi adapters and works in Windows 2000/2003/XP/Vista/Windows7 and has no dependencies on Service Packs or hotfixes installed!

I hope this is useful

Tags:

Windows

C#

.Net