diff options
author | Gatis Paeglis <gatis.paeglis@theqtcompany.com> | 2015-02-02 10:51:22 +0100 |
---|---|---|
committer | Gatis Paeglis <gatis.paeglis@theqtcompany.com> | 2015-02-09 13:27:14 +0200 |
commit | cd677b247532305ca67b1459bafe74a19cead7ad (patch) | |
tree | 02a9771122fe9fa7326256fb2a44d7c15cec9dba /src/wifi/qwifimanager.cpp | |
parent | a6176aedcfe6893c24f2f2975a6874273e9df15e (diff) |
Add support for hidden SSIDs
Wifi access points may be configured not to
broadcast its SSID, connecting to such networks
requires a SSID-specific probe request. Add new
property to WifiConfiguration for describing this
type of networks.
Change-Id: I068ac53936a860e3752e31b8151b87ba4308c510
Task-number: QTEE-816
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src/wifi/qwifimanager.cpp')
-rw-r--r-- | src/wifi/qwifimanager.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/wifi/qwifimanager.cpp b/src/wifi/qwifimanager.cpp index 319c9d9..d60ec13 100644 --- a/src/wifi/qwifimanager.cpp +++ b/src/wifi/qwifimanager.cpp @@ -506,7 +506,11 @@ bool QWifiManager::connect(QWifiConfiguration *config) QString key_mgmt; QString protocol = config->protocol().toUpper(); QString psk = config->passphrase(); + + // --------------------- configure network ------------------------------ // ref: http://w1.fi/cgit/hostap/plain/wpa_supplicant/wpa_supplicant.conf + // ref: https://www.freebsd.org/cgi/man.cgi?wpa_supplicant.conf + // ---------------------------------------------------------------------- if (protocol.isEmpty() || protocol.contains(QStringLiteral("WPA"))) { // ### todo - password length has limits (see IEEE 802.11), we need to check // for those limits here. Supplicant gives only a meaningless "fail" message. @@ -520,6 +524,10 @@ bool QWifiManager::connect(QWifiConfiguration *config) // open network key_mgmt = QLatin1String("NONE"); } + + if (config->isSsidHidden()) + ok = ok && d->checkedCall(setNetworkCommand + QLatin1String(" scan_ssid 1")); + ok = ok && d->checkedCall(setNetworkCommand + QLatin1String(" key_mgmt ") + key_mgmt); if (!ok) { if (!networkKnown) |