DHWifiClient.NET 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package DHWifiClient.NET --version 1.0.0
                    
NuGet\Install-Package DHWifiClient.NET -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DHWifiClient.NET" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DHWifiClient.NET" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="DHWifiClient.NET" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DHWifiClient.NET --version 1.0.0
                    
#r "nuget: DHWifiClient.NET, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DHWifiClient.NET@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DHWifiClient.NET&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=DHWifiClient.NET&version=1.0.0
                    
Install as a Cake Tool

DHLightWIFI (DHWifiClient.NET)

Windows Native WiFi (wlanapi.dll) client library for .NET. Scan nearby networks, connect using Open/WEP/WPA/WPA2/WPA3-Personal or WPA2-Enterprise (PEAP-MSCHAPv2 / EAP-TLS), manage saved profiles, and observe real-time connection events — all through a small, dependency-free API.

Requirements

  • Windows Vista or later (uses the Native Wifi API, wlanapi.dll)
  • Target frameworks: net46, net6.0-windows, net8.0-windows
  • Platform: x64 (the sample app targets x64; wlanapi.dll marshaling has been validated on x64 only)

Install

dotnet add package DHWifiClient.NET

Quick start

using DHWifiClient.NET;

using (var client = new DHWifiClient())
{
    var wifiInterface = client.GetInterfaces().First();

    wifiInterface.Scan();
    var networks = wifiInterface.GetAvailableNetworks();

    // Auto-detects Open/WEP/WPA/WPA2-Personal from the scan result.
    wifiInterface.Connect(networks.First(n => n.Ssid == "MyHomeWifi"), password: "MyPassword123");
}

Supported authentication methods

Method API
Open Connect(ssid)
WEP ConnectWep(ssid, wepKey, authentication, keyIndex)
WPA/WPA2-Personal (PSK) Connect(ssid, password) / Connect(ssid, password, protocol, cipher)
Saved profile reconnect ConnectSavedProfile(ssid)
WPA2-Enterprise (PEAP-MSCHAPv2) ConnectEnterprise(ssid, username, password, domain)
WPA2-Enterprise (EAP-TLS, client certificate) ConnectEnterpriseEapTls(ssid, clientCertThumbprint)
Auto-detect from scan result Connect(WifiNetwork network, string password)

WPA3-SAE and ad-hoc (IBSS) networks are intentionally not supported; the API throws NotSupportedException for these cases with an explanatory message.

Other capabilities

  • GetInterfaces() — enumerate WiFi adapters
  • GetProfiles() / DeleteProfile(name) — manage saved profiles
  • GetRadioState() / SetRadioState(bool) — query/toggle the software radio switch
  • Notification event — scan/connect/disconnect lifecycle notifications (raised on a native callback thread; marshal to the UI thread yourself before touching UI controls)

Sample application

A WinForms sample (DHWifiClientSol\sample\DHWifiClientSample) demonstrates scanning, connecting (including Enterprise credential/certificate dialogs and hidden-network entry), and viewing saved profiles.

License

MIT — see LICENSE.

Product Compatible and additional computed target framework versions.
.NET net6.0-windows7.0 is compatible.  net7.0-windows was computed.  net8.0-windows was computed.  net8.0-windows7.0 is compatible.  net9.0-windows was computed.  net10.0-windows was computed. 
.NET Framework net46 is compatible.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.6

    • No dependencies.
  • net6.0-windows7.0

    • No dependencies.
  • net8.0-windows7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 134 8/4/2026
1.0.0 115 7/30/2026