/// <summary> /// Attempt to connect to the access point by creating a new profile. /// </summary> public void Connect(AuthRequest request, bool overwriteProfile = false) { // No point to continue with the connect if the password is not valid if overwrite is true or profile is missing. if (!request.IsPasswordValid && (!HasProfile || overwriteProfile)) { return; } // If we should create or overwrite the profile, do so. if (!HasProfile || overwriteProfile) { if (HasProfile) { _interface.DeleteProfile(Name); } request.Process(); } // TODO: Auth algorithm: IEEE80211_Open + Cipher algorithm: None throws an error. // Probably due to connectionmode profile + no profile exist, cant figure out how to solve it though. _interface.Connect(WlanConnectionMode.Profile, _network.dot11BssType, Name); }