summaryrefslogtreecommitdiffstats
path: root/src/imports/wifi/pluginmain.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Merge Boot2Qt Wifi module into Network Settings Plugin.Teemu Holappa2016-02-081-363/+0
| | | | | | | Added wpasupplicant as alternative backend for the network settings. Change-Id: Ic05b3e87def2c9a143c30e4045a36db294ce8719 Reviewed-by: Risto Avila <risto.avila@theqtcompany.com>
* Fix signal calculation for WEXT-based driversGatis Paeglis2015-04-161-7/+7
| | | | | | | | | | | | | | | | | | | | | This patch introduces a behavior change. Previously the 'SignalStrength' role was interpreted as dBm. This was working fine for nl80211 based drivers, for WEXT-based drivers it contained garbage values. Now the 'SignalStrength' role will always be interpreted as percentage. The wpa_supplicant passes back only the 'level' of the scanned BSS, which with nl80211-based driver is almost always dBm (val < 0). WEXT-based driver has its own interpretation of 'level' - it can contain dBm, percentage [0-100] (and some other values for historical reasons, but these are converted by the wpa_supplicant to dBm). This is what I have concluded from looking at NetworkManager and wpa_supplicant sources and git history. Even the official GUI tool wpa_gui for the wpa_supplicant is out-of-date and can not be used as a referance. Change-Id: I70d15e26e0a1700ad0f7d19d23cbade2d3d46054 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@theqtcompany.com>
* Add support for hidden SSIDsGatis Paeglis2015-02-091-0/+9
| | | | | | | | | | | | 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>
* Wifi - c++/qml getting started guide and wifi doc updateGatis Paeglis2014-12-051-0/+298
| | | | | | | | | | | | c++ getting started guide qml getting started guide documenting qml elements documenting c++ classes Task-number: QTEE-810 Change-Id: I669d11c65e5359fc9ec863b03b8b56ce2ef1151b Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@theqtcompany.com> Reviewed-by: Kalle Viironen <kalle.viironen@theqtcompany.com>
* [Wifi] graduate from Qt.labs.wifi 0.1 to B2Qt.Wifi 1.0Gatis Paeglis2014-12-021-10/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Make wifi library available from c++ 1) included with "#include <B2QtWifi>", available classes are: QWifiDevice, QWifiManager, QWifiConfiguration - Re-design of API: 1) connectedSSID -> currentSSID get current network from this property instead of networks state change events 2) networkStateChanaged(QWifiNetwork *) -> networkStateChanged(NetworkState) Don't expose QWifiNetwork objects to library users, use data model roles instead, no need to pollute API with "read-only" class. The flaws of exposing QWifiNetwork become apparent when looking at C++ API. 3) New BackendState enum for backend state changes events, backendStateChanged(BackendState) Initializing backend can be lengthy operation and can block GUI thread, same is true for DHCP requests, now these operations are moved into a separate thread and backend state change events are delivered asynchronously. 4) Make WifiManager a Singleton, we don't want several instances starting and stopping system processes and it makes global state handling simpler. 5) Rename Interface -> WifiDevice 6!) Introducing QWifiConfiguration. This abstraction allows for easy way to add new features, whatever we choose to support from: http://w1.fi/cgit/hostap/plain/wpa_supplicant/wpa_supplicant.conf The idea for it is to be a Qt-style wrapper for "network {}" configurations from wpa_supplicant.conf. Also this makes life simpler for developers if they know what network they will be using, they can omit scanning, listing, selecting parts and do something like this instead: WifiConfiguration { id: config ssid: "network name" passphrase: "12345678" } if (!WifiManager.connect(config)) print("failed to connect: " + WifiManager.lastError) - Optimizations: 1) Async. event delivery. 2) eLinux: Don't use "ifup", it is slow because it starts dhcp request even before any network has been configured. Use start-stop-daemon and ifconfig directly. - Bug fixes (many), but most importantly: 1) Get backend state properly when WifiManager is created. - Public header cleanup - Other: 1) Added categorized logging. 2) Methods to get/set wifi interface name. Not exposed to qml. - Missing parts that will be added as a separate patch: * [doc] Getting started guide for c++ and qml * [doc] Update for qml docs and new docs for c++. The current docs are out-of-date. Task-number: QTEE-649 Task-number: QTEE-810 Change-Id: I7dc8709aed2de622828a119749aef31534a4296d Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Change copyright noticeRainer Keller2014-10-061-2/+2
| | | | | | | URL points to qt.io Change-Id: If1dcfcef627ee3e2bdde49522ebabcaa66cea29b Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Fix timing issues in wifi libraryGatis Paeglis2014-09-191-63/+3
| | | | | | | | | | | | | | | There is a timing issue on a device startup if the default application calls Wifi.Interface.wifiSupported() before qconnectivity service has finished initialize wifi firmware/driver. This results in wifiSupported() returing false on nexus 2013, even if this device supports wifi. The solution is to move firmware/driver initialization to Qt Wifi library. Change-Id: If5b4650181f8b7237bd19f3fc3afbd2c75f759e8 Task-number: QTEE-770 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@digia.com>
* Don't show Wi-Fi group box on iMX6-eAndroidGatis Paeglis2014-05-191-8/+9
| | | | | | | This device currently does not support wifi. Change-Id: I8048d7109908c4c2de553dda119cb14be73ef6a7 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@digia.com>
* Port QtWifi to eLinuxGatis Paeglis2014-05-151-12/+12
| | | | | | | | | | | | | Current limitations: - Wifi adapter must be connected before staring the device (and ethernet cable should not be connected at the same time). "allow-hotplug wlan0" in /etc/network/interfaces doesn't seem to help for detecting wifi adapter on-the-fly. Change-Id: I8be407e9e042fc86136efd3e220680fb2ce64bd6 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@digia.com>
* Doc: Create QML Type reference pageTopi Reinio2014-04-021-1/+1
| | | | | | | | | | Create a landing page for QtEE-specific QML modules and types. Ensure it links correctly to WiFi Module documentation, and add it to TOC. Change-Id: Ib3edf9ff8e50f11e138a57aabc1f84749ac48e16 Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com> Reviewed-by: Eirik Aavitsland <eirik.aavitsland@digia.com>
* Add documentation to QtWifi libraryGatis Paeglis2014-03-191-0/+29
| | | | | Change-Id: Ifd71c65a155ad296f3491085e91556eb69226b2b Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Rename misleading class nameGatis Paeglis2014-03-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The API is: ListView { model: wifiManager.networks } currently if user calls print(wifiManager.networks) it will print: QWifiNetworkList The docs of ListView states that model property expects a subclass of QAbstractListModel. QWifiNetworkList sounds like a subclass of QList which is misleading. This patch renames the class to QWifiNetworkListModel. This does not change the public API (doesn't brake compatibility in any way), just improves the documentation of library. Task-number: QTEE-445 Change-Id: I71f07cb22617f3a7f41a0403d1c63c4357310325 Reviewed-by: Andy Nichols <andy.nichols@digia.com>
* Don't use wifi on EmulatorGatis Paeglis2014-02-131-11/+17
| | | | | Change-Id: I9ae1b5b68f3e3ec2c513ec5a6811ea5396425766 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@digia.com>
* Update copyright yearaavit2014-02-121-1/+1
| | | | | Change-Id: Ic818e79d7bfca04bd8a8d8aa12b3ff70ea26a7a3 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Fix dhcp issues and improve public APIGatis Paeglis2014-01-281-3/+32
| | | | | | | | | | | | | | | | | | | | | - Use qconnectivity daemon for dhcp requests. Since dhcp requests are executed in other process we don't block gui thread for this lengthy operation. - Why not to use "do_dhcp_request" - it is a legacy implementation of a dhcp client and is not used anywhere in the Android source code itself. It appears that do_dhcp_request was not removed from the libhardware_legacy to keep compatibility for others, whose code might still depend on it. - Differnet changes to the internal implementation and the public API. - Add 'Interface' singleton type, installing a singleton type allows developers to provide arbitrary functionality to a client without requiring individual instances of the type to be instantiated by the client. We use this to determine if Android has wifi interface. Change-Id: I836f3a2a587b1ebf9f670ed08b10fe3483504b9e Reviewed-by: Eirik Aavitsland <eirik.aavitsland@digia.com>
* Add license headersTopi Reinio2013-12-031-0/+18
| | | | | | | Add an Enterprise License header to source files. Change-Id: I373886dade31ce00d4c10c64ebaf8ba226d5a62d Reviewed-by: Eirik Aavitsland <eirik.aavitsland@digia.com>
* Register the QWifiNetworkList with the QML type systemGunnar Sletta2013-06-121-0/+1
| | | | | Change-Id: I43d1b525cf91b508113fcc6d883050b585a622f8 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@digia.com>
* add missing pluginmain.cpp file for wifiGunnar Sletta2013-04-251-0/+22
Change-Id: I1ef3cd3c915813fec9ef62c4453b8b5e132a95f3 Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>