Skip to content

Instantly share code, notes, and snippets.

@hatsunea
Last active June 30, 2022 22:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hatsunea/78bab41fe4307759585066d7e9e1317d to your computer and use it in GitHub Desktop.
Save hatsunea/78bab41fe4307759585066d7e9e1317d to your computer and use it in GitHub Desktop.
// WiFi接続
CancellationTokenSource cs = new(60000);
while (!WifiNetworkHelper.ConnectDhcp(Ssid, Password, requiresDateTime: true, token: cs.Token))
{
Debug.WriteLine($"Can't connect to the network, error: {WifiNetworkHelper.Status}");
if (WifiNetworkHelper.HelperException != null)
{
Debug.WriteLine($"ex: {WifiNetworkHelper.HelperException}");
}
Thread.Sleep(500);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment