Latest

.NET Framework does not have API that provides detailed information on Wi-Fi networks such as SSIDs. Instead, Native WiFi is available for C++ and it can be used in C# by P/Invoke. There is a managed implementation of this API, Managed Wifi API. However, the development had already ended and its sample code does not expect SSIDs in Unicode string. So I wrote my own implementation focusing on getting SSIDs.

According to IEEE 802.11 specifications, a SSID is Octet string (byte array) of 0-32 length and it can be UTF-8 string. So, in this structure, ToSsidBytes method returns SSID in byte array and ToSsidString method returns SSID in UTF-8 string.