Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions plugin/gnome/NetworkManagerGnomeProxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -916,8 +916,17 @@ namespace WPEFramework
}
else if(ssid.ssid.size() <= 32)
{
if(wifi->wifiConnect(ssid))
rc = Core::ERROR_NONE;
if(ssid.passphrase.empty() && (ssid.security == Exchange::INetworkManager::WIFI_SECURITY_NONE))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If WIFIConnect() is called for the first time but to connect to Open SSID (un-secure SSID) this API will fail as there is nothing to activate.

So, first we have to check whether the given SSID is in active connection list and then call for activate.

{
NMLOG_INFO("Trying to autoconnect to SSID: %s", ssid.ssid.c_str());
if(wifi->activateKnownConnection(nmUtils::wlanIface(), ssid.ssid))
rc = Core::ERROR_NONE;
}
else
{
if(wifi->wifiConnect(ssid))
rc = Core::ERROR_NONE;
}
}
else
NMLOG_WARNING("SSID is invalid");
Expand Down