summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--LICENSE.GPLv22
-rw-r--r--LICENSE.GPLv32
-rw-r--r--LICENSE.LGPLv212
-rw-r--r--LICENSE.LGPLv32
-rw-r--r--dist/changes-5.7.056
-rw-r--r--src/bluetooth/bluetooth.pro2
-rw-r--r--src/bluetooth/doc/qtbluetooth.qdocconf1
-rw-r--r--src/bluetooth/doc/src/bluetooth-index.qdoc7
-rw-r--r--src/bluetooth/doc/src/bluetooth-le-overview.qdoc56
-rw-r--r--src/bluetooth/lecmaccalculator.cpp2
-rw-r--r--src/bluetooth/qbluetooth.cpp1
-rw-r--r--src/bluetooth/qbluetoothdevicediscoveryagent_p.cpp4
-rw-r--r--src/bluetooth/qlowenergycontroller.cpp23
-rw-r--r--src/bluetooth/qlowenergyservice.cpp1
14 files changed, 135 insertions, 26 deletions
diff --git a/LICENSE.GPLv2 b/LICENSE.GPLv2
index 6dbb032f..a4244777 100644
--- a/LICENSE.GPLv2
+++ b/LICENSE.GPLv2
@@ -3,7 +3,7 @@
The Qt Toolkit is Copyright (C) 2015 The Qt Company Ltd.
Contact: http://www.qt.io/licensing/
- You may use, distribute and copy the Qt GUI Toolkit under the terms of
+ You may use, distribute and copy the Qt Toolkit under the terms of
GNU General Public License version 2, which is displayed below.
-------------------------------------------------------------------------
diff --git a/LICENSE.GPLv3 b/LICENSE.GPLv3
index 4e49b122..71c4ad49 100644
--- a/LICENSE.GPLv3
+++ b/LICENSE.GPLv3
@@ -3,7 +3,7 @@
The Qt Toolkit is Copyright (C) 2015 The Qt Company Ltd.
Contact: http://www.qt.io/licensing/
- You may use, distribute and copy the Qt GUI Toolkit under the terms of
+ You may use, distribute and copy the Qt Toolkit under the terms of
GNU Lesser General Public License version 3. That license references
the General Public License version 3, that is displayed below. Other
portions of the Qt Toolkit may be licensed directly under this license.
diff --git a/LICENSE.LGPLv21 b/LICENSE.LGPLv21
index 6e184611..dfcab5e2 100644
--- a/LICENSE.LGPLv21
+++ b/LICENSE.LGPLv21
@@ -3,7 +3,7 @@
The Qt Toolkit is Copyright (C) 2015 The Qt Company Ltd.
Contact: http://www.qt.io/licensing/
- You may use, distribute and copy the Qt GUI Toolkit under the terms of
+ You may use, distribute and copy the Qt Toolkit under the terms of
GNU Lesser General Public License version 2.1, which is displayed below.
-------------------------------------------------------------------------
diff --git a/LICENSE.LGPLv3 b/LICENSE.LGPLv3
index 4d67bac0..6bf924cd 100644
--- a/LICENSE.LGPLv3
+++ b/LICENSE.LGPLv3
@@ -3,7 +3,7 @@
The Qt Toolkit is Copyright (C) 2015 The Qt Company Ltd.
Contact: http://www.qt.io/licensing/
- You may use, distribute and copy the Qt GUI Toolkit under the terms of
+ You may use, distribute and copy the Qt Toolkit under the terms of
GNU Lesser General Public License version 3, which is displayed below.
This license makes reference to the version 3 of the GNU General
Public License, which you can find in the LICENSE.GPLv3 file.
diff --git a/dist/changes-5.7.0 b/dist/changes-5.7.0
new file mode 100644
index 00000000..1beb80af
--- /dev/null
+++ b/dist/changes-5.7.0
@@ -0,0 +1,56 @@
+Qt 5.7 introduces many new features and improvements as well as bugfixes
+over the 5.6.x series. Also, there is a change in the licensing terms.
+For more details, refer to the online documentation included in this
+distribution. The documentation is also available online:
+
+
+ http://doc.qt.io/qt-5/index.html
+
+The Qt version 5.7 series is binary compatible with the 5.6.x series.
+Applications compiled for 5.6 will continue to run with 5.7.
+
+Some of the changes listed in this file include issue tracking numbers
+corresponding to tasks in the Qt Bug Tracker:
+
+ https://bugreports.qt.io/
+
+Each of these identifiers can be entered in the bug tracker to obtain more
+information about a particular change.
+
+****************************************************************************
+* Important License Changes *
+****************************************************************************
+
+ This module is no longer available under LGPLv2.1. The libraries are
+ now available under the following licenses:
+ * Commercial License
+ * GNU General Public License v2.0 (LICENSE.GPL2) and later
+ * GNU Lesser General Public License v3.0 (LICENSE.LGPL3)
+
+ The tools are now available under the following licenses:
+ * Commercial License
+ * GNU General Public License 3.0 (LICENSE.GPL3) with exceptions
+ described in The Qt Company GPL Exception 1.0 (LICENSE.GPL3-EXCEPT)
+
+****************************************************************************
+* Library *
+****************************************************************************
+
+QtBluetooth
+-----------
+
+ - Added API for Bluetooth Low Energy Peripheral support. This new API is
+ a Technology Preview and currently only supported on BlueZ.
+ - [QTBUG-52428] Added QLowEnergyConnectionParameters class to enable
+ adjustment of BTLE connection parameters
+ - Added operator!= for QBluetoothUuid
+ - Added Bluetooth Low Energy signed write support on Linux/BlueZ and Android
+
+****************************************************************************
+* Platform Specific Changes *
+****************************************************************************
+
+iOS/tvOS
+--------
+
+ - Added support for QtBluetooth on tvOS.
diff --git a/src/bluetooth/bluetooth.pro b/src/bluetooth/bluetooth.pro
index 3bca5496..2d29eb40 100644
--- a/src/bluetooth/bluetooth.pro
+++ b/src/bluetooth/bluetooth.pro
@@ -109,6 +109,7 @@ config_bluez:qtHaveModule(dbus) {
message("Bluez version is too old to support Bluetooth Low Energy.")
message("Only classic Bluetooth will be available.")
DEFINES += QT_BLUEZ_NO_BTLE
+ include(dummy/dummy.pri)
SOURCES += \
qlowenergycontroller_p.cpp
}
@@ -181,7 +182,6 @@ config_bluez:qtHaveModule(dbus) {
include(osx/osxbt.pri)
SOURCES += \
- qbluetoothdevicediscoveryagent_p.cpp \
qbluetoothlocaldevice_p.cpp \
qbluetoothserviceinfo_p.cpp \
qbluetoothservicediscoveryagent_p.cpp \
diff --git a/src/bluetooth/doc/qtbluetooth.qdocconf b/src/bluetooth/doc/qtbluetooth.qdocconf
index 52061d7e..aa485cdb 100644
--- a/src/bluetooth/doc/qtbluetooth.qdocconf
+++ b/src/bluetooth/doc/qtbluetooth.qdocconf
@@ -47,6 +47,7 @@ exampledirs += ../../../examples/bluetooth \
snippets/ \
../
+manifestmeta.thumbnail.names = "QtBluetooth/Bluetooth Low Energy Heart Rate Server Example"
imagedirs += images
diff --git a/src/bluetooth/doc/src/bluetooth-index.qdoc b/src/bluetooth/doc/src/bluetooth-index.qdoc
index 51c79ca4..f110179f 100644
--- a/src/bluetooth/doc/src/bluetooth-index.qdoc
+++ b/src/bluetooth/doc/src/bluetooth-index.qdoc
@@ -45,10 +45,13 @@ for transferring data between devices. Bluetooth connectivity is based on
basic device management, such as scanning for devices, gathering information
about them, and exchanging data between them.
-Qt 5.5 contains the first full release of the new Qt Bluetooth
-Low Energy API. Further details can be found in the
+Qt Bluetooth supports Bluetooth Low Energy development for client/central role use cases.
+Further details can be found in the
\l {Bluetooth Low Energy Overview}{Bluetooth Low Energy Overview} section.
+A new addition in this Qt Bluetooth 5.7 release covers support for Bluetooth Low Energy
+applications performing the peripheral/server role. This new API is a Technology Preview.
+
\section1 Getting Started
To use the C++ library in your application, add the following configuration
diff --git a/src/bluetooth/doc/src/bluetooth-le-overview.qdoc b/src/bluetooth/doc/src/bluetooth-le-overview.qdoc
index a6b8defa..8e78c487 100644
--- a/src/bluetooth/doc/src/bluetooth-le-overview.qdoc
+++ b/src/bluetooth/doc/src/bluetooth-le-overview.qdoc
@@ -168,19 +168,6 @@ Low Energy devices.
The example code below is taken from the \l {heartlistener}{Heart Listener} and
\l {heartrate-server}{Heart Rate Server} examples.
- \section2 Advertising Services
-
- If we are implementing a GATT server application on a peripheral device, we need to define the
- services we want to offer to central devices and advertise them:
-
- \snippet heartrate-server/main.cpp Advertising Data
- \snippet heartrate-server/main.cpp Start Advertising
- \snippet heartrate-server/main.cpp Advertising Data
-
- Now potential clients can connect to our device, discover the provided service and
- register themselves to get notified of changes to the characteristic value.
- This part of the API is covered in the following sections.
-
\section2 Establishing a Connection
To be able to read and write the characteristics of the Bluetooth Low Energy peripheral device,
@@ -257,4 +244,47 @@ Low Energy devices.
\l {https://developer.bluetooth.org/gatt/services/Pages/ServicesHome.aspx}{Bluetooth SIG} whereas others
may follow a custom protocol. The above code snippet demonstrates how to the read the standardized
HeartRate value.
+
+ \section2 Advertising Services
+
+ If we are implementing a GATT server application on a peripheral device, we need to define the
+ services we want to offer to central devices and advertise them:
+
+ \snippet heartrate-server/main.cpp Advertising Data
+ \snippet heartrate-server/main.cpp Start Advertising
+
+ Now potential clients can connect to our device, discover the provided service and
+ register themselves to get notified of changes to the characteristic value.
+ This part of the API was already covered by the above sections.
+
+ \section2 Implementing a Service on the Peripheral Device
+
+ The first step is to define the service, its characteristics and descriptors. This is achieved
+ using the \l QLowEnergyServiceData, \l QLowEnergyCharacteristicData and
+ \l QLowEnergyDescriptorData classes. These classes act as containers or building blocks for the
+ essential information that comprises the to-be-defined Bluetooth Low Energy service.
+ The code snippet below defines a simple HeartRate service which publishes
+ the measured beats per minute. An example where such a service could be used is a wrist watch.
+
+ \snippet heartrate-server/main.cpp Service Data
+
+ The resulting \c serviceData object can be published as described in the
+ \l {Advertising Services} section above. Despite the partial information overlap between the
+ information wrapped by \l QLowEnergyServiceData and \l QLowEnergyAdvertisingData the two classes
+ serve two very different tasks. The advertising data is published to nearby devices and often
+ limited in scope due to its size restriction of 29 bytes. Therefore they are not always 100%
+ complete. By comparison the service data contained inside of \l QLowEnergyServiceData provides
+ the complete set of service data and only becomes visible to the connecting client when a
+ connection with an active service discovery has been performed.
+
+ The next section demonstrates how the service can update the heart rate value. Depending on the
+ nature of the service it may have to comply with the official service definition
+ as defined on \l {https://www.bluetooth.org}. Other services may be completely custom. The
+ heart rate service was adopted and its specification can be found under
+ \l {https://www.bluetooth.com/specifications/adopted-specifications}.
+
+ \snippet heartrate-server/main.cpp Provide Heartbeat
+
+ In general characteristic and descriptor value updates on the peripheral device use the same
+ methods as connecting Bluetooth Low Energy devices.
*/
diff --git a/src/bluetooth/lecmaccalculator.cpp b/src/bluetooth/lecmaccalculator.cpp
index 1cda9576..47fef7df 100644
--- a/src/bluetooth/lecmaccalculator.cpp
+++ b/src/bluetooth/lecmaccalculator.cpp
@@ -72,7 +72,7 @@ LeCmacCalculator::LeCmacCalculator()
sa.salg_family = AF_ALG;
strcpy(reinterpret_cast<char *>(sa.salg_type), "hash");
strcpy(reinterpret_cast<char *>(sa.salg_name), "cmac(aes)");
- if (bind(m_baseSocket, reinterpret_cast<sockaddr *>(&sa), sizeof sa) == -1) {
+ if (::bind(m_baseSocket, reinterpret_cast<sockaddr *>(&sa), sizeof sa) == -1) {
qCWarning(QT_BT_BLUEZ) << "bind() failed for crypto socket:" << strerror(errno);
return;
}
diff --git a/src/bluetooth/qbluetooth.cpp b/src/bluetooth/qbluetooth.cpp
index 5e8b812a..483fe65a 100644
--- a/src/bluetooth/qbluetooth.cpp
+++ b/src/bluetooth/qbluetooth.cpp
@@ -76,6 +76,7 @@ namespace QBluetooth {
/*!
\enum QBluetooth::AttAccessConstraint
+ \since 5.7
This enum describes the possible requirements for reading or writing an ATT attribute.
diff --git a/src/bluetooth/qbluetoothdevicediscoveryagent_p.cpp b/src/bluetooth/qbluetoothdevicediscoveryagent_p.cpp
index 85be8233..4c7b5234 100644
--- a/src/bluetooth/qbluetoothdevicediscoveryagent_p.cpp
+++ b/src/bluetooth/qbluetoothdevicediscoveryagent_p.cpp
@@ -42,9 +42,7 @@
#include "qbluetoothaddress.h"
#include "qbluetoothuuid.h"
-#ifndef QT_IOS_BLUETOOTH
#include "dummy/dummy_helper_p.h"
-#endif
#define QT_DEVICEDISCOVERY_DEBUG
@@ -59,9 +57,7 @@ QBluetoothDeviceDiscoveryAgentPrivate::QBluetoothDeviceDiscoveryAgentPrivate(
q_ptr(parent)
{
Q_UNUSED(deviceAdapter);
-#ifndef QT_IOS_BLUETOOTH
printDummyWarning();
-#endif
}
QBluetoothDeviceDiscoveryAgentPrivate::~QBluetoothDeviceDiscoveryAgentPrivate()
diff --git a/src/bluetooth/qlowenergycontroller.cpp b/src/bluetooth/qlowenergycontroller.cpp
index eeff4ab0..c6cac44b 100644
--- a/src/bluetooth/qlowenergycontroller.cpp
+++ b/src/bluetooth/qlowenergycontroller.cpp
@@ -154,6 +154,7 @@ Q_DECLARE_LOGGING_CATEGORY(QT_BT)
remote device.
\value ClosingState The controller is about to be disconnected from the remote device.
\value AdvertisingState The controller is currently advertising data.
+ This value was introduced by Qt 5.7.
*/
/*!
@@ -259,6 +260,7 @@ Q_DECLARE_LOGGING_CATEGORY(QT_BT)
the other side of the connection requested new parameters. The new values can be retrieved
from \a newParameters.
+ \since 5.7
\sa requestConnectionUpdate()
*/
@@ -554,9 +556,11 @@ QLowEnergyController::QLowEnergyController(
Returns a new object of this class that is in the \l CentralRole and has the
parent object \a parent.
The \a remoteDevice refers to the device that a connection will be established to later.
- *
+
The controller uses the local default Bluetooth adapter for the connection management.
+
\sa QLowEnergyController::CentralRole
+ \since 5.7
*/
QLowEnergyController *QLowEnergyController::createCentral(const QBluetoothDeviceInfo &remoteDevice,
QObject *parent)
@@ -571,7 +575,9 @@ QLowEnergyController *QLowEnergyController::createCentral(const QBluetoothDevice
Typically, the next step is to call \l startAdvertising() on the returned object.
The controller uses the local default Bluetooth adapter for the connection management.
+
\sa QLowEnergyController::PeripheralRole
+ \since 5.7
*/
QLowEnergyController *QLowEnergyController::createPeripheral(QObject *parent)
{
@@ -815,6 +821,9 @@ QLowEnergyService *QLowEnergyController::createServiceObject(
If this object is currently not in the \l UnconnectedState, nothing happens.
\note Advertising will stop automatically once a client connects to the local device.
+
+ \since 5.7
+ \sa stopAdvertising()
*/
void QLowEnergyController::startAdvertising(const QLowEnergyAdvertisingParameters &parameters,
const QLowEnergyAdvertisingData &advertisingData,
@@ -834,6 +843,9 @@ void QLowEnergyController::startAdvertising(const QLowEnergyAdvertisingParameter
/*!
Stops advertising, if this object is currently in the advertising state.
+
+ \since 5.7
+ \sa startAdvertising()
*/
void QLowEnergyController::stopAdvertising()
{
@@ -849,6 +861,8 @@ void QLowEnergyController::stopAdvertising()
Constructs and returns a \l QLowEnergyService object with \a parent from \a service.
The controller must be in the \l PeripheralRole and in the \l UnconnectedState. The \a service
object must be valid.
+
+ \since 5.7
\sa QLowEnergyServiceData::addIncludedService
*/
QLowEnergyService *QLowEnergyController::addService(const QLowEnergyServiceData &service,
@@ -920,6 +934,8 @@ QLowEnergyService *QLowEnergyController::addService(const QLowEnergyServiceData
with the actual new parameters.
See the \l QLowEnergyConnectionParameters class for more information on connection parameters.
\note Currently, this functionality is only implemented on Linux.
+
+ \since 5.7
*/
void QLowEnergyController::requestConnectionUpdate(const QLowEnergyConnectionParameters &parameters)
{
@@ -949,6 +965,11 @@ QString QLowEnergyController::errorString() const
/*!
Returns the role that this controller object is in.
+
+ The role is determined when constructing a QLowEnergyController instance
+ using \l createCentral() or \l createPeripheral().
+
+ \since 5.7
*/
QLowEnergyController::Role QLowEnergyController::role() const
{
diff --git a/src/bluetooth/qlowenergyservice.cpp b/src/bluetooth/qlowenergyservice.cpp
index 1e5c363d..e9722f81 100644
--- a/src/bluetooth/qlowenergyservice.cpp
+++ b/src/bluetooth/qlowenergyservice.cpp
@@ -229,6 +229,7 @@ QT_BEGIN_NAMESPACE
\value LocalService The service is associated with a controller object in the
\l{QLowEnergyController::PeripheralRole}{peripheral role}. Such
service objects do not change their state.
+ This value was introduced by Qt 5.7.
*/
/*!