summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore9
-rw-r--r--src/b2qt-flashing-wizard/platform_page.cpp2
-rw-r--r--src/doc/config/b2qt-online.qdocconf5
-rw-r--r--src/doc/config/b2qt-project.qdocconf45
-rw-r--r--src/doc/config/b2qt.qdocconf53
-rw-r--r--src/doc/doc.pro8
-rw-r--r--src/doc/images/build-your-own-stack.pngbin29477 -> 14568 bytes
-rw-r--r--src/doc/src/devices/qtee-bd-sl-imx6.qdoc59
-rw-r--r--src/doc/src/devices/qtee-nexus-7.qdoc105
-rw-r--r--src/doc/src/devices/qtee-supported-devices.qdoc77
-rw-r--r--src/doc/src/qtee-changelog.qdoc3
-rw-r--r--src/doc/src/qtee-customization.qdoc42
-rw-r--r--src/doc/src/qtee-index.qdoc55
-rw-r--r--src/doc/src/qtee-install-guide.qdoc2
-rw-r--r--src/doc/src/qtee-licenses.qdoc27
-rw-r--r--src/doc/src/qtee-troubleshooting.qdoc123
-rw-r--r--src/doc/src/shared/b2qt-post-install-setup.qdocinc35
-rw-r--r--src/imports/wifi/pluginmain.cpp23
-rw-r--r--src/qconnectivity/main.cpp75
-rw-r--r--src/utils/b2qtdevice.cpp5
-rw-r--r--src/utils/b2qtdevice.h8
-rw-r--r--src/wifi/qwificonfiguration.cpp24
-rw-r--r--src/wifi/qwificonfiguration.h3
-rw-r--r--src/wifi/qwificontroller.cpp68
-rw-r--r--src/wifi/qwificontroller_p.h16
-rw-r--r--src/wifi/qwifielinux.cpp89
-rw-r--r--src/wifi/qwifimanager.cpp114
-rw-r--r--src/wifi/qwifimanager_p.h9
-rw-r--r--src/wifi/qwifinetworklistmodel.cpp19
-rw-r--r--src/wifi/qwifiutils.cpp135
-rw-r--r--src/wifi/qwifiutils_p.h37
-rw-r--r--src/wifi/wifi.pro6
32 files changed, 542 insertions, 739 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..e864cc7
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,9 @@
+*.moc
+*.obj
+*.pro.user*
+*.qmlproject.user*
+Makefile*
+.qmake.cache
+
+# Vim temporary files
+.*.swp
diff --git a/src/b2qt-flashing-wizard/platform_page.cpp b/src/b2qt-flashing-wizard/platform_page.cpp
index 0398001..98dbf56 100644
--- a/src/b2qt-flashing-wizard/platform_page.cpp
+++ b/src/b2qt-flashing-wizard/platform_page.cpp
@@ -146,7 +146,7 @@ void PlatformPage::initializePage()
}
}
if (platforms.isEmpty()) {
- mError->setText(tr("No suitable platform found in '%1'.\nMake sure you have"
+ mError->setText(tr("No suitable platform found in '%1'.\nMake sure you have "
"installed at least one hardware platform.").arg(G_SDKDIR));
}
diff --git a/src/doc/config/b2qt-online.qdocconf b/src/doc/config/b2qt-online.qdocconf
new file mode 100644
index 0000000..a75cde2
--- /dev/null
+++ b/src/doc/config/b2qt-online.qdocconf
@@ -0,0 +1,5 @@
+include($QT_INSTALL_DOCS/global/qt-module-defaults-online-commercial.qdocconf)
+include(b2qt-project.qdocconf)
+
+# sidebar used for online template
+HTML.stylesheets += style/qt5-sidebar.html
diff --git a/src/doc/config/b2qt-project.qdocconf b/src/doc/config/b2qt-project.qdocconf
new file mode 100644
index 0000000..471096e
--- /dev/null
+++ b/src/doc/config/b2qt-project.qdocconf
@@ -0,0 +1,45 @@
+project = QtForDeviceCreation
+description = Qt 5.4 for Device Creation
+version = 4.1.0
+
+sourcedirs += ../src \
+ ../../imports/wifi \
+ ../../imports/utils \
+ ../../wifi
+
+headerdirs += ../../wifi
+
+exampledirs += ../../../examples
+
+imagedirs += ../images
+
+indexes = $QT_INSTALL_DOCS/qtquick/qtquick.index \
+ $QT_INSTALL_DOCS/qtgui/qtgui.index \
+ $QT_INSTALL_DOCS/qtcore/qtcore.index \
+ $QT_INSTALL_DOCS/qtserialport/qtserialport.index \
+ $QT_INSTALL_DOCS/emulator/emulator.index \
+ $QT_INSTALL_DOCS/qtwebengine/qtwebengine.index \
+ $QT_INSTALL_DOCS/qtquickcontrols/qtquickcontrols.index
+
+qhp.projects = B2Qt
+
+qhp.B2Qt.file = b2qt.qhp
+qhp.B2Qt.namespace = com.digia.b2qt.410
+qhp.B2Qt.virtualFolder = b2qt
+qhp.B2Qt.indexTitle = Qt 5.4 for Device Creation
+qhp.B2Qt.indexRoot =
+
+qhp.B2Qt.subprojects = manual
+qhp.B2Qt.subprojects.manual.title = Qt 5.4 for Device Creation
+qhp.B2Qt.subprojects.manual.indexTitle = Qt 5.4 for Device Creation
+qhp.B2Qt.subprojects.manual.type = manual
+
+macro.B2Q = "Boot to Qt"
+macro.SDK = "Qt for Device Creation"
+macro.B2QA = "\\e {Boot to Qt for embedded Android}"
+macro.B2QL = "\\e {Boot to Qt for embedded Linux}"
+
+navigation.landingpage = "Qt 5.4 for Device Creation"
+navigation.qmltypespage = "Add-On Modules"
+
+Cpp.ignoredirectives += Q_DECLARE_LOGGING_CATEGORY
diff --git a/src/doc/config/b2qt.qdocconf b/src/doc/config/b2qt.qdocconf
index ee7a367..f7c8df0 100644
--- a/src/doc/config/b2qt.qdocconf
+++ b/src/doc/config/b2qt.qdocconf
@@ -1,53 +1,2 @@
include(html-offline.qdocconf)
-
-naturallanguage = en_US
-outputencoding = UTF-8
-sourceencoding = UTF-8
-
-project = QtForDeviceCreation
-description = Qt 5.4 for Device Creation
-version = 4.2.0
-
-sourcedirs = ../src \
- ../../imports/wifi \
- ../../imports/utils \
- ../../wifi
-
-headerdirs += ../../wifi
-
-exampledirs += ../../../examples
-
-imagedirs += ../images
-
-indexes = $QT_INSTALL_DOCS/qtquick/qtquick.index \
- $QT_INSTALL_DOCS/qtgui/qtgui.index \
- $QT_INSTALL_DOCS/qtcore/qtcore.index \
- $QT_INSTALL_DOCS/qtserialport/qtserialport.index \
- $QT_INSTALL_DOCS/emulator/emulator.index \
- $QT_INSTALL_DOCS/qtwebengine/qtwebengine.index \
- $QT_INSTALL_DOCS/qtquickcontrols/qtquickcontrols.index
-
-qhp.projects = B2Qt
-
-qhp.B2Qt.file = b2qt.qhp
-qhp.B2Qt.namespace = com.digia.b2qt.420
-qhp.B2Qt.virtualFolder = b2qt
-qhp.B2Qt.indexTitle = Qt 5.4 for Device Creation
-qhp.B2Qt.indexRoot =
-
-qhp.B2Qt.subprojects = manual
-qhp.B2Qt.subprojects.manual.title = Qt 5.4 for Device Creation
-qhp.B2Qt.subprojects.manual.indexTitle = Qt 5.4 for Device Creation
-qhp.B2Qt.subprojects.manual.type = manual
-
-macro.B2Q = "Boot to Qt"
-macro.SDK = "Qt for Device Creation"
-macro.B2QA = "\\e {Boot to Qt for embedded Android}"
-macro.B2QL = "\\e {Boot to Qt for embedded Linux}"
-
-navigation.landingpage = "Qt 5.4 for Device Creation"
-navigation.qmltypespage = "Add-On Modules"
-
-Cpp.ignoredirectives += Q_DECLARE_LOGGING_CATEGORY
-
-HTML.stylesheets += style/qt5-sidebar.html
+include(b2qt-project.qdocconf)
diff --git a/src/doc/doc.pro b/src/doc/doc.pro
index 36dc209..a2fe144 100644
--- a/src/doc/doc.pro
+++ b/src/doc/doc.pro
@@ -1,3 +1,9 @@
TEMPLATE = aux
-QMAKE_DOCS = $$PWD/config/b2qt.qdocconf
+build_online_docs: {
+ QMAKE_DOCS_TARGETDIR = b2qt
+ QMAKE_DOCS = $$PWD/config/b2qt-online.qdocconf
+} else {
+ QMAKE_DOCS = $$PWD/config/b2qt.qdocconf
+}
+
QMAKE_DOCS_OUTPUTDIR = $$OUT_PWD/b2qt
diff --git a/src/doc/images/build-your-own-stack.png b/src/doc/images/build-your-own-stack.png
index 6640a09..950cf3a 100644
--- a/src/doc/images/build-your-own-stack.png
+++ b/src/doc/images/build-your-own-stack.png
Binary files differ
diff --git a/src/doc/src/devices/qtee-bd-sl-imx6.qdoc b/src/doc/src/devices/qtee-bd-sl-imx6.qdoc
index e94835b..68f32cd 100644
--- a/src/doc/src/devices/qtee-bd-sl-imx6.qdoc
+++ b/src/doc/src/devices/qtee-bd-sl-imx6.qdoc
@@ -26,15 +26,14 @@
\list
\li \l{http://boundarydevices.com/products/sabre-lite-imx6-sbc/}
{Boundary Devices BD-SL-i.MX6 (SABRE Lite)}
- (embedded Android and Linux)
\li \l{http://boundarydevices.com/product/nitrogen6x-copy/}
- {Boundary Devices Nitrogen6X} (embedded Linux only)
+ {Boundary Devices Nitrogen6X}
\li \l{http://boundarydevices.com/product/nitrogen6_lite/}
- {Boundary Devices Nitrogen6_Lite} (embedded Linux only)
+ {Boundary Devices Nitrogen6_Lite}
\li \l{http://boundarydevices.com/product/nitrogen6max/}
- {Boundary Devices Nitrogen6_MAX} (embedded Linux only)
+ {Boundary Devices Nitrogen6_MAX}
\li \l{http://boundarydevices.com/product/nitrogen6x-som/}
- {Boundary Devices Nitrogen6X_SOM} (embedded Linux only)
+ {Boundary Devices Nitrogen6X_SOM}
\endlist
\note It is important that you repeat the steps in this section after you
@@ -45,37 +44,10 @@
\section1 Preparing an SD Card
- For \B2QA, an SD card of at least 4 GB capacity is needed. For \B2QL,
- a card of at least 1 GB capacity is sufficient.
+ For \B2QL, an SD card of at least 1 GB capacity is needed.
\include detect-sd-card-device-name.qdocinc instructions
- \section1 Installing the Android Image
-
- \e{If installing} \B2QL, \e{you can skip this step and proceed to}
- \l{#Installing the Boot to Qt Image}{Installing the Boot to Qt Image}.
-
- Download the package \e{imx6-jb-20130628.tar.gz} from
- \l{http://boundarydevices.com/android-jellybean-on-i-mx6-with-no-disclaimers/}{Boundary
- Devices Android Jellybean i.MX6 images} (registration required).
-
- Use the following commands to create an SD card containing the
- downloaded image:
-
- \list 1
- \li Extract the downloaded package:
- \badcode
- ~/$ mkdir bd-android
- ~/$ cd bd-android
- ~/bd-android$ tar zxvf ~/Downloads/imx6-jb-20130628.tar.gz
- \endcode
- \li Run device/boundary/mksdcard.sh:
- \badcode
- ~/bd-android$ sudo device/boundary/mksdcard.sh /dev/<device_name>
- ~/bd-android$ sync
- \endcode
- \endlist
-
\section1 Installing the \B2Q Image
\include common.qdocinc wizard
@@ -91,21 +63,12 @@
\include detect-sd-card-device-name.qdocinc unmount
- Then, use one of the commands below, depending on whether you are developing
- for embedded Android or Linux:
+ Then, use the following command to install the embedded Linux image:
- \list
- \li \b{\B2QA}
- \badcode
- cd <INSTALL_DIR>
- ./Boot2Qt-4.x/generic-4.2-eAndroid/images/iMX6/deploy.sh /dev/<device_name>
- \endcode
- \li \b{\B2QL}
- \badcode
- cd <INSTALL_DIR>
- sudo ./Boot2Qt-4.x/iMX6-eLinux/images/deploy.sh /dev/<device_name>
- \endcode
- \endlist
+ \badcode
+ cd <INSTALL_DIR>
+ sudo ./Boot2Qt-4.x/iMX6-eLinux/images/deploy.sh /dev/<device_name>
+ \endcode
After the installation is complete, insert the SD card, power on the device and check that
the \B2Q welcome screen and/or demo appear.
@@ -116,7 +79,7 @@
\section1 Configuring a Device Kit in Qt Creator
- \include b2qt-post-install-setup.qdocinc configuring device kit android linux
+ \include b2qt-post-install-setup.qdocinc configuring device kit linux
You are now ready to start developing for your device. For more information,
see \l{Building and Running an Example}.
diff --git a/src/doc/src/devices/qtee-nexus-7.qdoc b/src/doc/src/devices/qtee-nexus-7.qdoc
deleted file mode 100644
index 54ba445..0000000
--- a/src/doc/src/devices/qtee-nexus-7.qdoc
+++ /dev/null
@@ -1,105 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2014 Digia Plc
-** All rights reserved.
-** For any questions to Digia, please use the contact form at
-** http://www.qt.io
-**
-** This file is part of Qt Enterprise Embedded.
-**
-** Licensees holding valid Qt Enterprise licenses may use this file in
-** accordance with the Qt Enterprise License Agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and Digia.
-**
-** If you have questions regarding the use of this file, please use
-** the contact form at http://www.qt.io
-**
-****************************************************************************/
-/*!
- \target Nexus 7 (2012/2013) (embedded Android)
- \page qtee-preparing-hardware-nexus-7.html
- \title Preparing Nexus 7 (2012/2013)
- \previouspage qtee-installation-guide.html
- \nextpage qtee-building-and-running.html
-
- Take the following steps to prepare a
- \l{http://www.google.com/nexus/7/specs/}{Nexus 7 (2012/2013)} for
- \B2Q.
-
- \note The installation process will wipe the device. Make sure to
- backup any personal data. The device can later be restored to
- factory state, see \l{nexus-factory-reset}{Troubleshooting}.
-
- The Nexus 7 must have the same Android main version (e.g. \c{4.2}
- or \c{4.4}) as the generic \B2Q eAndroid stack that is to be
- installed. If needed, you can update the Android version either by
- using Android's upgrading tool, or by flashing a factory image of
- the right version. See \l{nexus-factory-reset}{Troubleshooting}.
-
- \section1 Enabling Developer Mode
-
- In order to install the \B2Q stack into the Nexus 7, you need to
- enable developer mode and USB debugging. This is only needed for
- the first time install.
-
- \note If for some reason the device does not boot up normally, it
- is also possible to install to a Nexus 7 started up in
- \c{fastboot} (bootloader) mode (see
- \l{nexus-factory-reset}{Troubleshooting}). Just skip this section
- and add the \c{-fastboot} argument to the \c{deploy.sh} command
- below.
-
- \list 1
- \li Power up the device.
- \li Open the \b{Settings} app and select the \b{About tablet} item.
- \li Press the \b{Build number} item seven times, until the message "You are now a developer!" appears.
-
- \li Back in the \b{Settings} menu, select \b{Developer options}.
- \li Press the \b{USB debugging} item and confirm that you allow USB debugging.
- \endlist
-
- You should now be able to establish USB connection to the device as follows.
-
- \section1 Setting up USB Access
-
- \include b2qt-post-install-setup.qdocinc setting up usb access
-
- \section1 Deploying the \B2Q Stack
-
- \include common.qdocinc wizard
-
- Depending on the edition of your Nexus 7 device, use one of the
- commands below to install the \B2Q stack. Replace \c{X.Y} with the
- device's Android version number, for example \c{4.2} or \c{4.4}.
-
- \note The deploy script will check that the connected Nexus device
- is of the expected type and Android version, and abort the
- installation if it is not.
-
- \list
- \li \b{Nexus 7 (2013):}
- \badcode
- cd <INSTALL_DIR>
- ./Boot2Qt-4.x/generic-X.Y-eAndroid/images/nexus7v2/deploy.sh
- \endcode
- \li \b{Nexus 7 (2012):}
- \badcode
- cd <INSTALL_DIR>
- ./Boot2Qt-4.x/generic-X.Y-eAndroid/images/nexus7/deploy.sh
- \endcode
- \endlist
-
- During the installation, the device may ask for confirmation to be
- unlocked. Press the power button once to confirm.
-
- The device will reboot during the process. Do not interact with it
- or unplug it until the process is fully completed.
-
- \section1 Configuring a Device Kit in Qt Creator
-
- \include b2qt-post-install-setup.qdocinc configuring device kit android
-
- You are now ready to start developing for your device. For more information,
- see \l{Building and Running an Example}.
-*/
diff --git a/src/doc/src/devices/qtee-supported-devices.qdoc b/src/doc/src/devices/qtee-supported-devices.qdoc
index 07501b7..c11fd73 100644
--- a/src/doc/src/devices/qtee-supported-devices.qdoc
+++ b/src/doc/src/devices/qtee-supported-devices.qdoc
@@ -28,7 +28,6 @@
\B2Q stack. These steps vary from device to device:
\list
- \li \l{Nexus 7 (2012/2013) (embedded Android)}
\li \l{Boundary Devices i.MX6 Boards}
\li \l{SABRE SD i.MX6Quad (embedded Linux)}
\li \l{SABRE SD i.MX6Dual (embedded Linux)}
@@ -67,11 +66,6 @@
* On GPU-less hardware, \l {Qt Quick 2D Renderer} can replace the
OpenGL ES 2.0 requirement (with some limitations on graphics capabilities).
- \B2QA requires hardware that has support for the Android operating
- system, version 4.2 or later. For rapid prototyping or feasibility testing,
- it is possible to install it on most programmable Android devices using
- \l {Android injection}.
-
\section1 Supported Device Groups
The reference devices are divided into three groups, based on level
@@ -85,43 +79,32 @@
need to be reproducible with Qt libraries for further investigation by
the support team.
- Pre-compiled images for group 1 devices are available via the Qt
- online installer.
+ Pre-compiled embedded Linux images for group 1 devices are available via
+ the Qt online installer.
\table
- \header \li Device \li eLinux \li eAndroid
+ \header \li Devices with GPU \li eLinux
\row \li \l{http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=RDIMX6SABREBRD}
{Freescale® SABRE SD i.MX6} (Freescale® i.MX6)\br
ARM Cortex A9, Vivante GC2000 GPU, 1GB RAM
\li \image ok
- \li
\row \li \l{http://beagleboard.org/products/beaglebone%20black}
{BeagleBone Black}\br
TIAM335x 1GHz ARM® Cortex-A8, 512 MB RAM
\li \image ok
- \li
- \row \li \l{http://www.google.com/nexus/7/specs/}
- {Google Nexus 7 (2013)}\br
- Qualcomm Snapdragon S4 Pro APQ8064–1AA SoC (1.5 GHz\br
- quad-core Krait 300 and an Adreno 320 GPU, clocked at 400 MHz)
- \li
- \li \image ok
\row \li \b{\B2Q Emulator}\br
Included in the development environment
\li \image ok
- \li \image ok
- \header \li Devices Without GPU \li \li
+ \header \li Devices Without GPU \li
\row \li \l{https://www.toradex.com/products/colibri-arm-computer-modules/freescale-vybrid-VF6xx-computer-module}
{Toradex Colibri VF61}\br
Dual-core (ARM Cortex-A5 + ARM Cortex-M4)\br
solution with 1 MB on-chip SRAM
\li \image ok
- \li
\row \li \l{https://www.toradex.com/products/colibri-arm-computer-modules/freescale-vybrid-VF5xx-computer-module}
{Toradex Colibri VF50}\br
Single-core (ARM Cortex-A5) solution with 1.5 MB on-chip SRAM
\li \image ok
- \li
\endtable
\section2 Group 2
@@ -140,37 +123,27 @@
online installer.
\table
- \header \li Device \li eLinux \li eAndroid
- \row \li \l{http://www.google.com/nexus/7/specs/}
- {Google Nexus 7 (2012)}\br
- Nvidia Tegra 3 SoC (1.3 GHz Quad-Core ARM\br
- Cortex A9, Nvidia GeForce ULP GPU, 1GB RAM)
- \li
- \li \image ok
+ \header \li Devices with GPU \li eLinux
\row \li \l{http://boundarydevices.com/product-selector-guide/}
{Boundary Devices i.MX6 Boards}\br
Freescale® i.MX 6 based devices with\br
Vivante GC2000 GPU
\li \image ok
- \li
\row \li \l{http://www.silica.com/product/architech-tibidabo.html}
{SILICA ArchiTech Tibidabo}\br
Freescale® i.MX 6Q ARM Cortex™-A9 @800 MHz,\br
2GB DDR3, 128MB NOR, Vivante GC2000 GPU
\li \image ok
- \li
\row \li \l{http://www.toradex.com/products/apalis-arm-computer-modules/freescale-imx-6-computer-module}
{Toradex Apalis iMX6}\br
Freescale® i.MX 6Q ARM Cortex™-A9 @1 GHz,\br
1GB DDR3, 4GB eMMC, Vivante GC2000 GPU
\li \image ok
- \li
\row \li \l{http://www.raspberrypi.org/faqs}
{Raspberry Pi Model B}\br
700 Mhz ARM11, Broadcom videocode IV\br
@250MHz GPU, 512 MB (shared with GPU) RAM
\li \image ok
- \li
\endtable
\section2 Group 3
@@ -183,13 +156,12 @@
The Qt Company for consultancy services.
\table
- \header \li Device \li eLinux \li eAndroid \li Notes
+ \header \li Device \li eLinux \li Notes
\row \li \l{http://beagleboard.org/hardware-xM}
{BeagleBoard-xM}\br
1GHz ARM Cortex A8, PowerVR SGX530 GPU,\br
512MB RAM
\li \image ok
- \li \image ok
\li
\row \li \l{http://processors.wiki.ti.com/index.php/AM335x_Starter_Kit}
{Sitara AM335x Starter Kit}\br
@@ -197,28 +169,13 @@
with 4.3-inch LCD touchscreen
\li \image ok
\li
- \li
\row \li \l{http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=IMX53QSB}
{Freescale® iMX53 Quick Start Board}\br
1GHz ARM Cortex™-A8
\li \image ok
\li
- \li
- \row \li \l{http://beagleboard.org/products/beaglebone%20black}
- {BeagleBone Black} (eAndroid)\br
- TIAM335x 1GHz ARM® Cortex-A8, 512 MB RAM
- \li
- \li \image ok
- \li eLinux: See \l{Group 1}
\endtable
- \b Notes:
-
- Starting from \B2Q 4.0 release, the embedded Android platform
- is no longer tested and supported on the BeagleBone Black. It is,
- however, still tested and supported in the earlier 3.x releases.
- Also, it possible to install \B2QA on it using \l {Android injection}.
-
\section2 Supported Features on Reference Devices
The following features are supported without any modification on the
@@ -260,17 +217,6 @@
\li \image ok
\li \image ok
\li
- \row \li Google Nexus 7 (2013)
- \li \image ok
- \li \image ok
- \li \image ok
- \li \image ok
- \li \image ok
- \li \image ok
- \li \image ok
- \li \image ok
- \li \image ok
- \li
\row \li Toradex Colibri VF61
\li \image ok
\li \image ok
@@ -294,17 +240,6 @@
\li
\li \image ok
\header \li Group 2 \li \li \li \li \li \li \li \li \li \li
- \row \li Google Nexus 7 (2012)
- \li \image ok
- \li \image ok
- \li \image ok
- \li \image ok
- \li
- \li \image ok
- \li \image ok
- \li \image ok
- \li \image ok
- \li
\row \li Boundary Devices i.MX6 Boards
\li \image ok
\li \image ok
diff --git a/src/doc/src/qtee-changelog.qdoc b/src/doc/src/qtee-changelog.qdoc
index bdaf04a..bfaa919 100644
--- a/src/doc/src/qtee-changelog.qdoc
+++ b/src/doc/src/qtee-changelog.qdoc
@@ -238,8 +238,7 @@
embedded Android and Linux. However, the Emulator target is
currently not supported
\li \l {Qt Quick Compiler} (Technology Preview) was added to the \B2Q stack
- \li \l{Preparing Nexus 7 (2012/2013)}{Nexus 7 (2013)} was added as a
- reference device for embedded Android
+ \li Nexus 7 (2013) was added as a reference device for embedded Android
\li \l{Preparing SABRE SD i.MX6}{Freescale SABRE SD i.MX6Quad} was
added as a reference device for embedded Linux
\li WiFi networking support and configuration were implemented on
diff --git a/src/doc/src/qtee-customization.qdoc b/src/doc/src/qtee-customization.qdoc
index 3f3151f..fa3186c 100644
--- a/src/doc/src/qtee-customization.qdoc
+++ b/src/doc/src/qtee-customization.qdoc
@@ -26,9 +26,8 @@
\section1 Environment and Input
By default, the basic environment variables and startup options of
- \B2Q applications are set in the file \c
- {/system/bin/appcontroller.conf} in embedded Android devices and
- in \c{/etc/appcontroller.conf} in embedded Linux devices.
+ \B2Q applications are set in \c{/etc/appcontroller.conf} on embedded Linux
+ devices.
You can customize this file if you target a hardware device that
has other input devices than the ones that the \B2Q stack is configured
@@ -71,22 +70,18 @@
To enable \c tslib, add the following line to \c /etc/appcontroller.conf on the device:
\badcode
- env=QT_QPA_GENERIC_PLUGINS=tslib
+ env=QT_QPA_EGLFS_TSLIB=1
\endcode
- In some cases it will be necessary to disable the built-in input handlers in
- case they interfere with \c tslib. To do this, add the following line to
- \c /etc/appcontroller.conf on the device. Once this is done, no input device
- handling is in use by default. Instead, the necessary plugins have to be
- specified in \c QT_QPA_GENERIC_PLUGINS.
+ \note The \c tslib plugin provides no multitouch events (QTouchEvent). It
+ only generates mouse events (QMouseEvent).
+
+ If necessary, the device can be specified explicitly by setting \c TSLIB_TSDEVICE:
\badcode
- env=QT_QPA_EGLFS_DISABLE_INPUT=1
+ env=TSLIB_TSDEVICE=/dev/input/event1
\endcode
- \note The \c tslib plugin provides no multitouch events (QTouchEvent). It
- only generates mouse events (QMouseEvent).
-
\section1 Booting to a Custom Application
By default, the \e {\B2Q demo launcher} is configured to run on startup.
@@ -98,7 +93,7 @@
\li Under \b Deployment, click on \b {Add Deploy Step}, and select
\b {Make this application the default one}.
\li Re-deploy your project. In \b Edit mode, right-click on the
- project and select \b Deploy, or simply click
+ project and select \b Deploy, or click
\inlineimage qtcreator-run.png
(\b{Run}).
\endlist
@@ -110,7 +105,7 @@
<INSTALL_DIR>/Tools/b2qt/adb shell appcontroller --make-default <path>
\endcode
- Above, \c{<path>} is the install path of your application binary on the
+ Where \c{<path>} is the install path of your application binary on the
device.
To remove your application from the default startup, use the following
@@ -227,23 +222,6 @@
}
\endqml
- \section1 Disabling Screen Composer on Embedded Android
-
- By default, the \B2Q stack uses Android's screen composer, \e
- Surfaceflinger. It is required for Qt Multimedia functionality,
- i.e. video playback and camera. If that functionality is not
- required, Surfaceflinger may be disabled. This can in some
- situations improve performance.
-
- \list 1
- \li Edit \c {/system/bin/appcontroller.conf} to set the value of
- the environment variable \c QT_QPA_EGLFS_NO_SURFACEFLINGER to \c
- 1 instead of \c 0.
- \li Disable the startup of \c surfaceflinger at boot-up. Either
- change \c /init.rc, or simply rename the \c
- {/system/bin/surfaceflinger} executable.
- \endlist
-
\section1 Using Network Connection for ADB
By default, \B2Q uses USB cable for communication between device and Qt Creator.
diff --git a/src/doc/src/qtee-index.qdoc b/src/doc/src/qtee-index.qdoc
index b9f35b3..64635d7 100644
--- a/src/doc/src/qtee-index.qdoc
+++ b/src/doc/src/qtee-index.qdoc
@@ -22,11 +22,10 @@
\nextpage qtee-overview.html
\title Qt 5.4 for Device Creation
- With commercially licensed Qt for device creation, you get a fully-integrated
- solution to get you started immediately with software development on your
- embedded device with a tailored user experience for embedded Linux and
- embedded Android. Qt libraries can also be manually configured to other
- operating systems or custom software stacks.
+ \e {Qt for Device Creation} is a commercial offering, providing a
+ fully-integrated solution for creating embedded Linux-based products. It
+ provides the complete toolchain required for faster software development,
+ enabling quicker time-to-market.
The Qt development environment for device creation consists of:
@@ -44,7 +43,6 @@
\li \l{Supported Platforms}
\li \l{Preparing Hardware}
\list
- \li \l{Preparing Nexus 7 (2012/2013)}{Nexus 7 (2012/2013) (embedded Android)}
\li \l{Boundary Devices i.MX6 Boards}
\li \l{Preparing SABRE SD i.MX6}{SABRE SD i.MX6Quad (embedded Linux)}
\li \l{Preparing SABRE SD i.MX6}{SABRE SD i.MX6Dual (embedded Linux)}
@@ -148,9 +146,9 @@
\title About Boot to Qt
\e{\b{\B2Q}} is a light-weight, Qt-optimized, full software stack for
- embedded systems that is installed into the actual target device. This is
- done by flashing the device's memory card or internal memory directly with a
- pre-built image that comes with the online installer.
+ embedded Linux systems that is installed into the actual target device.
+ This is done by flashing the device's memory card or internal memory
+ directly with a pre-built image that comes with the online installer.
See the \l{Installation Guide} for details.
\B2Q is ideal for the following use cases:
@@ -158,46 +156,21 @@
\list
\li Evaluating Qt on real embedded environment using one of the provided
reference images.
- \li Getting an immediately working embedded development environment up
- and running as a starting point to production development. Later,
- the stack can be customized to production with
+ \li Getting the embedded development environment up and running in no
+ time. Later, the stack can be customized to production with
\e Build-Your-Own-Stack tooling, including proprietary Yocto Project
recipes.
- \li Creating embedded devices from off-the-shelf programmable Android
- devices using \l {Android injection}.
\endlist
\image build-your-own-stack.png
- Boot to Qt supports two different operating systems:
-
- \b{\B2QL}\br
\B2QL is using the traditional embedded Linux
kernel built with the Yocto Poky reference system (Yocto 1.6 Daisy release).
The embedded Linux variant is designed for great customization possibilities.
It contains only components required in the embedded device, resulting in
smaller image sizes while keeping valuable development tools available.
- \b{\B2QA}\br
- The embedded Android stack provides an easy way to create a full embedded
- device using off-the-shelf programmable Android devices,
- making the device run stripped-down, Qt-optimized OS and middleware stack.
- The device will then become an embedded device running Qt applications,
- instead of running the Android OS with Android applications.
-
- For just creating applications using the Qt libraries that run on the native
- Android OS, see \l {Qt for Android} in Qt reference documentation.
-
- \B2QA tries to strip down the Android stack to the
- bare minimum, relying only on basic Linux features. The majority of the
- Android stack, such as Dalvik virtual machine is not running in Boot to Qt,
- resulting in faster startup times, lower memory consumption and overall
- better performance.
-
- The embedded Android stack can be installed into programmable Android
- devices that are based on Android version 4.2 or higher.
-
- Both versions of \B2Q have been tested and verified on a number of different
+ \B2Q have been tested and verified on a number of different
hardware configurations. Usage of \B2Q is not limited to the devices used as
\l {Supported Platforms}{reference platforms}, it can be made to run on a
variety of hardware.
@@ -207,8 +180,7 @@
\B2QL is built using the tools and resources from the \l {Yocto Project},
and is based on Yocto's reference distribution (\e Poky). You can
use the same tools to build custom \B2Q images, and have control over
- which packages are included in the build and how the software stack
- is configured.
+ the packages included in the build and configure the software stack.
The process consist of three parts: Building the \B2Q image and the
external toolchain, building Qt libraries and add-ons, and configuring
@@ -221,7 +193,6 @@
\section1 Emulator
The \l {Emulator Manual}{emulator} running a \B2Q image enables you to
- test and debug applications in an environment practically identical to
- that of the device, without having a real device connected to the
- development host.
+ test and debug applications in an environment identical to that of the
+ device, without having a real device connected to the development host.
*/
diff --git a/src/doc/src/qtee-install-guide.qdoc b/src/doc/src/qtee-install-guide.qdoc
index 6ffc8e6..4fb097d 100644
--- a/src/doc/src/qtee-install-guide.qdoc
+++ b/src/doc/src/qtee-install-guide.qdoc
@@ -141,7 +141,7 @@
\section1 6. Configuring a Device Kit in Qt Creator
- \include b2qt-post-install-setup.qdocinc configuring device kit android linux
+ \include b2qt-post-install-setup.qdocinc configuring device kit linux
You are now ready to start developing for your device.
For more information, see \l{Building and Running an Example}.
diff --git a/src/doc/src/qtee-licenses.qdoc b/src/doc/src/qtee-licenses.qdoc
index 791ec92..bd23fd5 100644
--- a/src/doc/src/qtee-licenses.qdoc
+++ b/src/doc/src/qtee-licenses.qdoc
@@ -34,17 +34,6 @@
The third-party licenses used in \SDK are listed in the file
\c {<INSTALL_DIR>/Licenses/ThirdPartySoftware_Listing.txt}.
- \section1 Embedded Android Images
-
- The embedded Android platform is built from the \e {Android Open Source Project},
- source code available at \l {http://android.googlesource.com/}. The open
- source licenses and notices are collected into the file
- \c {/etc/NOTICE.html.gz} in the target images.
-
- \B2QA installs additional 3rd party software on top of standard Android images. The listing
- of licensed files and corresponding license information are located in \c {/system/licenses}
- directory in the target images.
-
\section1 Embedded Linux Images
The embedded Linux platform is built using tools from the \l {Yocto Project}.
@@ -53,20 +42,4 @@
\li \c /usr/share/common-licenses/license.manifest
\li \c /usr/share/licenses/*
\endlist
-
- \section1 Android GNU C++ Run-time Licensing
-
- The Android platform does not provide a full implementation of the C++ run-time. Instead,
- apps that depend on features such as STL, exceptions, or RTTI, must include an additional
- native run-time library that provides the features they need.
-
- \B2QA uses the GNU libstdc++ library distributed as part of the \e {Android Open Source Project}.
- This library is included in the images for \B2QA, and will be loaded by the application
- on start-up to meet the run-time requirements of Qt.
-
- The GNU C++ run-time is licensed under the
- \l{http://gcc.gnu.org/onlinedocs/libstdc++/manual/appendix_gpl.html}{GNU General Public License version 3} with
- an exception which grants permission for run-time linking and usage of the library by an application which
- would otherwise violate the terms of the main license. For more information about this exception, see
- \l{http://gcc.gnu.org/onlinedocs/libstdc++/manual/license.html}{the official license page}.
*/
diff --git a/src/doc/src/qtee-troubleshooting.qdoc b/src/doc/src/qtee-troubleshooting.qdoc
index 6561220..dc8a5fc 100644
--- a/src/doc/src/qtee-troubleshooting.qdoc
+++ b/src/doc/src/qtee-troubleshooting.qdoc
@@ -31,22 +31,18 @@
\row \li \l{ts-02}{I have problems deploying/launching a Qt or Qt Quick example application}
\row \li \l{ts-03}{I have problems launching or running applications on hardware after updating the SDK}
\row \li \l{ts-04}{Booting BD-SL-i.MX6 stops with '6x_bootscript not found' error}
- \row \li \l{nexus-factory-reset}{How do I restore my Nexus 7 to factory settings}
- \row \li \l{ts-06}{How do I shut down the Nexus 7?}
\row \li \l{ts-07}{How do I get HDMI output working properly on BeagleBone Black?}
- \row \li \l{ts-08}{Trying to build for the emulator target fails with error message 'make: i686-android-linux-g++: Command not found'}
\row \li \l{ts-09}{Something crashed!}
\row \li \l{ts-10}{Mouse or touch input does not work}
\row \li \l{ts-11}{Application stops with 'EGLFS: OpenGL windows cannot be mixed with others.'}
\row \li \l{ts-12}{I cannot edit the contents of appcontroller.conf on the device}
- \row \li \l{ts-13}{C++11 features do not work on Android}
+ \row \li \l{ts-13}{How to enable C++11 features}
\header \li \b {Connectivity Issues}
\row \li \l{ts-14}{I cannot connect to my hardware device via USB}
\row \li \l{ts-15}{adb fails with "error: more than one device and emulator"}
\row \li \l{ts-16}{The emulator cannot connect to the Internet}
\row \li \l{ts-17}{The emulator is stuck in \e{Waiting for display data} or fails to start properly}
\row \li \l{ts-18}{What are the user and password to access my embedded Linux device?}
- \row \li \l{ts-19}{Boundary Devices Android Jellybean i.MX6 image deployment issues}
\endtable
\section1 General Issues
@@ -89,36 +85,6 @@
\li \l http://boundarydevices.com/switching-u-boot-versions-on-i-mx6/
\endlist
- \target nexus-factory-reset
- \b{How do I restore my Nexus 7 to factory settings}
-
- Go to \l{https://developers.google.com/android/nexus/images} and
- download the correct file for your device. Unpack it, and then enter the
- following commands:
-
- \badcode
- <INSTALL_DIR>/Tools/b2qt/adb reboot bootloader
- <INSTALL_DIR>/Tools/b2qt/fastboot -w update <image-file>.zip
- \endcode
-
- \target ts-06
- \b{How do I shut down the Nexus 7?}
-
- If the \B2Q demo launcher is running, start the \b {Launcher
- Settings} app, and select \b {Shut Down} to power off the device.
-
- Otherwise, make sure the Nexus 7 is connected to the development host, and run
- the following command in a terminal:
- \badcode
- <INSTALL_DIR>/Tools/b2qt/adb shell reboot -p
- \endcode
-
- If the device is in the fastboot mode, use the volume button to display the
- \b {Power off} option and press the power button to power off the device.
-
- Alternatively, press and hold the power button for 10
- seconds. This will force a reboot.
-
\target ts-07
\b{How do I get HDMI output working properly on BeagleBone Black?}
@@ -130,14 +96,6 @@
More details and possible solutions can be found
\l {http://www.elinux.org/Beagleboard:BeagleBoneBlack_HDMI}{here}.
- \target ts-08
- \b{Trying to build for the emulator target fails with error message 'make: i686-android-linux-g++: Command not found'}
-
- You need to install support libraries in order to run 32-bit programs in a
- 64-bit Linux operating system.
-
- See \l{Installing 32-bit Support Libraries}.
-
\target ts-09
\b{Something crashed!}
@@ -156,9 +114,8 @@
See \l{Customization}.
- \note Hotplugging does not currently work on Embedded Android, and therefore,
- any input device must be present at boot time to be recognized. On Embedded Linux
- hotplugging is usually supported for mouse and keyboard devices.
+ \note On Embedded Linux hotplugging is usually supported for mouse and
+ keyboard devices.
\target ts-11
\b{Application stops with 'EGLFS: OpenGL windows cannot be mixed with others.'}
@@ -179,15 +136,9 @@
See \l{Customization}.
\target ts-13
- \b{C++11 features do not work on Android}
+ \b{How to enable C++11 features}
To enable C++11 features in the compiler, add \e{CONFIG += c++11} to the .pro file.
- On Embedded Linux this will be enough because there the toolchain contains a more
- recent version of gcc (4.8.x). On Embedded Android however the toolchain is based on
- gcc 4.6. This offers limited support for C++11 and Qt's own C++11 support is disabled,
- meaning that adding \e{c++11} to \e{CONFIG} will have no effect. There is still a
- possibility however to manually enable some level of C++11 support just for the
- application, by adding \e{QMAKE_CXXFLAGS += -std=c++11} to the .pro file.
\section1 Connectivity Issues
\target ts-14
@@ -198,7 +149,7 @@
\target ts-15
\b{adb fails with "error: more than one device and emulator"}
- You have to specify which Android device you want \c{adb} to talk
+ You have to specify which device you want \c{adb} to talk
to, using adb's \c{-s <serial-number>} option. Use the following
command to find to see the serial number of the connected
devices:
@@ -244,27 +195,6 @@
\b{What are the user and password to access my embedded Linux device?}
Embedded Linux devices can be accessed using user \c{root} and an empty password.
-
- \target ts-19
- \b{Boundary Devices Android Jellybean i.MX6 image deployment issues}
-
- On some hosts running the mksdcard.sh script results in the following failure messages:
-
- \badcode
- Cannot find device with major:minor 8:20: No such device
- cp: target ‘/media/BOOT/’ is not a directory
- \endcode
-
- This means that flashing an SD card has failed, even if the scripts seemingly runs to the end.
- The issue can be worked around by adding \c sleep call before \c {udisks --mount} loop (search at
- the end of the script):
-
- \badcode
- sleep 2
- for n in 1 2 4 ; do
- udisks --mount ${diskname}${prefix}${n}
- done
- \endcode
*/
/*!
@@ -277,20 +207,15 @@
\header \li \b {Common Issues}
\row \li \l{ki-01}{Qt Sensors: Sensor Support Depends on Hardware}
\row \li \l{ki-02}{Qt WebEngine: Widget-based Web View not Available}
- \row \li \l{ki-03}{Qt WebKit: No Support on Embedded Android}
- \row \li \l{ki-04}{No Sound on Embedded Android Devices}
\row \li \l{ki-05}{Limited Support for Multiple Top-Level Windows}
\row \li \l{ki-06}{QML Debugging not Functional with Qt Quick Compiler}
\row \li \l{ki-18}{Multi-process Support with the Wayland Windowing System}
\header \li \b {Device-Specific Issues}
\row \li \l{ki-07}{BD-SL-i.MX6: Device Stops Working After Disconnecting the Micro-USB Cable}
- \row \li \l{ki-08}{BD-SL-i.MX6: Internet Radio Demo Causes Device to Freeze}
\row \li \l{ki-11}{BeagleBone Black: Unstable HDMI output}
\header \li \b {Emulator-Specific Issues}
- \row \li \l{ki-12}{Networking on Embedded Android Emulator}
\row \li \l{ki-13}{Qt WebEngine not Available for Emulator}
\row \li \l{ki-15}{Switching Between Emulators from Different Boot to Qt Versions}
- \row \li \l{ki-16}{Emulator: Limited Support for Qt Multimedia}
\endtable
\section1 Common Issues
@@ -308,18 +233,6 @@
The QWidget-based equivalent, such as QWebEngineView, will become supported in a future
release. For the time being, use the WebEngineView QML type.
- \target ki-03
- \b{Qt WebKit: No Support on Embedded Android}
-
- Qt WebKit currently does not build on embedded Android.
-
- \target ki-04
- \b{No Sound on Embedded Android Devices}
-
- When connecting a headphone or speakers while the device is running, the
- audio may not be properly routed to the correct output. As a workaround,
- connect the headphone or speakers before turning on the device.
-
\target ki-05
\b{Limited Support for Multiple Top-Level Windows}
@@ -344,12 +257,6 @@
The device does not respond to touch input after connecting to a host computer via USB, and
then disconnecting the Micro-USB cable.
- \target ki-08
- \b{BD-SL-i.MX6: Internet Radio Demo Causes Device to Freeze}
-
- Trying to start playback in Internet Radio application from Qt 5 Everywhere demo causes the
- device to not react to touch input on embedded Android.
-
\target ki-11
\b{BeagleBone Black: Unstable HDMI output}
@@ -360,22 +267,10 @@
\section1 Emulator-Specific Issues
- \target ki-12
- \b{Networking on Embedded Android Emulator}
-
- Internet access on embedded Android emulator may not work by default, as the dhcpcd daemon
- unnecessarily adds a default route for the eth0 interface. As a workaround, this route can
- be removed manually. Start the emulator, and use the following command:
-
- \badcode
- <INSTALL_DIR>/Tools/b2qt/adb shell ip route del default dev eth0
- \endcode
-
\target ki-13
\b{Qt WebEngine not Available for Emulator}
- \l{Qt WebEngine} is not currently available for the emulators, neither embedded Linux
- nor embedded Android. This is planned to be addressed in a later release.
+ \l{Qt WebEngine} will not be available on the emulator.
\target ki-15
\b{Switching Between Emulators from Different Boot to Qt Versions}
@@ -384,12 +279,6 @@
emulator startup problems and graphical issues. To avoid these problems, close the previous
emulator before launching a new one.
- \target ki-16
- \b{Emulator: Limited Support for Qt Multimedia}
-
- The emulator for embedded Android does not properly support multimedia functionality
- (playback of audio and video, accessing camera).
-
\target ki-18
\b{Multi-process Support with the Wayland Windowing System}
diff --git a/src/doc/src/shared/b2qt-post-install-setup.qdocinc b/src/doc/src/shared/b2qt-post-install-setup.qdocinc
index 4de30e8..e73b8e7 100644
--- a/src/doc/src/shared/b2qt-post-install-setup.qdocinc
+++ b/src/doc/src/shared/b2qt-post-install-setup.qdocinc
@@ -75,25 +75,6 @@
//! [steps for device kit]
//! [configuring device kit]
-//! [android steps for dev kit]
- \list 1
- \li Select \b{Tools > Options > Build & Run > Kits}.
- \li Select the kit with the correct Android version
- (for example, \e {generic-4.2}).
- \li Select the correct device in the \b{Device} field.
- \li Select \b{OK}.
- \endlist
-
- If you have more than one development device that use the same Android
- version, clone the \e generic kit and rename it after the physical device:
-
- \list 1
- \li Select the generic Android kit and then \b Clone.
- \li Select the correct device in the \b{Device} field.
- \li Edit the name of the cloned kit and press \b OK.
- \endlist
-//! [android steps for dev kit]
-
//! [configuring network device]
After you have prepared the hardware, you must set up the development tools
in Qt Creator for your device. Connect your device to the network via an
@@ -115,18 +96,8 @@
//! [configuring network device]
-//! [configuring device kit android]
+//! [configuring device kit linux]
\include b2qt-post-install-setup.qdocinc common config device kit
- \include b2qt-post-install-setup.qdocinc android steps for dev kit
-//! [configuring device kit android]
-
-//! [configuring device kit android linux]
- \include b2qt-post-install-setup.qdocinc common config device kit
- \list
- \li \b{\B2QL}
- \include b2qt-post-install-setup.qdocinc steps for device kit
- \li \b{\B2QA}
- \include b2qt-post-install-setup.qdocinc android steps for dev kit
- \endlist
-//! [configuring device kit android linux]
+ \include b2qt-post-install-setup.qdocinc steps for device kit
+//! [configuring device kit linux]
*/
diff --git a/src/imports/wifi/pluginmain.cpp b/src/imports/wifi/pluginmain.cpp
index a778fa2..b498b66 100644
--- a/src/imports/wifi/pluginmain.cpp
+++ b/src/imports/wifi/pluginmain.cpp
@@ -93,13 +93,13 @@ QT_BEGIN_NAMESPACE
interface, accessed with the following roles:
\list
- \li \e ssid - informal (human) name of a Wifi network
- \li \e bssid - basic service set identification of a network, used to uniquely identify BSS
- \li \e signalStrength - strength of a Wifi signal, measured in dBm
- \li \e supportsWPA - holds whether network access point supports WPA security protocol
- \li \e supportsWPA2 - holds whether network access point supports WPA2 security protocol
- \li \e supportsWEP - holds whether network access point supports WEP security protocol
- \li \e supportsWPS - holds whether network access point supports WPS security protocol
+ \li \e ssid - informal (human) name of a Wifi network (string)
+ \li \e bssid - basic service set identification of a network, used to uniquely identify BSS (string)
+ \li \e signalStrength - strength of a Wifi signal represented as percentage (0-100) (int)
+ \li \e supportsWPA - holds whether network access point supports WPA security protocol (bool)
+ \li \e supportsWPA2 - holds whether network access point supports WPA2 security protocol (bool)
+ \li \e supportsWEP - holds whether network access point supports WEP security protocol (bool)
+ \li \e supportsWPS - holds whether network access point supports WPS security protocol (bool)
\endlist
*/
@@ -322,6 +322,15 @@ QT_BEGIN_NAMESPACE
WPA is used by default if property is not set, supported values are: WPA, WPA2, WEP, WPS.
*/
+/*!
+ \qmlproperty bool WifiConfiguration::ssidHidden
+
+ If a Wifi access point does not broadcast its SSID, setting this property
+ to \c true ensures that the Wifi backend can detect the specified network.
+
+ By default this property is set to \c false.
+*/
+
static QObject *globalWifiDevice(QQmlEngine *, QJSEngine *)
{
return new QWifiDevice;
diff --git a/src/qconnectivity/main.cpp b/src/qconnectivity/main.cpp
index f932772..d25c42e 100644
--- a/src/qconnectivity/main.cpp
+++ b/src/qconnectivity/main.cpp
@@ -26,17 +26,14 @@
#include <netutils/dhcp.h>
#include <netutils/ifc.h>
-// Code values come from android/system/netd/ResponseCode.h
-static const int InterfaceChange = 600;
-
-static const char UNIQUE_HOSTNAME[] = "net.hostname";
-
-static bool QT_CONNECTIVITY_DEBUG = !qgetenv("QT_CONNECTIVITY_DEBUG").isEmpty();
-static bool QT_USE_EXPIRED_LEASE = !qgetenv("QT_USE_EXPIRED_LEASE").isEmpty();
+Q_LOGGING_CATEGORY(B2QT_QCONNECTIVITY, "qt.b2qt.qconnectivity")
+// Code values come from android/system/netd/ResponseCode.h
+const int InterfaceChange = 600;
+const char UNIQUE_HOSTNAME[] = "net.hostname";
// sanity check a renewal time, lower value than
// this might indicate a badly configured DHCP server
-static int MIN_RENEWAL_TIME_SECS = 300; // 5 min
+const int MIN_RENEWAL_TIME_SECS = 300; // 5 min
#define ETH_INTERFACE_HW "eth0"
#define ETH_INTERFACE_EMULATOR "eth1"
@@ -165,7 +162,9 @@ QConnectivityDaemon::QConnectivityDaemon()
m_isEmulator(isEmulator()),
m_attemptCount(50)
{
- qDebug() << "starting QConnectivityDaemon...";
+ QLoggingCategory::setFilterRules(QStringLiteral("qt.b2qt.qconnectivity=true"));
+ qCDebug(B2QT_QCONNECTIVITY) << "starting QConnectivityDaemon...";
+
if (!m_isEmulator) {
m_ethInterface = ETH_INTERFACE_HW;
m_leaseTimer = new LeaseTimer(this);
@@ -178,9 +177,9 @@ QConnectivityDaemon::QConnectivityDaemon()
if (m_serverSocket->listen(serverFd))
connect(m_serverSocket, SIGNAL(newConnection()), this, SLOT(handleNewConnection()));
else
- qWarning() << "QConnectivityDaemon: not able to listen on the server socket...";
+ qCWarning(B2QT_QCONNECTIVITY) << "not able to listen on the server socket...";
} else {
- qWarning() << "QConnectivityDaemon: failed to open qconnectivity server socket";
+ qCWarning(B2QT_QCONNECTIVITY) << "failed to open qconnectivity server socket";
}
} else {
m_ethInterface = ETH_INTERFACE_EMULATOR;
@@ -197,7 +196,7 @@ bool QConnectivityDaemon::isEmulator() const
isEmulator = content.contains("platform=emulator");
conf.close();
} else {
- qWarning() << "Failed to read appcontroller.conf";
+ qCWarning(B2QT_QCONNECTIVITY) << "Failed to read appcontroller.conf";
}
return isEmulator;
}
@@ -206,16 +205,17 @@ void QConnectivityDaemon::initNetdConnection()
{
int netdFd = socket_local_client("netd", ANDROID_SOCKET_NAMESPACE_RESERVED, SOCK_STREAM);
if (netdFd != -1) {
- qDebug() << "QConnectivityDaemon: connected to netd socket";
+ qCDebug(B2QT_QCONNECTIVITY) << "connected to netd socket";
m_netdSocket = new QLocalSocket(this);
m_netdSocket->setSocketDescriptor(netdFd);
connect(m_netdSocket, SIGNAL(readyRead()), this, SLOT(handleNetdEvent()));
connect(m_netdSocket, SIGNAL(error(QLocalSocket::LocalSocketError)),
this, SLOT(handleError(QLocalSocket::LocalSocketError)));
} else {
- qWarning() << "QConnectivityDaemon: failed to connect to netd socket, reattempting...";
if (--m_attemptCount != 0)
QTimer::singleShot(200, this, SLOT(initNetdConnection()));
+ else
+ qCWarning(B2QT_QCONNECTIVITY) << "failed to connect to netd socket!";
return;
}
if (ethernetSupported()) {
@@ -245,7 +245,7 @@ void QConnectivityDaemon::setHostnamePropery(const char *interface) const
QByteArray macAddress(hwaddr, sizeof(hwaddr));
property_set(UNIQUE_HOSTNAME, macAddress.toHex().prepend("b2qt-").constData());
} else {
- qWarning() << "QConnectivityDaemon: failed to get MAC address";
+ qCWarning(B2QT_QCONNECTIVITY) << "failed to get MAC address";
}
ifc_close();
}
@@ -254,10 +254,10 @@ void QConnectivityDaemon::setHostnamePropery(const char *interface) const
void QConnectivityDaemon::sendCommand(const char *command) const
{
if (!m_netdSocket) {
- qDebug() << "QConnectivityDaemon: netd socket is not ready!";
+ qCDebug(B2QT_QCONNECTIVITY) << "netd socket is not ready!";
return;
}
- qDebug() << "QConnectivityDaemon: sending command - " << command;
+ qCDebug(B2QT_QCONNECTIVITY) << "sending command - " << command;
// netd expects "\0" terminated commands...
m_netdSocket->write(command, qstrlen(command) + 1);
m_netdSocket->flush();
@@ -288,7 +288,7 @@ void QConnectivityDaemon::handleInterfaceChange(const QList<QByteArray> &message
bool QConnectivityDaemon::startDhcp(bool renew, const char *interface)
{
- qDebug() << "QConnectivityDaemon: startDhcp [ renew" << renew << "] "
+ qCDebug(B2QT_QCONNECTIVITY) << "startDhcp [ renew" << renew << "] "
<< "interface: " << interface;
setHostnamePropery(interface);
@@ -319,7 +319,7 @@ bool QConnectivityDaemon::startDhcp(bool renew, const char *interface)
bool success = (result == 0) ? true : false;
if (success) {
- qDebug() << "\nipaddr: " << ipaddr << "\nprefixLength: " << prefixLength
+ qCDebug(B2QT_QCONNECTIVITY) << "\nipaddr: " << ipaddr << "\nprefixLength: " << prefixLength
<< "\ngateway: " << gateway << "\ndns1: " << dns1 << "\ndns2: " << dns2;
if (!renew) {
@@ -332,13 +332,17 @@ bool QConnectivityDaemon::startDhcp(bool renew, const char *interface)
ifc_configure(interface, _ipaddr.s_addr, prefixLength,
_gateway.s_addr, _dns1.s_addr, _dns2.s_addr);
- // set DNS servers for interface - see NetworkManagementService.java
- if (domain[0]) {
- QByteArray dnsForInterface("0 resolver setifdns ");
- dnsForInterface.append(interface).append(" ").append(domain).append(" ");
- dnsForInterface.append(dns1).append(" ").append(dns2);
- sendCommand(dnsForInterface.constData());
- }
+ // set DNS servers and domain for interface - see NetworkManagementService.java
+ QByteArray dnsForInterface("0 resolver setifdns ");
+ dnsForInterface.append(interface).append(" ");
+ if (domain[0])
+ dnsForInterface.append(domain);
+ else
+ dnsForInterface.append(" ");
+ dnsForInterface.append(" ");
+ dnsForInterface.append(dns1).append(" ").append(dns2);
+ sendCommand(dnsForInterface.constData());
+
// set default interface for DNS - see NetworkManagementService.java
sendCommand(QByteArray("0 resolver setdefaultif ").append(interface).constData());
@@ -348,7 +352,7 @@ bool QConnectivityDaemon::startDhcp(bool renew, const char *interface)
if (!m_isEmulator && lease >= 0) {
if (lease < MIN_RENEWAL_TIME_SECS) {
- qWarning() << "QConnectivityDaemon: DHCP server proposes lease time " << lease
+ qCWarning(B2QT_QCONNECTIVITY) << "DHCP server proposes lease time " << lease
<< "seconds. We will use" << MIN_RENEWAL_TIME_SECS << " seconds instead.";
lease = MIN_RENEWAL_TIME_SECS;
}
@@ -359,14 +363,14 @@ bool QConnectivityDaemon::startDhcp(bool renew, const char *interface)
m_leaseTimer->start(lease * 480);
}
} else {
- qWarning("QConnectivityDaemon: DHCP request failed - %s", dhcp_get_errmsg());
+ qCWarning(B2QT_QCONNECTIVITY, "DHCP request failed - %s", dhcp_get_errmsg());
if (renew) {
// If it fails to renew a lease (faulty server, proxy?) we re-connect.
// Some users might prefer to use expired lease over having interrupt
// in network connection
- if (QT_USE_EXPIRED_LEASE)
+ if (qEnvironmentVariableIsSet("QT_USE_EXPIRED_LEASE"))
return true;
- qDebug() << "QConnectivityDaemon: attempting to re-connect...";
+ qCDebug(B2QT_QCONNECTIVITY) << "attempting to re-connect...";
stopDhcp(interface);
startDhcp(false, interface);
}
@@ -376,7 +380,7 @@ bool QConnectivityDaemon::startDhcp(bool renew, const char *interface)
void QConnectivityDaemon::stopDhcp(const char *interface)
{
- qDebug() << "QConnectivityDaemon: stopDhcp: " << interface;
+ qCDebug(B2QT_QCONNECTIVITY) << "stopDhcp: " << interface;
ifc_clear_addresses(interface);
dhcp_stop(interface);
if (!m_isEmulator && m_leaseTimer->isActive())
@@ -392,8 +396,7 @@ bool QConnectivityDaemon::ethernetSupported() const
void QConnectivityDaemon::handleNetdEvent()
{
QByteArray data = m_netdSocket->readAll();
- if (QT_CONNECTIVITY_DEBUG)
- qDebug() << "QConnectivityDaemon: netd event: " << data;
+ qCDebug(B2QT_QCONNECTIVITY) << "netd event: " << data;
if (data.endsWith('\0'))
data.chop(1);
@@ -415,7 +418,7 @@ void QConnectivityDaemon::handleRequest()
if (requester->canReadLine()) {
QByteArray request = requester->readLine(requester->bytesAvailable());
- qDebug() << "QConnectivityDaemon: received a request: " << request;
+ qCDebug(B2QT_QCONNECTIVITY) << "received a request: " << request;
QList<QByteArray> cmd = request.split(' ');
if (cmd.size() < 2)
return;
@@ -452,13 +455,13 @@ void QConnectivityDaemon::sendReply(QLocalSocket *requester, const QByteArray &r
void QConnectivityDaemon::updateLease()
{
- qDebug() << "QConnectivityDaemon: updating lease";
+ qCDebug(B2QT_QCONNECTIVITY) << "updating lease";
startDhcp(true, m_leaseTimer->interface().constData());
}
void QConnectivityDaemon::handleError(QLocalSocket::LocalSocketError /*socketError*/) const
{
- qWarning() << "QConnectivityDaemon: QLocalSocket::LocalSocketError";
+ qCWarning(B2QT_QCONNECTIVITY) << "QLocalSocket::LocalSocketError";
}
int main(int argc, char *argv[])
diff --git a/src/utils/b2qtdevice.cpp b/src/utils/b2qtdevice.cpp
index 689b01f..da55a81 100644
--- a/src/utils/b2qtdevice.cpp
+++ b/src/utils/b2qtdevice.cpp
@@ -122,8 +122,9 @@ static void initLightDevices()
*
* Returns true on success.
*/
-bool B2QtDevice::setDisplayBrightness(quint8 value)
+bool B2QtDevice::setDisplayBrightness(int v)
{
+ quint8 value = qBound(0, v, 255);
#ifdef Q_OS_ANDROID_NO_SDK
const struct hw_module_t* module = 0;
if (hw_get_module(LIGHTS_HARDWARE_MODULE_ID, &module))
@@ -166,7 +167,7 @@ bool B2QtDevice::setDisplayBrightness(quint8 value)
* Returns the current backlight intensity.
* \sa setDisplayBrightness
*/
-quint8 B2QtDevice::displayBrightness() const
+int B2QtDevice::displayBrightness() const
{
#ifdef Q_OS_ANDROID_NO_SDK
QFile sysFile(QStringLiteral("/sys/class/leds/lcd-backlight/brightness"));
diff --git a/src/utils/b2qtdevice.h b/src/utils/b2qtdevice.h
index 0563e3f..952f67a 100644
--- a/src/utils/b2qtdevice.h
+++ b/src/utils/b2qtdevice.h
@@ -25,7 +25,7 @@ class Q_DECL_EXPORT B2QtDevice : public QObject
{
Q_OBJECT
- Q_PROPERTY(quint8 displayBrightness READ displayBrightness WRITE setDisplayBrightness NOTIFY displayBrightnessChanged)
+ Q_PROPERTY(int displayBrightness READ displayBrightness WRITE setDisplayBrightness NOTIFY displayBrightnessChanged)
Q_PROPERTY(QString hostname READ hostname WRITE setHostname NOTIFY hostnameChanged)
Q_PROPERTY(QString ipAddress READ getIPAddress NOTIFY ipAddressChanged)
Q_PROPERTY(int masterVolume READ masterVolume WRITE setMasterVolume NOTIFY masterVolumeChanged)
@@ -34,7 +34,7 @@ public:
B2QtDevice(QObject *parent = 0);
~B2QtDevice();
- quint8 displayBrightness() const;
+ int displayBrightness() const;
QString hostname() const;
QString getIPAddress() const;
int masterVolume() const;
@@ -45,12 +45,12 @@ public Q_SLOTS:
void reboot();
void powerOff();
- bool setDisplayBrightness(quint8 value);
+ bool setDisplayBrightness(int value);
bool setHostname(const QString &name);
void setMasterVolume(int volume);
signals:
- void displayBrightnessChanged(quint8 newValue);
+ void displayBrightnessChanged(int newValue);
void hostnameChanged(const QString &newName);
void ipAddressChanged(const QString &newAddress);
void masterVolumeChanged(int newVolume);
diff --git a/src/wifi/qwificonfiguration.cpp b/src/wifi/qwificonfiguration.cpp
index 42196a2..b532620 100644
--- a/src/wifi/qwificonfiguration.cpp
+++ b/src/wifi/qwificonfiguration.cpp
@@ -31,10 +31,12 @@ public:
QString m_ssid;
QString m_psk;
QString m_protocol;
+ bool m_ssidHidden;
};
QWifiConfigurationPrivate::QWifiConfigurationPrivate(QWifiConfiguration *config)
: q_ptr(config)
+ , m_ssidHidden(false)
{
}
@@ -119,4 +121,26 @@ void QWifiConfiguration::setProtocol(const QString &protocol)
d->m_protocol = protocol;
}
+/*!
+ \property QWifiConfiguration::ssidHidden
+ \brief Holds whether a Wifi access point broadcasts its SSID
+
+ If a Wifi access point does not broadcast its SSID, setting this
+ property to \c true ensures that the Wifi backend can detect the
+ specified network.
+
+ By default this property is set to \c false.
+*/
+bool QWifiConfiguration::isSsidHidden() const
+{
+ Q_D(const QWifiConfiguration);
+ return d->m_ssidHidden;
+}
+
+void QWifiConfiguration::setSsidHidden(bool hidden)
+{
+ Q_D(QWifiConfiguration);
+ d->m_ssidHidden = hidden;
+}
+
QT_END_NAMESPACE
diff --git a/src/wifi/qwificonfiguration.h b/src/wifi/qwificonfiguration.h
index 9b03c9e..cdeb453 100644
--- a/src/wifi/qwificonfiguration.h
+++ b/src/wifi/qwificonfiguration.h
@@ -32,6 +32,7 @@ class Q_DECL_EXPORT QWifiConfiguration : public QObject
Q_PROPERTY(QString ssid READ ssid WRITE setSsid)
Q_PROPERTY(QString passphrase READ passphrase WRITE setPassphrase)
Q_PROPERTY(QString protocol READ protocol WRITE setProtocol)
+ Q_PROPERTY(bool ssidHidden READ isSsidHidden WRITE setSsidHidden)
public:
explicit QWifiConfiguration(QObject *parent = 0);
virtual ~QWifiConfiguration();
@@ -42,6 +43,8 @@ public:
QString passphrase() const;
void setProtocol(const QString &protocol);
QString protocol() const;
+ void setSsidHidden(bool hidden);
+ bool isSsidHidden() const;
private:
Q_DISABLE_COPY(QWifiConfiguration)
diff --git a/src/wifi/qwificontroller.cpp b/src/wifi/qwificontroller.cpp
index ea49764..7b8be80 100644
--- a/src/wifi/qwificontroller.cpp
+++ b/src/wifi/qwificontroller.cpp
@@ -33,7 +33,7 @@
#ifdef Q_OS_ANDROID_NO_SDK
/*
- * Work API differences between Android versions
+ * Workaround API differences between Android versions
*/
int q_wifi_start_supplicant()
{
@@ -129,21 +129,6 @@ QT_BEGIN_NAMESPACE
Q_LOGGING_CATEGORY(B2QT_WIFI, "qt.b2qt.wifi")
-class QWifiManagerEvent : public QEvent
-{
-public:
- QWifiManagerEvent(QEvent::Type type, const QByteArray &data = QByteArray())
- : QEvent(type)
- , m_data(data)
- {
- }
-
- QByteArray data() const { return m_data; }
-
-private:
- QByteArray m_data;
-};
-
class QWifiEventThread : public QThread
{
public:
@@ -155,7 +140,7 @@ public:
void run() {
qCDebug(B2QT_WIFI) << "running wifi event thread";
- QWifiManagerEvent *event = 0;
+ QWifiEvent *event = 0;
char buffer[2048];
forever {
int size = q_wifi_wait_for_event(m_interface, buffer, sizeof(buffer) - 1);
@@ -163,21 +148,24 @@ public:
buffer[size] = 0;
event = 0;
qCDebug(B2QT_WIFI) << "[event]: " << buffer;
+
if (m_controller->isWifiThreadExitRequested()) {
qCDebug(B2QT_WIFI) << "exit wifi event thread";
return;
}
+
if (strstr(buffer, "SCAN-RESULTS")) {
- event = new QWifiManagerEvent(WIFI_SCAN_RESULTS);
+ event = new QWifiEvent(WIFI_SCAN_RESULTS);
} else if (strstr(buffer, "CTRL-EVENT-CONNECTED")) {
- event = new QWifiManagerEvent(WIFI_CONNECTED);
+ event = new QWifiEvent(WIFI_CONNECTED);
} else if (strstr(buffer, "CTRL-EVENT-DISCONNECTED")) {
- event = new QWifiManagerEvent(WIFI_DISCONNECTED);
+ event = new QWifiEvent(WIFI_DISCONNECTED);
} else if (strstr(buffer, "Trying to associate")) {
- event = new QWifiManagerEvent(WIFI_AUTHENTICATING);
+ event = new QWifiEvent(WIFI_AUTHENTICATING, QLatin1String(buffer));
} else if (strstr(buffer, "Handshake failed")) {
- event = new QWifiManagerEvent(WIFI_HANDSHAKE_FAILED);
+ event = new QWifiEvent(WIFI_HANDSHAKE_FAILED);
}
+
if (event)
QCoreApplication::postEvent(m_controller->wifiManager(), event);
}
@@ -272,12 +260,12 @@ void QWifiController::initializeBackend()
{
qCDebug(B2QT_WIFI) << "initializing wifi backend";
emit backendStateChanged(QWifiManager::Initializing);
-
+ bool initFailed = false;
#ifdef Q_OS_ANDROID_NO_SDK
qCDebug(B2QT_WIFI) << "initialize driver";
if (!(is_wifi_driver_loaded() || wifi_load_driver() == 0)) {
qCWarning(B2QT_WIFI) << "failed to load a driver";
- return;
+ initFailed = true;
}
#else
qCDebug(B2QT_WIFI) << "run ifconfig (up)";
@@ -286,39 +274,42 @@ void QWifiController::initializeBackend()
ifconfig.waitForFinished();
if (ifconfig.exitStatus() != QProcess::NormalExit && ifconfig.exitCode() != 0) {
qCWarning(B2QT_WIFI) << "failed to bring up wifi interface!";
- return;
+ initFailed = true;
}
#endif
- resetSupplicantSocket();
- startWifiEventThread();
- qCDebug(B2QT_WIFI) << "wifi backend started successfully";
- emit backendStateChanged(QWifiManager::Running);
+ if (!initFailed && resetSupplicantSocket()) {
+ qCDebug(B2QT_WIFI) << "wifi backend started successfully";
+ emit backendStateChanged(QWifiManager::Running);
+ } else {
+ emit backendStateChanged(QWifiManager::NotRunning);
+ }
}
-void QWifiController::resetSupplicantSocket() const
+bool QWifiController::resetSupplicantSocket()
{
qCDebug(B2QT_WIFI) << "reset supplicant socket";
- // close down the previous connection to supplicant if
- // one exists before re-connecting.
+ exitWifiEventThread();
if (q_wifi_stop_supplicant() < 0)
qCWarning(B2QT_WIFI) << "failed to stop supplicant!";
q_wifi_close_supplicant_connection(m_interface);
qCDebug(B2QT_WIFI) << "start supplicant";
if (q_wifi_start_supplicant() != 0) {
qCWarning(B2QT_WIFI) << "failed to start a supplicant!";
- return;
+ return false;
}
#ifdef Q_OS_ANDROID_NO_SDK
if (wait_for_property("init.svc.wpa_supplicant", "running", 5) < 0) {
qCWarning(B2QT_WIFI) << "timed out waiting for supplicant to start!";
- return;
+ return false;
}
#endif
qCDebug(B2QT_WIFI) << "connect to supplicant";
if (q_wifi_connect_to_supplicant(m_interface) != 0) {
qCWarning(B2QT_WIFI) << "failed to connect to a supplicant!";
- return;
+ return false;
}
+ startWifiEventThread();
+ return true;
}
void QWifiController::terminateBackend()
@@ -334,10 +325,8 @@ void QWifiController::terminateBackend()
QProcess ifconfig;
ifconfig.start(QStringLiteral("ifconfig"), QStringList() << QLatin1String(m_interface) << QStringLiteral("down"));
ifconfig.waitForFinished();
- if (ifconfig.exitStatus() != QProcess::NormalExit && ifconfig.exitCode() != 0) {
+ if (ifconfig.exitStatus() != QProcess::NormalExit && ifconfig.exitCode() != 0)
qCWarning(B2QT_WIFI) << "failed to bring down wifi interface!";
- return;
- }
#endif
stopDhcp();
qCDebug(B2QT_WIFI) << "wifi backend stopped successfully";
@@ -355,7 +344,8 @@ void QWifiController::exitWifiEventThread()
if (m_eventThread->isRunning()) {
m_exitEventThread = true;
m_managerPrivate->call(QStringLiteral("SCAN"));
- m_eventThread->wait();
+ if (!m_eventThread->wait(8000))
+ qCWarning(B2QT_WIFI, "timed out waiting for wifi event thread to exit!");
}
}
diff --git a/src/wifi/qwificontroller_p.h b/src/wifi/qwificontroller_p.h
index 230b7c8..185cff9 100644
--- a/src/wifi/qwificontroller_p.h
+++ b/src/wifi/qwificontroller_p.h
@@ -62,6 +62,20 @@ class QWifiEventThread;
class QLocalSocket;
#endif
+class QWifiEvent : public QEvent
+{
+public:
+ QWifiEvent(QEvent::Type type, const QString &data = QString())
+ : QEvent(type)
+ , m_data(data)
+ {
+ }
+ QString data() const { return m_data; }
+
+private:
+ QString m_data;
+};
+
class QWifiController : public QThread
{
Q_OBJECT
@@ -83,7 +97,7 @@ public:
void startWifiEventThread();
void acquireIPAddress();
void stopDhcp() const;
- void resetSupplicantSocket() const;
+ bool resetSupplicantSocket();
signals:
void backendStateChanged(QWifiManager::BackendState backendState);
diff --git a/src/wifi/qwifielinux.cpp b/src/wifi/qwifielinux.cpp
index 0dc3a39..e7dabb3 100644
--- a/src/wifi/qwifielinux.cpp
+++ b/src/wifi/qwifielinux.cpp
@@ -38,7 +38,6 @@ static struct wpa_ctrl *ctrl_conn;
static struct wpa_ctrl *monitor_conn;
// socket pair used to exit from a blocking read
static int exit_sockets[2];
-QByteArray ctrlInterface;
int wifi_connect_on_socket_path(const char *path);
int wifi_ctrl_recv(char *reply, size_t *reply_len);
@@ -46,12 +45,33 @@ int wifi_wait_on_socket(char *buf, size_t buflen);
int wifi_send_command(const char *cmd, char *reply, size_t *reply_len);
void wifi_close_sockets();
+QByteArray controlInterfacePath()
+{
+ QByteArray path;
+ QFile configFile;
+ configFile.setFileName(QLatin1String(SUPP_CONFIG_FILE));
+ if (configFile.open(QFile::ReadOnly)) {
+ while (!configFile.atEnd()) {
+ QByteArray line = configFile.readLine().trimmed();
+ if (line.startsWith("ctrl_interface")) {
+ path = line.mid(16);
+ if (path.isEmpty())
+ qCWarning(B2QT_WIFI) << "ctrl_interface is not set in " << SUPP_CONFIG_FILE;
+ break;
+ }
+ }
+ configFile.close();
+ } else {
+ qCWarning(B2QT_WIFI) << "could not find/read wpa_supplicant configuration file in" << SUPP_CONFIG_FILE;
+ }
+ return path;
+}
+
int q_wifi_start_supplicant()
{
- // #### TODO - if "/etc/wpa_supplicant/driver.$IFACE" exists, read driver name from there
QByteArray ifc = QWifiDevice::wifiInterfaceName();
- QString driver(QStringLiteral("wext"));
QString pidFile = QLatin1String("/var/run/wpa_supplicant." + ifc + ".pid");
+ QString driver(QStringLiteral("nl80211,wext"));
QStringList arg;
arg << QStringLiteral("--start") << QStringLiteral("--quiet") << QStringLiteral("--name");
@@ -64,33 +84,14 @@ int q_wifi_start_supplicant()
QProcess ssDaemon;
ssDaemon.start(QStringLiteral("start-stop-daemon"), arg);
ssDaemon.waitForFinished();
- if (ssDaemon.exitStatus() != QProcess::NormalExit && ssDaemon.exitCode() != 0) {
- qCWarning(B2QT_WIFI) << "failed to start a supplicant process!";
+
+ QByteArray path = controlInterfacePath();
+ if (path.isEmpty())
return -1;
- }
- QFile configFile;
- configFile.setFileName(QLatin1String(SUPP_CONFIG_FILE));
- if (configFile.exists() && configFile.open(QFile::ReadOnly)) {
- ctrlInterface.clear();
- while (!configFile.atEnd()) {
- QByteArray line = configFile.readLine().trimmed();
- if (line.startsWith("ctrl_interface")) {
- ctrlInterface = line.mid(16);
- break;
- }
- }
- configFile.close();
- if (!ctrlInterface.isEmpty()) {
- // if the interface socket exists, then wpa_supplicant was invoked successfully
- if (!QFile(QLatin1String(ctrlInterface + "/" + ifc)).exists())
- return -1;
- } else {
- qCWarning(B2QT_WIFI) << "ctrl_interface is not set in " << SUPP_CONFIG_FILE;
- return -1;
- }
- } else {
- qCWarning(B2QT_WIFI) << "could not find/read wpa_supplicant configuration file in" << SUPP_CONFIG_FILE;
+ // if the interface socket exists then wpa-supplicant was invoked successfully
+ if (!QFile(QLatin1String(path + "/" + ifc)).exists()) {
+ qCWarning(B2QT_WIFI) << "failed to invoke wpa_supplicant!\n" << ssDaemon.readAll();
return -1;
}
// reset sockets used for exiting from hung state
@@ -102,19 +103,29 @@ int q_wifi_stop_supplicant()
{
QByteArray ifc = QWifiDevice::wifiInterfaceName();
QString pidFile = QLatin1String("/var/run/wpa_supplicant." + ifc + ".pid");
- QStringList arg;
- arg << QStringLiteral("--stop") << QStringLiteral("--quiet") << QStringLiteral("--name");
- arg << QStringLiteral("wpa_supplicant") << QStringLiteral("--pidfile") << pidFile;
- QProcess ssDaemon;
- ssDaemon.start(QStringLiteral("start-stop-daemon"), arg);
- ssDaemon.waitForFinished();
- if (ssDaemon.exitStatus() != QProcess::NormalExit && ssDaemon.exitCode() != 0) {
- qCWarning(B2QT_WIFI) << "failed to stop a supplicant process!";
- return -1;
+
+ if (QFile(pidFile).exists()) {
+ QStringList arg;
+ arg << QStringLiteral("--stop") << QStringLiteral("--quiet") << QStringLiteral("--name");
+ arg << QStringLiteral("wpa_supplicant") << QStringLiteral("--pidfile") << pidFile;
+
+ QProcess ssDaemon;
+ ssDaemon.start(QStringLiteral("start-stop-daemon"), arg);
+ ssDaemon.waitForFinished();
+ if (ssDaemon.exitStatus() != QProcess::NormalExit) {
+ qCWarning(B2QT_WIFI) << "failed to stop a supplicant process!\n" << ssDaemon.readAll();;
+ return -1;
+ }
+
+ QFile::remove(pidFile);
}
- QFile::remove(QLatin1String(ctrlInterface + "/" + ifc));
- QFile::remove(pidFile);
+ QByteArray path = controlInterfacePath();
+ if (path.isEmpty())
+ return -1;
+
+ QFile::remove(QLatin1String(path + "/" + ifc));
+
return 0;
}
diff --git a/src/wifi/qwifimanager.cpp b/src/wifi/qwifimanager.cpp
index e971fd1..2a5cfff 100644
--- a/src/wifi/qwifimanager.cpp
+++ b/src/wifi/qwifimanager.cpp
@@ -20,6 +20,8 @@
#include "qwifinetworklistmodel_p.h"
#include "qwifinetwork_p.h"
#include "qwifimanager_p.h"
+#include "qwifiutils_p.h"
+
#include "qwifidevice.h"
#include <QtCore/QFile>
@@ -40,7 +42,6 @@ QWifiManagerPrivate::QWifiManagerPrivate(QWifiManager *manager)
, m_interface(QWifiDevice::wifiInterfaceName())
, m_backendState(QWifiManager::NotRunning)
, m_networkState(QWifiManager::Disconnected)
- , m_setCurrentSSID(true)
{
qCDebug(B2QT_WIFI) << "using wifi interface: " << m_interface;
}
@@ -51,54 +52,29 @@ QWifiManagerPrivate::~QWifiManagerPrivate()
delete m_networkListModel;
}
-QString QWifiManagerPrivate::getConnectedNetwork()
-{
- QStringList lists = call(QStringLiteral("LIST_NETWORKS")).split('\n');
- QString connectedNetwork;
- for (int i = 1; i < lists.size(); ++i) {
- if (lists.at(i).toUpper().contains(QStringLiteral("[CURRENT]"))) {
- connectedNetwork = lists.at(i);
- break;
- }
- }
- return connectedNetwork;
-}
-
-void QWifiManagerPrivate::emitCurrentSSIDChanged()
+void QWifiManagerPrivate::setCurrentSSID(const QString &ssid)
{
Q_Q(QWifiManager);
- if (m_previousSSID != m_currentSSID) {
- qCDebug(B2QT_WIFI) << "current SSID: " << m_previousSSID << " -> " << m_currentSSID;
- m_previousSSID = m_currentSSID;
- emit q->currentSSIDChanged(m_currentSSID);
- }
+ qCDebug(B2QT_WIFI) << "current SSID: " << m_currentSSID << " -> " << ssid;
+ if (m_currentSSID == ssid)
+ return;
+
+ m_currentSSID = ssid;
+ emit q->currentSSIDChanged(m_currentSSID);
}
-void QWifiManagerPrivate::setCurrentSSID()
+void QWifiManagerPrivate::handleAuthenticating(QWifiEvent *event)
{
- qCDebug(B2QT_WIFI, "setCurrentSSID");
- m_setCurrentSSID = false;
- QString connectedNetwork = getConnectedNetwork();
- if (!connectedNetwork.isEmpty()) {
- QString ssid = connectedNetwork.split('\t').at(1);
- QWifiNetwork *network = m_networkListModel->networkForSSID(ssid);
- if (network) {
- m_currentSSID = network->ssid();
- emitCurrentSSIDChanged();
- if (call(QStringLiteral("STATUS")).contains(QStringLiteral("wpa_state=COMPLETED")))
- updateNetworkState(QWifiManager::Connected);
- }
- }
+ QString data = event->data().trimmed();
+ QString ssid = data.mid(data.indexOf(QLatin1String("SSID")) + 6);
+ ssid = ssid.left(ssid.lastIndexOf(QLatin1Char('\'')));
+
+ setCurrentSSID(QWifiUtils::decodeHexEncoded(ssid));
+ updateNetworkState(QWifiManager::Authenticating);
}
void QWifiManagerPrivate::handleConnected()
{
- qCDebug(B2QT_WIFI, "handleConnected");
- QString connectedNetwork = getConnectedNetwork();
- if (connectedNetwork.isEmpty())
- return;
-
- m_currentSSID = connectedNetwork.split('\t').at(1);
qCDebug(B2QT_WIFI) << "connected network: " << m_currentSSID;
updateNetworkState(QWifiManager::ObtainingIPAddress);
m_wifiController->call(QWifiController::AcquireIPAddress);
@@ -147,11 +123,8 @@ void QWifiManagerPrivate::updateWifiState()
if (ps.readAll().contains("wpa_supplicant"))
supplicantRunning = true;
#endif
- if (supplicantRunning) {
- m_wifiController->resetSupplicantSocket();
- m_wifiController->startWifiEventThread();
+ if (supplicantRunning && m_wifiController->resetSupplicantSocket())
m_backendState = QWifiManager::Running;
- }
}
QString QWifiManagerPrivate::call(const QString &command)
@@ -168,20 +141,21 @@ QString QWifiManagerPrivate::call(const QString &command)
actualCommand.prepend(prefix);
#endif
#endif
- if (q_wifi_command(m_interface, actualCommand.toLatin1(), data, &len) < 0) {
- qCDebug(B2QT_WIFI) << "call to supplicant failed: " << actualCommand;
+ qCDebug(B2QT_WIFI) << "call command: " << actualCommand.toLocal8Bit();
+ if (q_wifi_command(m_interface, actualCommand.toLocal8Bit(), data, &len) < 0) {
+ qCDebug(B2QT_WIFI) << "call to supplicant failed!";
return QString();
}
if (len < sizeof(data))
data[len] = 0;
QString result = QLatin1String(data);
- return result;
+ return result.trimmed();
}
bool QWifiManagerPrivate::checkedCall(const QString &command)
{
- return call(command).trimmed().toUpper() == QLatin1String("OK");
+ return call(command).toUpper() == QLatin1String("OK");
}
void QWifiManagerPrivate::updateLastError(const QString &error)
@@ -238,11 +212,11 @@ void QWifiManagerPrivate::updateLastError(const QString &error)
\value SSID informal (human) name of a Wifi network (QString)
\value BSSID basic service set identification of a network, used to uniquely identify BSS (QString)
- \value SignalStrength strength of a Wifi signal, measured in dBm (int)
- \value WPASupported holds whether network access point supports WPA security protocol (QString)
- \value WPA2Supported holds whether network access point supports WPA2 security protocol (QString)
- \value WEPSupported holds whether network access point supports WEP security protocol (QString)
- \value WPSSupported holds whether network access point supports WPS security protocol (QString)
+ \value SignalStrength strength of a Wifi signal represented as percentage (0-100) (int)
+ \value WPASupported holds whether network access point supports WPA security protocol (bool)
+ \value WPA2Supported holds whether network access point supports WPA2 security protocol (bool)
+ \value WEPSupported holds whether network access point supports WEP security protocol (bool)
+ \value WPSSupported holds whether network access point supports WPS security protocol (bool)
*/
QWifiManager* QWifiManager::m_instance = 0;
@@ -424,8 +398,6 @@ bool QWifiManager::event(QEvent *event)
switch ((int) event->type()) {
case WIFI_SCAN_RESULTS:
d->m_networkListModel->parseScanResults(d->call(QStringLiteral("SCAN_RESULTS")));
- if (d->m_setCurrentSSID || d->m_currentSSID.isEmpty())
- d->setCurrentSSID();
return true;
case WIFI_CONNECTED:
d->handleConnected();
@@ -434,11 +406,10 @@ bool QWifiManager::event(QEvent *event)
d->handleDisconneced();
return true;
case WIFI_AUTHENTICATING:
- d->updateNetworkState(Authenticating);
- d->emitCurrentSSIDChanged();
+ d->handleAuthenticating(static_cast<QWifiEvent *>(event));
return true;
case WIFI_HANDSHAKE_FAILED:
- d->updateNetworkState(HandshakeFailed);
+ d->updateNetworkState(QWifiManager::HandshakeFailed);
return true;
case QEvent::Timer: {
int tid = static_cast<QTimerEvent *>(event)->timerId();
@@ -469,15 +440,16 @@ bool QWifiManager::connect(QWifiConfiguration *config)
}
d->call(QStringLiteral("DISABLE_NETWORK all"));
+ d->setCurrentSSID(config->ssid());
- d->m_currentSSID = config->ssid();
bool networkKnown = false;
QString id;
- QString listResult = d->call(QStringLiteral("LIST_NETWORKS"));
- QStringList lines = listResult.split('\n');
- foreach (const QString &line, lines) {
- if (line.contains(d->m_currentSSID)) {
- id = line.split('\t').at(0);
+ const QStringList configuredNetworks = d->call(QStringLiteral("LIST_NETWORKS")).split('\n');
+ for (int i = 1; i < configuredNetworks.length(); ++i) {
+ const QStringList networkFields = configuredNetworks.at(i).split('\t');
+ const QString ssid = QWifiUtils::decodeHexEncoded(networkFields.at(1));
+ if (ssid == d->m_currentSSID) {
+ id = networkFields.at(0);
networkKnown = true;
break;
}
@@ -485,7 +457,7 @@ bool QWifiManager::connect(QWifiConfiguration *config)
if (!networkKnown) {
bool ok;
- id = d->call(QStringLiteral("ADD_NETWORK")).trimmed();
+ id = d->call(QStringLiteral("ADD_NETWORK"));
id.toInt(&ok);
if (!ok) {
d->updateLastError(QStringLiteral("failed to add network!"));
@@ -503,7 +475,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.
@@ -517,6 +493,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)
@@ -547,9 +527,6 @@ void QWifiManager::handleBackendStateChanged(BackendState backendState)
{
Q_D(QWifiManager);
switch (backendState) {
- case Running:
- d->m_setCurrentSSID = true;
- break;
case NotRunning:
d->updateNetworkState(Disconnected);
break;
@@ -564,7 +541,6 @@ void QWifiManager::handleDhcpRequestFinished(const QString &status)
Q_D(QWifiManager);
qCDebug(B2QT_WIFI) << "handleDhcpRequestFinished: " << status << " for " << d->m_currentSSID;
if (status == QLatin1String("success")) {
- d->emitCurrentSSIDChanged();
d->updateNetworkState(Connected);
d->call(QStringLiteral("SAVE_CONFIG"));
} else {
diff --git a/src/wifi/qwifimanager_p.h b/src/wifi/qwifimanager_p.h
index ef8a0da..6142c83 100644
--- a/src/wifi/qwifimanager_p.h
+++ b/src/wifi/qwifimanager_p.h
@@ -25,6 +25,8 @@
QT_BEGIN_NAMESPACE
+class QWifiEvent;
+
class QWifiManagerPrivate
{
Q_DECLARE_PUBLIC(QWifiManager)
@@ -33,11 +35,10 @@ public:
virtual ~QWifiManagerPrivate();
// methods
- QString getConnectedNetwork();
- void setCurrentSSID();
- void emitCurrentSSIDChanged();
+ void setCurrentSSID(const QString &ssid);
void handleConnected();
void handleDisconneced();
+ void handleAuthenticating(QWifiEvent *event);
void updateNetworkState(QWifiManager::NetworkState networkState);
void updateBackendState(QWifiManager::BackendState backendState);
@@ -57,9 +58,7 @@ public:
QByteArray m_interface;
QWifiManager::BackendState m_backendState;
QWifiManager::NetworkState m_networkState;
- bool m_setCurrentSSID;
QString m_currentSSID;
- QString m_previousSSID;
QString m_lastError;
};
diff --git a/src/wifi/qwifinetworklistmodel.cpp b/src/wifi/qwifinetworklistmodel.cpp
index 6f53295..9d6202f 100644
--- a/src/wifi/qwifinetworklistmodel.cpp
+++ b/src/wifi/qwifinetworklistmodel.cpp
@@ -18,6 +18,7 @@
****************************************************************************/
#include "qwifinetworklistmodel_p.h"
#include "qwifinetwork_p.h"
+#include "qwifiutils_p.h"
#include "qwifimanager.h"
@@ -123,14 +124,24 @@ void QWifiNetworkListModel::parseScanResults(const QString &results)
continue;
int pos = 0;
- QString ssid = info.at(4);
+ QString ssid = QWifiUtils::decodeHexEncoded(info.at(4));
+ if (ssid.isEmpty())
+ continue;
+
sensibleNetworks.insert(ssid);
QWifiNetwork *knownNetwork = networkForSSID(ssid, &pos);
if (!knownNetwork)
knownNetwork = outOfRangeListContains(ssid);
- // signal strength is in dBm. Deprecated, but still widely used "wext"
- // wifi driver reports positive values for signal strength, we workaround that.
- int signalStrength = qAbs(info.at(2).trimmed().toInt()) * -1;
+
+ int signalStrength = info.at(2).trimmed().toInt();
+ if (signalStrength < 0) {
+ // signal is reported in dBm, rough conversion: best = -40, worst = -100
+ int val = qAbs(qMax(-100, qMin(signalStrength, -40)) + 40); // clamp and normalize to 0
+ signalStrength = 100 - (int) ((100.0 * (double) val) / 60.0);
+ } else if (signalStrength > 100) {
+ qCWarning(B2QT_WIFI) << "unexpected value for a signal level: " << signalStrength;
+ }
+
if (!knownNetwork) {
QWifiNetwork *network = new QWifiNetwork();
network->setOutOfRange(false);
diff --git a/src/wifi/qwifiutils.cpp b/src/wifi/qwifiutils.cpp
new file mode 100644
index 0000000..21c440b
--- /dev/null
+++ b/src/wifi/qwifiutils.cpp
@@ -0,0 +1,135 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 Digia Plc
+** All rights reserved.
+** For any questions to Digia, please use the contact form at
+** http://www.qt.io
+**
+** This file is part of Qt Enterprise Embedded.
+**
+** Licensees holding valid Qt Enterprise licenses may use this file in
+** accordance with the Qt Enterprise License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.
+**
+** If you have questions regarding the use of this file, please use
+** the contact form at http://www.qt.io
+**
+****************************************************************************/
+#include "qwifiutils_p.h"
+
+QT_BEGIN_NAMESPACE
+
+int QWifiUtils::hex2num(char c)
+{
+ if (c >= '0' && c <= '9')
+ return c - '0';
+ if (c >= 'a' && c <= 'f')
+ return c - 'a' + 10;
+ if (c >= 'A' && c <= 'F')
+ return c - 'A' + 10;
+ return -1;
+}
+
+int QWifiUtils::hex2byte(const char *hex)
+{
+ int a, b;
+ a = hex2num(*hex++);
+ if (a < 0)
+ return -1;
+ b = hex2num(*hex++);
+ if (b < 0)
+ return -1;
+ return (a << 4) | b;
+}
+
+// the logic of this function is taken from wpa_supplicant source code (BSD
+// licensed code) see http://w1.fi/cgit file hostapd/src/utils/common.c
+// For Ascii encoded string, any octet < 32 or > 127 is encoded as a "\x"
+// followed by the hex representation of the octet. Exception chars are ",
+// \, \e, \n, \r, \t which are escaped by a backslash
+QString QWifiUtils::decodeHexEncoded(const QString &encoded)
+{
+ int maxlen = encoded.size() + 1;
+ QByteArray buf;
+ buf.resize(maxlen);
+ const char *pos = encoded.toLocal8Bit().constData();
+ int len = 0;
+ int val;
+
+ while (*pos) {
+ if (len + 1 >= maxlen)
+ break;
+ switch (*pos) {
+ case '\\':
+ pos++;
+ switch (*pos) {
+ case '\\':
+ buf[len++] = '\\';
+ pos++;
+ break;
+ case '"':
+ buf[len++] = '"';
+ pos++;
+ break;
+ case 'n':
+ buf[len++] = '\n';
+ pos++;
+ break;
+ case 'r':
+ buf[len++] = '\r';
+ pos++;
+ break;
+ case 't':
+ buf[len++] = '\t';
+ pos++;
+ break;
+ case 'e':
+ buf[len++] = '\033';
+ pos++;
+ break;
+ case 'x':
+ pos++;
+ val = hex2byte(pos);
+ if (val < 0) {
+ val = hex2num(*pos);
+ if (val < 0)
+ break;
+ buf[len++] = val;
+ pos++;
+ } else {
+ buf[len++] = val;
+ pos += 2;
+ }
+ break;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ val = *pos++ - '0';
+ if (*pos >= '0' && *pos <= '7')
+ val = val * 8 + (*pos++ - '0');
+ if (*pos >= '0' && *pos <= '7')
+ val = val * 8 + (*pos++ - '0');
+ buf[len++] = val;
+ break;
+ default:
+ break;
+ }
+ break;
+ default:
+ buf[len++] = *pos++;
+ break;
+ }
+ }
+ if (maxlen > len)
+ buf[len] = '\0';
+
+ return QString::fromUtf8(buf);
+}
+
+QT_END_NAMESPACE
diff --git a/src/wifi/qwifiutils_p.h b/src/wifi/qwifiutils_p.h
new file mode 100644
index 0000000..8b3e54a
--- /dev/null
+++ b/src/wifi/qwifiutils_p.h
@@ -0,0 +1,37 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 Digia Plc
+** All rights reserved.
+** For any questions to Digia, please use the contact form at
+** http://www.qt.io
+**
+** This file is part of Qt Enterprise Embedded.
+**
+** Licensees holding valid Qt Enterprise licenses may use this file in
+** accordance with the Qt Enterprise License Agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and Digia.
+**
+** If you have questions regarding the use of this file, please use
+** the contact form at http://www.qt.io
+**
+****************************************************************************/
+#ifndef QWIFIUTILS_H
+#define QWIFIUTILS_H
+
+#include <QtCore/QString>
+
+QT_BEGIN_NAMESPACE
+
+class QWifiUtils
+{
+public:
+ static int hex2num(char c);
+ static int hex2byte(const char *hex);
+
+ static QString decodeHexEncoded(const QString &encoded);
+};
+
+QT_END_NAMESPACE
+
+#endif // QWIFIUTILS_H
diff --git a/src/wifi/wifi.pro b/src/wifi/wifi.pro
index e558081..f248774 100644
--- a/src/wifi/wifi.pro
+++ b/src/wifi/wifi.pro
@@ -16,7 +16,8 @@ HEADERS += \
$$PWD/qwifinetworklistmodel_p.h \
$$PWD/qwificontroller_p.h \
$$PWD/qwifidevice.h \
- $$PWD/qwificonfiguration.h
+ $$PWD/qwificonfiguration.h \
+ $$PWD/qwifiutils_p.h
SOURCES += \
$$PWD/qwifimanager.cpp \
@@ -24,7 +25,8 @@ SOURCES += \
$$PWD/qwifinetworklistmodel.cpp \
$$PWD/qwificontroller.cpp \
$$PWD/qwifidevice.cpp \
- $$PWD/qwificonfiguration.cpp
+ $$PWD/qwificonfiguration.cpp \
+ $$PWD/qwifiutils.cpp
android: {
LIBS += -lhardware_legacy -lcutils