From 2d0cdf6753fc1801929f4cad5bc97021b22723bd Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Fri, 23 May 2014 10:31:57 +0200 Subject: Add plugins.qmltypes for Wi-Fi library This fixes autocompletion issue in QtCreator. Task-number: QTEE-568 Change-Id: I186a5777e54d8629fd896bd1ee677ac359373a17 Reviewed-by: Oswald Buddenhagen Reviewed-by: Eirik Aavitsland --- src/imports/wifi/plugins.qmltypes | 60 +++++++++++++++++++++++++++++++++++++++ src/imports/wifi/qmldir | 1 + 2 files changed, 61 insertions(+) create mode 100644 src/imports/wifi/plugins.qmltypes (limited to 'src') diff --git a/src/imports/wifi/plugins.qmltypes b/src/imports/wifi/plugins.qmltypes new file mode 100644 index 0000000..6667fcb --- /dev/null +++ b/src/imports/wifi/plugins.qmltypes @@ -0,0 +1,60 @@ +import QtQuick.tooling 1.1 + +// This file describes the plugin-supplied types contained in the library. +// It is used for QML tooling purposes only. +// +// This file was auto-generated by: +// 'qmlplugindump -nonrelocatable Qt.labs.wifi 0.1 /system/qml/Qt/labs/wifi/' + +Module { + Component { + name: "QWifiGlobal" + prototype: "QObject" + exports: ["Qt.labs.wifi/Interface 0.1"] + exportMetaObjectRevisions: [0] + Method { name: "wifiSupported"; type: "bool" } + } + Component { + name: "QWifiManager" + prototype: "QObject" + exports: ["Qt.labs.wifi/WifiManager 0.1"] + exportMetaObjectRevisions: [0] + Enum { + name: "NetworkState" + values: { + "Disconnected": 0, + "Authenticating": 1, + "HandshakeFailed": 2, + "ObtainingIPAddress": 3, + "DhcpRequestFailed": 4, + "Connected": 5 + } + } + Property { name: "networkState"; type: "NetworkState"; isReadonly: true } + Property { name: "backendReady"; type: "bool"; isReadonly: true } + Property { name: "scanning"; type: "bool" } + Property { name: "connectedSSID"; type: "string"; isReadonly: true } + Property { name: "networks"; type: "QWifiNetworkListModel"; isReadonly: true; isPointer: true } + Signal { + name: "scanningChanged" + Parameter { name: "scanning"; type: "bool" } + } + Signal { + name: "networkStateChanged" + Parameter { name: "network"; type: "QWifiNetwork"; isPointer: true } + } + Signal { + name: "connectedSSIDChanged" + Parameter { name: "ssid"; type: "string" } + } + Method { name: "start" } + Method { name: "stop" } + Method { + name: "connect" + Parameter { name: "network"; type: "QWifiNetwork"; isPointer: true } + Parameter { name: "passphrase"; type: "string" } + } + Method { name: "disconnect" } + } + Component { name: "QWifiNetworkListModel"; prototype: "QAbstractListModel" } +} diff --git a/src/imports/wifi/qmldir b/src/imports/wifi/qmldir index 4c36784..d4f65d9 100644 --- a/src/imports/wifi/qmldir +++ b/src/imports/wifi/qmldir @@ -1,2 +1,3 @@ module Qt.labs.wifi plugin qwifimodule +typeinfo plugins.qmltypes -- cgit v1.2.3 From a63568ab216fb0fa8e13eaa26358f9fe5af108ae Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Fri, 23 May 2014 12:57:20 +0200 Subject: Doc: Update the list of supported platforms Add the missing links to device-specific setup instructions and update the supported platforms page. Change-Id: Ic5bd32f207676cf694521a9acad3609da8b77901 Reviewed-by: Eirik Aavitsland Reviewed-by: Samuli Piippo --- src/doc/src/b2qt.qdoc | 43 +++++++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index ab72787..5c41070 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -307,8 +307,10 @@ \B2Q stack. These steps vary from device to device: \list + \li \l{Nexus 7 (2013) (embedded Android)} \li \l{Nexus 7 (2012) (embedded Android)} \li \l{BD-SL-i.MX6 (embedded Android and Linux)} + \li \l{SABRE SD i.MX6Quad (embedded Linux)} \li \l{BeagleBone Black (embedded Android and Linux)} \li \l{BeagleBoard-xM (embedded Linux)} \li \l{Raspberry Pi Model B (embedded Linux)} @@ -1276,33 +1278,50 @@ \section1 Supported Target Devices - The \B2Q stack can be made to run on a variety of hardware. \B2QA - requires hardware that has support for the Android operating system, - version 4.0 or later. + The \B2Q stack can be made to run on a variety of hardware. Approximate minimal hardware requirements for running \B2Q are: \list \li 256 MB of RAM \li 500 MHz CPU, 1 GHz preferred for 60-FPS velvet-smooth UI \li OpenGL ES 2.0 support - \li Android 4.0+ compatible hardware \endlist + \B2QA requires hardware that has support for the Android operating + system, version 4.2 or later. + \B2Q has been tested to work on the following reference devices: \list - \li \l{http://www.google.com/nexus/7/specs/}{Google/Asus Nexus 7 (2012 and 2013 models)} - \li \l{http://beagleboard.org/products/beaglebone%20black}{BeagleBone Black} - \li \l{http://boundarydevices.com/products/sabre-lite-imx6-sbc/}{Freescale i.MX6 Sabre Lite board (Boundary Devices)} - \li \l{http://www.raspberrypi.org/faqs}{Raspberry Pi Model B} + \li \l{http://www.google.com/nexus/7/specs/} + {Google/Asus Nexus 7 (2012 and 2013 models)} + \li \l{http://beagleboard.org/products/beaglebone%20black} + {BeagleBone Black} + \li \l{http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=RDIMX6SABREBRD} + {Freescale SABRE SD i.MX6Quad} + \li \l{http://boundarydevices.com/products/sabre-lite-imx6-sbc/} + {BD-SL-i.MX6} + \li \l{http://www.raspberrypi.org/faqs} + {Raspberry Pi Model B} \endlist - For the \SDK 3.0 release, \l{Preparing BeagleBoard-xM}{BeagleBoard-xM (embedded Linux)} - is no longer tested and supported. It is, however, still tested and supported - in the earlier 2.x releases. + \section2 Legacy Reference Devices + + The following devices are no longer tested or supported by the latest + release of \SDK. + + \list + \li \l{http://beagleboard.org/hardware-xM} + {BeagleBoard-xM} + \list + \li Starting from \SDK 3.0 release, BeagleBoard-xM is no longer + tested and supported. It is, however, still tested and supported + in the earlier 2.x releases. + \endlist + \endlist \section1 Supported Development Environment - The development environment supported by \SDK is Ubuntu Linux 64-bit (12.04 LTS or 12.10). + The development environment supported by \SDK is Ubuntu Linux 64-bit (12.04 LTS or later). \sa {Requirements for Development Host} -- cgit v1.2.3 From 84cb69dd5af6d2e44cce7bbef2536706d781f799 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Thu, 12 Jun 2014 12:37:44 +0200 Subject: Don't hardcode interface name in getIPAddress() Change-Id: I29ac16d598ce56a7fa0a7b3b5bb89ca12d5f074a Reviewed-by: Eirik Aavitsland --- src/utils/qdroidutils.cpp | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/utils/qdroidutils.cpp b/src/utils/qdroidutils.cpp index d880de9..379fc20 100644 --- a/src/utils/qdroidutils.cpp +++ b/src/utils/qdroidutils.cpp @@ -225,14 +225,20 @@ bool QDroidUtils::setDisplayBrightness(quint8 value) */ QString QDroidUtils::getIPAddress() { - QStringList addresses; - QNetworkInterface interface = QNetworkInterface::interfaceFromName(QStringLiteral("eth0")); - QList entries; - entries = interface.addressEntries(); - foreach (const QNetworkAddressEntry &entry, entries) { - addresses.append(entry.ip().toString().split('%').first()); + QList availableInterfaces = QNetworkInterface::allInterfaces(); + if (availableInterfaces.length() > 0) { + foreach (const QNetworkInterface &interface, availableInterfaces) { + if (interface.flags() & QNetworkInterface::IsRunning + && (interface.flags() & QNetworkInterface::IsLoopBack) == 0) { + QList entries = interface.addressEntries(); + QStringList addresses; + foreach (const QNetworkAddressEntry &entry, entries) + addresses.append(entry.ip().toString().split('%').first()); + return addresses.join(QStringLiteral(", ")); + } + } } - return addresses.join(QStringLiteral(", ")); + return QString(); } /*! -- cgit v1.2.3 From e30a8e704c129315225368de6cf41bd31df62d64 Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Thu, 8 May 2014 17:36:52 +0200 Subject: Fix Wifi issues on Android 4.4.2 - Reload Wi-Fi firmware on a device startup (initializes wlan0 interface). - Android version 4.4 (and above) requires IFNAME=wlan0 prefix to the wpa_supplicant calls, without this all calls to the wpa_supplicant fail. - Fix "broken pipe" issue - a message in the logcat when trying to access a broken network. This seems to be a generic message whenever something is wrong with a network configuration (broken routing table, firewall issues, DNS issues etc.). Android uses Connectivity and NetworkManagement JAVA services to handle network configuration - we can use qconnectivity daemon for this. Task-number: QTEE-562 Change-Id: Ib5a93c677439a0e9bf92ede532667542d2bc4bed Reviewed-by: Eirik Aavitsland --- src/imports/wifi/qwifimanager.cpp | 9 ++++- src/qconnectivity/main.cpp | 79 +++++++++++++++++++++++++++------------ 2 files changed, 63 insertions(+), 25 deletions(-) (limited to 'src') diff --git a/src/imports/wifi/qwifimanager.cpp b/src/imports/wifi/qwifimanager.cpp index 65073f1..dd395c0 100644 --- a/src/imports/wifi/qwifimanager.cpp +++ b/src/imports/wifi/qwifimanager.cpp @@ -618,8 +618,13 @@ QByteArray QWifiManager::call(const char *command) const { char data[2048]; size_t len = sizeof(data) - 1; // -1: room to add a 0-terminator - if (q_wifi_command(m_interface.constData(), command, data, &len) < 0) { - qWarning("QWifiManager: call failed: %s", command); + QByteArray cmd; +#if !(Q_ANDROID_VERSION_MAJOR == 4 && Q_ANDROID_VERSION_MINOR < 4) + cmd.append("IFNAME=").append(m_interface).append(" "); +#endif + cmd.append(command); + if (q_wifi_command(m_interface.constData(), cmd.constData(), data, &len) < 0) { + qWarning("QWifiManager: call failed: %s", cmd.constData()); return QByteArray(); } if (len < sizeof(data)) diff --git a/src/qconnectivity/main.cpp b/src/qconnectivity/main.cpp index 6f01021..97f9582 100644 --- a/src/qconnectivity/main.cpp +++ b/src/qconnectivity/main.cpp @@ -65,7 +65,8 @@ static int q_dhcp_do_request(bool renew, char *dns2, char *server, uint32_t *lease, - char *vendorInfo) + char *vendorInfo, + char *domain) { #if Q_ANDROID_VERSION_MAJOR == 4 && Q_ANDROID_VERSION_MINOR < 3 if (!renew) @@ -73,7 +74,6 @@ static int q_dhcp_do_request(bool renew, return dhcp_do_request_renew(ifname, ipaddr, gateway, prefixLength, dns1, dns2, server, lease, vendorInfo); #else char *dns[3] = {dns1, dns2, 0}; - char domain[PROPERTY_VALUE_MAX]; char mtu[PROPERTY_VALUE_MAX]; #if Q_ANDROID_VERSION_MAJOR == 4 && Q_ANDROID_VERSION_MINOR < 4 if (!renew) @@ -123,6 +123,11 @@ private: LeaseTimer *m_leaseTimer; bool m_isEmulator; QByteArray m_ethInterface; + // android initializes services in a separate threads, therefore it is + // not guaranteed that the netd socket will be ready at the time when qconnectivity + // is starting up - we try to reconnect again after 2 second intervals. This + // variable holds the maximum attempt count (chosen arbitrarily). + int m_attemptCount; }; class LeaseTimer : public QTimer @@ -153,7 +158,12 @@ private: }; QConnectivityDaemon::QConnectivityDaemon() - : m_netdSocket(0), m_serverSocket(0), m_linkUp(false), m_leaseTimer(0), m_isEmulator(isEmulator()) + : m_netdSocket(0), + m_serverSocket(0), + m_linkUp(false), + m_leaseTimer(0), + m_isEmulator(isEmulator()), + m_attemptCount(12) { qDebug() << "starting QConnectivityDaemon..."; if (!m_isEmulator) { @@ -194,26 +204,34 @@ bool QConnectivityDaemon::isEmulator() const void QConnectivityDaemon::initNetdConnection() { + int netdFd = socket_local_client("netd", ANDROID_SOCKET_NAMESPACE_RESERVED, SOCK_STREAM); + if (netdFd != -1) { + qDebug() << "QConnectivityDaemon: 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"; + if (--m_attemptCount != 0) + QTimer::singleShot(2000, this, SLOT(initNetdConnection())); + return; + } if (ethernetSupported()) { - static int attemptCount = 12; - int netdFd = socket_local_client("netd", ANDROID_SOCKET_NAMESPACE_RESERVED, SOCK_STREAM); - if (netdFd != -1) { - qDebug() << "QConnectivityDaemon: 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))); - // down-up sequence generates "linkstate" events, which we can use to setup - // our daemon on initial startup or on daemon restarts - sendCommand(QByteArray("0 interface setcfg ").append(m_ethInterface).append(" down").constData()); - sendCommand(QByteArray("0 interface setcfg ").append(m_ethInterface).append(" up").constData()); - } else { - qWarning() << "QConnectivityDaemon: failed to connect to netd socket"; - if (--attemptCount != 0) - QTimer::singleShot(2000, this, SLOT(initNetdConnection())); - } + // down-up sequence generates "linkstate" events, which we can use to setup + // our daemon on initial startup (device boot) or on daemon restarts + sendCommand(QByteArray("0 interface setcfg ").append(m_ethInterface).append(" down").constData()); + sendCommand(QByteArray("0 interface setcfg ").append(m_ethInterface).append(" up").constData()); } + char wifiInterface[PROPERTY_VALUE_MAX]; + property_get("wifi.interface", wifiInterface, NULL); + if (wifiInterface) + // reload wifi firmware + sendCommand(QByteArray("0 softap fwreload ").append(wifiInterface).append(" STA").constData()); + // disable firewall - this setting seems to be enabled only when using "Always-on VPN" + // mode on Android phones, see setLockdownTracker() in ConnectivityService.java + sendCommand("0 firewall disable"); } void QConnectivityDaemon::setHostnamePropery(const char *interface) const @@ -240,6 +258,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!"; + return; + } qDebug() << "QConnectivityDaemon: sending command - " << command; // netd expects "\0" terminated commands... m_netdSocket->write(command, qstrlen(command) + 1); @@ -286,10 +308,11 @@ bool QConnectivityDaemon::startDhcp(bool renew, const char *interface) char server[PROPERTY_VALUE_MAX]; quint32 lease = 0; char vendorInfo[PROPERTY_VALUE_MAX]; + char domain[PROPERTY_VALUE_MAX] = {0}; if (renew) { result = q_dhcp_do_request(true, interface, ipaddr, gateway, &prefixLength, - dns1, dns2, server, &lease, vendorInfo); + dns1, dns2, server, &lease, vendorInfo, domain); } else { // stop any existing DHCP daemon before starting new dhcp_stop(interface); @@ -298,7 +321,7 @@ bool QConnectivityDaemon::startDhcp(bool renew, const char *interface) // we are responsible for renewing a lease before it expires ifc_clear_addresses(interface); result = q_dhcp_do_request(false, interface, ipaddr, gateway, &prefixLength, - dns1, dns2, server, &lease, vendorInfo); + dns1, dns2, server, &lease, vendorInfo, domain); } bool success = (result == 0) ? true : false; @@ -316,6 +339,16 @@ 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 default interface for DNS - see NetworkManagementService.java + sendCommand(QByteArray("0 resolver setdefaultif ").append(interface).constData()); + property_set("net.dns1", dns1); property_set("net.dns2", dns2); } -- cgit v1.2.3 From f2cf2032de110182c45e9ab61d00e65a8db8028b Mon Sep 17 00:00:00 2001 From: aavit Date: Fri, 20 Jun 2014 15:55:02 +0200 Subject: Doc: injection to eAndroid reference devices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Including improved nexus script. Change-Id: I4fffcf09a7b562c2779df0e742ad868771e86bc2 Reviewed-by: Topi Reiniƶ --- src/doc/src/b2qt.qdoc | 181 ++++++++++++-------------------------------------- 1 file changed, 43 insertions(+), 138 deletions(-) (limited to 'src') diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 5c41070..3dad876 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -43,8 +43,7 @@ \li \l{Supported Platforms} \li \l{Preparing Hardware} \list - \li \l{Preparing Nexus 7 (2013)}{Nexus 7 (2013) (embedded Android)} - \li \l{Preparing Nexus 7 (2012)}{Nexus 7 (2012) (embedded Android)} + \li \l{Preparing Nexus 7 (2012/2013)}{Nexus 7 (2012/2013) (embedded Android)} \li \l{Preparing BD-SL-i.MX6}{BD-SL-i.MX6 (embedded Android and Linux)} \li \l{Preparing SABRE SD i.MX6Quad}{SABRE SD i.MX6Quad (embedded Linux)} \li \l{Preparing BeagleBone Black}{BeagleBone Black (embedded Android and Linux)} @@ -307,8 +306,7 @@ \B2Q stack. These steps vary from device to device: \list - \li \l{Nexus 7 (2013) (embedded Android)} - \li \l{Nexus 7 (2012) (embedded Android)} + \li \l{Nexus 7 (2012/2013) (embedded Android)} \li \l{BD-SL-i.MX6 (embedded Android and Linux)} \li \l{SABRE SD i.MX6Quad (embedded Linux)} \li \l{BeagleBone Black (embedded Android and Linux)} @@ -321,24 +319,38 @@ */ /*! - \target Nexus 7 (2013) (embedded Android) - \page qtee-preparing-hardware-nexus-7-2013.html - \title Preparing Nexus 7 (2013) + \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 (2013)} for + \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{Troubleshooting}. + 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: + 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. @@ -357,140 +369,32 @@ \section1 Deploying the \B2Q Stack - Using the \c{adb devices} command, confirm that you have a working - connection to the Nexus 7, and that the Nexus 7 is the only - connected device. Then run the following command to install the \B2Q stack: - - \badcode - cd - ./Boot2Qt-3.x/nexus7-2013-eAndroid/images/deploy.sh - \endcode - - 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 - - You are now ready to start developing for your device. For more information, - see \l{Building and Running an Example}. -*/ - -/*! - \target Nexus 7 (2012) (embedded Android) - \page qtee-preparing-hardware-nexus-7-2012.html - \title Preparing Nexus 7 (2012) - \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)} 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{Troubleshooting}. + 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}. - \section1 Unlocking Nexus 7 (2012) Bootloader + \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. - You must unlock the Nexus 7 Bootloader to be able to install custom - software. You need to do this only once. - - \list 1 - \li Power off the device. - \li Connect the device to the development host with a USB cable. - \li To start the Nexus up in \e{fastboot} mode, press the power button - for a second, and then keep the \b {Volume Down} key pressed down, - until you see a screen with a green robot with its front panel open. - \note If the ordinary startup screen appears instead, power off the - device and try again. - \li On the development host, enter the following command: - \badcode - sudo /Tools/b2qt/fastboot oem unlock - \endcode - \li Press the power button to confirm that you want to unlock the - bootloader when the prompt appears on the Nexus screen. - \li Wait a few seconds, and check that the text line stating the \c{LOCK STATE} now says \c{UNLOCKED}. - \endlist - - \section1 Updating a Nexus 7 (2012) with \B2Q Images - - \note It is important that you repeat the steps in this section after you - update \SDK. - - To update an unlocked Nexus 7 device with a \B2Q image: - - \list 1 - \li Make sure that the device is in \e{fastboot} mode and that it is - connected to the development host via USB. - - \li Re-flash the \e{boot}, \e{system}, and \e{userdata} partitions on the - device, by entering the following commands in the following order: - - \badcode - cd - sudo ./Tools/b2qt/fastboot flash boot Boot2Qt-3.x/nexus7-eAndroid/images/boot.img - sudo ./Tools/b2qt/fastboot flash system Boot2Qt-3.x/nexus7-eAndroid/images/system.img - sudo ./Tools/b2qt/fastboot flash userdata Boot2Qt-3.x/nexus7-eAndroid/images/data.img - \endcode - - \li Once the flashing is completed successfully, reboot the device: - - \badcode - sudo ./Tools/b2qt/fastboot reboot - \endcode - - \endlist - - \note You must install proprietary drivers for the Nexus 7 to boot - correctly. Until then, the screen will briefly show the "Google" logo and then go black, - instead of showing the \B2Q welcome screen or demo. - - \section1 Installing Proprietary Drivers - - Download the proprietary drivers for your Nexus 7. The following script downloads the third - party drivers from \l{https://developers.google.com/android/nexus/drivers#grouperjdq39} - {https://developers.google.com/android/nexus/drivers#grouperjdq39} - \badcode - cd - ./Boot2Qt-3.x/nexus7-eAndroid/images/download.sh - \endcode - - \note Only the version "Android 4.2.2 (JDQ39 to JDQ39E)" works with the - current \B2Q image. - - To install the drivers to Nexus 7: - - \list 1 - \li Power on the device and connect it to the development host via USB. - Also check that the device is \e{not} in fastboot mode. - \li Run the driver extractors: - \badcode - cd Boot2Qt-3.x/nexus7-eAndroid/images/drivers - ./extract-nvidia-grouper.sh - ./extract-asus-grouper.sh - ./extract-invensense-grouper.sh - cd - - \endcode - \note Carefully read the license terms enclosed in each individual - extractor. - \li Find out the serial number of the connected Nexus 7 device: + \list + \li \b{Nexus 7 (2013):} \badcode - ./Tools/b2qt/adb devices + cd + ./Boot2Qt-3.x/generic-X.Y-eAndroid/images/nexus7v2/deploy.sh \endcode - \li Deploy the drivers to your device: + \li \b{Nexus 7 (2012):} \badcode - ./Boot2Qt-3.x/nexus7-eAndroid/images/deploy.sh + cd + ./Boot2Qt-3.x/generic-X.Y-eAndroid/images/nexus7/deploy.sh \endcode \endlist - After the installation is complete, power on the device and check that - the \B2Q welcome screen and/or demo appear. - - \section1 Setting up USB Access + During the installation, the device may ask for confirmation to be + unlocked. Press the power button once to confirm. - \include b2qt-post-install-setup.qdocinc setting up usb access + 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 @@ -621,7 +525,7 @@ \li \b{\B2QA} \badcode cd - ./Boot2Qt-3.x/iMX6-eAndroid/images/deploy.sh /dev/ + ./Boot2Qt-3.x/generic-4.2-eAndroid/images/iMX6/deploy.sh /dev/ \endcode \li \b{\B2QL} \badcode @@ -808,7 +712,7 @@ \li \b{\B2QA} \badcode cd - ./Boot2Qt-3.x/beaglebone-eAndroid/images/deploy.sh /dev/ + ./Boot2Qt-3.x/generic-4.2-eAndroid/images/beaglebone/deploy.sh \endcode \li \b{\B2QL} \badcode @@ -1399,7 +1303,7 @@ embedded Android and Linux. However, the Emulator target is currently not supported \li Qt Quick Compiler (Technology Preview) was added to the \B2Q stack - \li \l{Preparing Nexus 7 (2013)}{Nexus 7 (2013)} was added as a + \li \l{Preparing Nexus 7 (2012/2013)}{Nexus 7 (2013)} was added as a reference device for embedded Android \li \l{Preparing SABRE SD i.MX6Quad}{Freescale SABRE SD i.MX6Quad} was added as a reference device for embedded Linux @@ -1589,6 +1493,7 @@ \li \l http://boundarydevices.com/switching-u-boot-versions-on-i-mx6/ \endlist + \target nexus-factory-reset \section2 How do I restore my Nexus 7 to factory settings? Go to \l{https://developers.google.com/android/nexus/images} and -- cgit v1.2.3 From 95176bb8b10b6bcc70b44abf50374a32d6ac41d5 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Mon, 23 Jun 2014 12:51:22 +0300 Subject: doc: add documentation for Toradex Apalis iMX6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I83c7b2ed8b7b941ab6cca21860da7e863b5e5251 Reviewed-by: Eirik Aavitsland Reviewed-by: Topi Reiniƶ --- src/doc/src/b2qt.qdoc | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) (limited to 'src') diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 3dad876..3902529 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -46,6 +46,7 @@ \li \l{Preparing Nexus 7 (2012/2013)}{Nexus 7 (2012/2013) (embedded Android)} \li \l{Preparing BD-SL-i.MX6}{BD-SL-i.MX6 (embedded Android and Linux)} \li \l{Preparing SABRE SD i.MX6Quad}{SABRE SD i.MX6Quad (embedded Linux)} + \li \l{Preparing Toradex Apalis iMX6}{Toradex Apalis iMX6 (embedded Linux)} \li \l{Preparing BeagleBone Black}{BeagleBone Black (embedded Android and Linux)} \li \l{Preparing BeagleBoard-xM}{BeagleBoard-xM (embedded Linux)} \li \l{Preparing Raspberry Pi}{Raspberry Pi Model B (embedded Linux)} @@ -309,6 +310,7 @@ \li \l{Nexus 7 (2012/2013) (embedded Android)} \li \l{BD-SL-i.MX6 (embedded Android and Linux)} \li \l{SABRE SD i.MX6Quad (embedded Linux)} + \li \l{Toradex Apalis iMX6 (embedded Linux)} \li \l{BeagleBone Black (embedded Android and Linux)} \li \l{BeagleBoard-xM (embedded Linux)} \li \l{Raspberry Pi Model B (embedded Linux)} @@ -600,6 +602,69 @@ see \l{Building and Running an Example}. */ +/*! + \target Toradex Apalis iMX6 (embedded Linux) + \page qtee-preparing-hardware-apalis-imx6.html + \title Preparing Toradex Apalis iMX6 + \previouspage qtee-installation-guide.html + + Take the following steps to prepare a + \l{http://www.toradex.com/products/apalis-arm-computer-modules/freescale-imx-6-computer-module} + {Toradex Apalis iMX6} for \B2Q. + + \note It is important that you repeat the steps in this section after you + update \SDK. + + The images containing the \B2Q stack for Toradex Apalis iMX6 are included + in \SDK, ready to be copied to an SD card. + + \section1 Preparing an SD Card + + An SD card of at least 512 MB capacity is sufficient. + + \include detect-sd-card-device-name.qdocinc instructions + + \section1 Installing the \B2Q Image + + To write the image to the SD card, ensure that no partitions on the + SD card are mounted: + + \include detect-sd-card-device-name.qdocinc unmount + + Then, + + \badcode + cd + sudo Boot2Qt-3.x/apalis-imx6-eLinux/images/deploy.sh /dev/ + \endcode + + By default, the Toradex Apalis iMX6 boots from its internal eMMC. In order to boot from + the external SD card, the U-Boot environment needs to be updated. Connect a serial cable + to the device and enter into the U-Boot environment by pressing any key before the autoboot. + Enter following lines into U-Boot: + + \badcode + setenv bootcmd 'run sdboot ; echo sdboot failed ; run emmcboot ; echo ; echo emmcboot failed ; run nfsboot ; echo ; echo nfsboot failed ; usb start ;setenv stdout serial,vga ; setenv stdin serial,usbkbd' + setenv sdboot 'run setup; setenv bootargs ${defargs} ${sdargs} ${setupargs} ${vidargs};echo Booting from SD card in 8bit slot...; fatload mmc 2:1 10800000 uImage && bootm 10800000' + setenv sdargs 'ip=off root=/dev/mmcblk1p2 rw,noatime rootfstype=ext3 rootwait' + saveenv + \endcode + + New U-Boot command are now stored into the device, and you can start \B2Q. For more information + about the boot process on Toredex Apalis iMX6, see + \l{http://developer.toradex.com/software-resources/arm-family/linux/linux-booting}{Toradex Linux Booting} + + After the image has been deployed, insert the SD card, power on the device and check that + the \B2Q welcome screen and/or demo appear. + + \section1 Configuring a Device Kit in Qt Creator + + \include b2qt-post-install-setup.qdocinc configuring network device + + You are now ready to start developing for your device. For more information, + see \l{Building and Running an Example}. +*/ + /*! \target Raspberry Pi Model B (embedded Linux) \page qtee-preparing-hardware-rasberrypi.html @@ -1115,6 +1180,9 @@ \row \li Freescale SABRE SD i.MX6Quad \li imx6qsabresd + \row + \li Toradex Apalis iMX6 + \li apalis-imx6 \row \li Emulator \li emulator @@ -1204,6 +1272,8 @@ {Freescale SABRE SD i.MX6Quad} \li \l{http://boundarydevices.com/products/sabre-lite-imx6-sbc/} {BD-SL-i.MX6} + \li \l{http://www.toradex.com/products/apalis-arm-computer-modules/freescale-imx-6-computer-module} + {Toradex Apalis iMX6} \li \l{http://www.raspberrypi.org/faqs} {Raspberry Pi Model B} \endlist -- cgit v1.2.3 From a136643d97abb384a963f5da566a7ce0e34695ea Mon Sep 17 00:00:00 2001 From: aavit Date: Wed, 25 Jun 2014 12:45:38 +0200 Subject: Doc: Fix path for sabre install Change-Id: Id577ea9d5e6cf5d0b0b129f90688f88acf44f9fb Reviewed-by: Samuli Piippo --- src/doc/src/b2qt.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 3902529..bf4bf0b 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -584,7 +584,7 @@ \badcode cd - sudo Boot2Qt-3.x/imx6sabresd-eLinux/images/deploy.sh /dev/ + sudo Boot2Qt-3.x/imx6qsabresd-eLinux/images/deploy.sh /dev/ \endcode After the image has been deployed, insert the SD card, power on the device and check that -- cgit v1.2.3 From dc109fe1f3077dbcaf17902dc75032684e7ac269 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Thu, 26 Jun 2014 12:02:52 +0200 Subject: Doc: Update the Supported Platforms page Describe the support in more clear terms, including the support for stack customization. Task-number: QTEE-680 Change-Id: I43c72ee8f4aa363ff9e05a4a10ac3df456abc6bc Reviewed-by: Kalle Viironen --- src/doc/src/b2qt.qdoc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index bf4bf0b..e47168e 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -1248,9 +1248,13 @@ \previouspage qtee-installation-guide.html \nextpage qtee-preparing-hardware.html - \section1 Supported Target Devices + \section1 Supported Reference Devices - The \B2Q stack can be made to run on a variety of hardware. + The \B2Q stack can be made to run on a variety of hardware. For \SDK license + holders, tooling is provided to customize the contents of the stack as well + as to take it into desired production hardware. For more information on how + to customize the stack for embedded Linux, see + \l {Building Your Own Embedded Linux Image}. Approximate minimal hardware requirements for running \B2Q are: \list @@ -1262,7 +1266,8 @@ \B2QA requires hardware that has support for the Android operating system, version 4.2 or later. - \B2Q has been tested to work on the following reference devices: + \B2Q software stack is provided pre-built, tested and supported for the + following hardware: \list \li \l{http://www.google.com/nexus/7/specs/} {Google/Asus Nexus 7 (2012 and 2013 models)} -- cgit v1.2.3 From 5de04cef57fe33e257aebc407ed327e7d4f793bb Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Fri, 27 Jun 2014 14:46:31 +0200 Subject: Doc: Bump version to 3.1.0 Change-Id: Ic4e5b270a0289d3e7eab34af58b61b8d034fa72d Reviewed-by: Samuli Piippo Reviewed-by: Kalle Viironen --- src/doc/config/b2qt.qdocconf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/doc/config/b2qt.qdocconf b/src/doc/config/b2qt.qdocconf index 045c8ea..28cb2d5 100644 --- a/src/doc/config/b2qt.qdocconf +++ b/src/doc/config/b2qt.qdocconf @@ -6,7 +6,7 @@ sourceencoding = UTF-8 project = QtEnterpriseEmbedded description = Qt Enterprise Embedded Documentation -version = 3.0.0 +version = 3.1.0 sourcedirs = ../src \ ../../imports/wifi @@ -23,7 +23,7 @@ indexes = $QT_INSTALL_DOCS/qtquick/qtquick.index \ qhp.projects = B2Qt qhp.B2Qt.file = b2qt.qhp -qhp.B2Qt.namespace = com.digia.b2qt.300 +qhp.B2Qt.namespace = com.digia.b2qt.310 qhp.B2Qt.virtualFolder = b2qt qhp.B2Qt.indexTitle = Qt Enterprise Embedded Documentation qhp.B2Qt.indexRoot = -- cgit v1.2.3 From 7fd7d05ca382fd4dc1d609c8fe4544bb88764cff Mon Sep 17 00:00:00 2001 From: Gatis Paeglis Date: Mon, 30 Jun 2014 12:18:08 +0200 Subject: Fix #ifdef for Android detection It was wrongly adding "IFNAME=" to wpa_supplicant calls on eLinux, "IFNAME=" is required only for eAndroid. Change-Id: Ic16d321765071df66fbffc1c3d6ce78180eb3b1c Reviewed-by: Eirik Aavitsland --- src/imports/wifi/qwifimanager.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/imports/wifi/qwifimanager.cpp b/src/imports/wifi/qwifimanager.cpp index dd395c0..8eec3e0 100644 --- a/src/imports/wifi/qwifimanager.cpp +++ b/src/imports/wifi/qwifimanager.cpp @@ -619,8 +619,10 @@ QByteArray QWifiManager::call(const char *command) const char data[2048]; size_t len = sizeof(data) - 1; // -1: room to add a 0-terminator QByteArray cmd; +#ifdef Q_OS_ANDROID #if !(Q_ANDROID_VERSION_MAJOR == 4 && Q_ANDROID_VERSION_MINOR < 4) cmd.append("IFNAME=").append(m_interface).append(" "); +#endif #endif cmd.append(command); if (q_wifi_command(m_interface.constData(), cmd.constData(), data, &len) < 0) { @@ -630,7 +632,7 @@ QByteArray QWifiManager::call(const char *command) const if (len < sizeof(data)) data[len] = 0; QByteArray result = QByteArray::fromRawData(data, len); - if (QT_WIFI_DEBUG) qDebug("QWifiManager::call: %s ==>\n%s", command, result.constData()); + if (QT_WIFI_DEBUG) qDebug("QWifiManager::call: %s ==>\n%s", cmd.constData(), result.constData()); return result; } -- cgit v1.2.3 From e8f88b15069677cc93a5f5d6154137963a10d7ff Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Mon, 30 Jun 2014 14:46:41 +0200 Subject: Doc: Add note about crash message when closing an application Task-number: QTEE-400 Change-Id: I0c8b8cb190919d97bc7c2efff989655ead2b1de1 Reviewed-by: Eirik Aavitsland --- src/doc/src/b2qt.qdoc | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index e47168e..185a606 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -1621,6 +1621,11 @@ /Tools/b2qt/adb logcat \endcode + \note When terminating an application from Qt Creator, you may see the + message \e {Terminating application. Error running process: Process crashed}. + This is normal and does not indicate a problem in your code; a SIGTERM + signal is sent to the application, and Qt interprets it as a crash. + \section2 Mouse or touch input does not work See \l{Customization}. -- cgit v1.2.3 From dd9c79664a5d463acaad2be599b053659576aa88 Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Thu, 26 Jun 2014 14:12:41 +0200 Subject: Doc: Android-specific instructions for Qt Creator Kit setup Adjust kit selection instructions for Android injection solution, and create re-usable documentation blocks to cover eLinux, eAndroid, and both. Task-number: QTEE-65QTEE-651 Change-Id: I42a1055a76f8a9e2d8dfb053ab1272643aef5671 Reviewed-by: Eirik Aavitsland --- src/doc/src/b2qt-post-install-setup.qdocinc | 36 +++++++++++++++++++++++++++++ src/doc/src/b2qt.qdoc | 8 +++---- 2 files changed, 40 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/doc/src/b2qt-post-install-setup.qdocinc b/src/doc/src/b2qt-post-install-setup.qdocinc index ec293de..0bd96dd 100644 --- a/src/doc/src/b2qt-post-install-setup.qdocinc +++ b/src/doc/src/b2qt-post-install-setup.qdocinc @@ -56,12 +56,14 @@ //! [setting up usb access] //! [configuring device kit] +//! [common config device kit] After you have prepared the hardware, you must perform one final step to set up the development tools in Qt Creator for your device. That is, you must configure the correct device to be used for each build and run \e{kit}. Connect your device to the development host via USB and launch Qt Creator. In Qt Creator: +//! [common config device kit] //! [steps for device kit] \list 1 \li Select \b{Tools > Options > Build & Run > Kits}. @@ -73,6 +75,25 @@ //! [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 @@ -93,4 +114,19 @@ \include b2qt-post-install-setup.qdocinc steps for device kit //! [configuring network device] + +//! [configuring device kit android] + \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] */ diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index 185a606..b25616f 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -290,7 +290,7 @@ \section1 6. Configuring a Device Kit in Qt Creator - \include b2qt-post-install-setup.qdocinc configuring device kit + \include b2qt-post-install-setup.qdocinc configuring device kit android linux You are now ready to start developing for your device. For more information, see \l{Building and Running an Example}. @@ -400,7 +400,7 @@ \section1 Configuring a Device Kit in Qt Creator - \include b2qt-post-install-setup.qdocinc configuring device kit + \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}. @@ -545,7 +545,7 @@ \section1 Configuring a Device Kit in Qt Creator - \include b2qt-post-install-setup.qdocinc configuring device kit + \include b2qt-post-install-setup.qdocinc configuring device kit android linux You are now ready to start developing for your device. For more information, see \l{Building and Running an Example}. @@ -795,7 +795,7 @@ \section1 Configuring a Device Kit in Qt Creator - \include b2qt-post-install-setup.qdocinc configuring device kit + \include b2qt-post-install-setup.qdocinc configuring device kit android linux You are now ready to start developing for your device. For more information, see \l{Building and Running an Example}. -- cgit v1.2.3 From 64164764fdfe9ed736b7367d573c0daa026b777f Mon Sep 17 00:00:00 2001 From: Topi Reinio Date: Mon, 30 Jun 2014 14:45:23 +0200 Subject: Doc: ChangeLog for 3.1.0 release Task-number: QTEE-685 Change-Id: I6d2974fb569207f504ec17bae1acc988ce8ee04c Reviewed-by: Kalle Viironen --- src/doc/src/b2qt.qdoc | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'src') diff --git a/src/doc/src/b2qt.qdoc b/src/doc/src/b2qt.qdoc index b25616f..34b8d58 100644 --- a/src/doc/src/b2qt.qdoc +++ b/src/doc/src/b2qt.qdoc @@ -1362,6 +1362,47 @@ \previouspage qtee-customization.html \nextpage qtee-troubleshooting.html + \section1 \B2Q 3.1.0 + + \list + \li Release date: July 3, 2014 + \endlist + + \section2 Changes + \b {New Features}: + \list + \li Boot to Qt stack was updated to use Qt 5.3.1 on embedded Android + and Linux. + \li Added a generic solution for injecting \B2QA stack into devices + running Android version 4.2.2 or later. + \li \l {Preparing Toradex Apalis iMX6}{Toradex Apalis iMX6} was added + as a reference device. + \li \l {Qt Data Visualization} was updated to version 1.1. + \li \l {Qt Charts} was updated to version 1.4. + \li \l {Qt Virtual Keyboard} was update to version 1.1. + \endlist + + \b {Improvements}: + \list + \li Added translucent widget windows support to eglfs. + \li Changed \e appcontroller to print status messages to stdout. + \li Switched to use symbolic links for GL-streaming library, instead + of having multiple copies. + \li Fixed C++ debugging issues and improved performance on embedded + Android. + \li Updated the content of \e About \e {\SDK} demo. + \li Improved Sensors and Media Player examples. + \endlist + + \b {Fixed Bugs}: + \list + \li Fixed WiFi not working on Nexus 7 (2013). + \li BeagleBone Black: Fixed C++ debugging failing on embedded Android. + \li BeagleBone Black: embedded Linux did not include USB serial drivers. + \li Fixed JavaScript crash on ARM (QTBUG-39289). + \li Removed useless warnings about setMask when using Qt Widgets. + \endlist + \section1 \B2Q 3.0.0 \list -- cgit v1.2.3