DHWifiClient.NET
1.0.0
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
<PackageReference Include="DHWifiClient.NET" Version="1.0.0" />
<PackageVersion Include="DHWifiClient.NET" Version="1.0.0" />
<PackageReference Include="DHWifiClient.NET" />
paket add DHWifiClient.NET --version 1.0.0
#r "nuget: DHWifiClient.NET, 1.0.0"
#:package DHWifiClient.NET@1.0.0
#addin nuget:?package=DHWifiClient.NET&version=1.0.0
#tool nuget:?package=DHWifiClient.NET&version=1.0.0
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.dllmarshaling 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 adaptersGetProfiles()/DeleteProfile(name)— manage saved profilesGetRadioState()/SetRadioState(bool)— query/toggle the software radio switchNotificationevent — 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 | Versions 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. |
-
.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.