summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.4.2' into 5.45.4Liang Qi2015-05-181-0/+50
|\ | | | | | | Change-Id: I6371dd69c9e15cb4ce4e52b0bc4fb710a2a0f57b
| * Add QtConnectivity release notes for Qt 5.4.2v5.4.2Alex Blasche2015-04-221-0/+50
| | | | | | | | | | Change-Id: I1733dc2b63c491b4facfa7683865723406eb5812 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* | Bump versionOswald Buddenhagen2015-04-201-1/+1
|/ | | | Change-Id: I68ab6620664c53ecb15d04645162d03325a55afe
* Android: Fix crash due to dangling pointer inputthreadAlex Blasche2015-03-311-0/+4
| | | | | | | | This happened when the remote device closes the socket and the local Android device tries to reconnect using connectToDevice(). Change-Id: I1d8e3bfaea5f956cd71e390f4ab6e9d39256a66d Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* Do not assert if encryption change was requested by somebody elseAlex Blasche2015-03-311-1/+3
| | | | | | | | | This can happen if the QLowEnergyController was created, connected, disconnected and last but not least a second app reconnects. Direct BTLE device interaction with bluetoothctl can cause this. Change-Id: I4a2c68a018b7eb9b866a54cc127e03f6c4bf6672 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* Android: abort() QBluetoothSocket in its dtorAlex Blasche2015-03-301-0/+2
| | | | | | | | [ChangeLog][QBluetooth][Android] Forced QBluetoothSocket to close when its dtor is called Change-Id: Ie31a6b64e4939c800983b5c497532c6fcf90c7c0 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* Android: Fix crash when destructing socket during active connectAlex Blasche2015-03-302-73/+244
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling BluetoothSocket.connect in Java blocks for a certain amount of time. Previously, QtConcurrent::run() was used to separate the Java connect() call out into a different thread. Since the function executed by QtConcurrent and the user facing class shared data fields, a crash occurred if the user deleted QBluetoothSocket while QtConcurrent hadn't executed its service connect call yet. The problem is solved by using QThread and Standard signal/slots which separates the shared data members. The only remaining shared data member is Java's BluetoothSocket instance which is shared via QAndroidJniObject references. This is no problem as deleting one reference retains the other reference. Calling close() on an Android BluetoothSocket while a connect() is ongoing seems to be buggy. Sometimes the close() returns, the pending connect() throws an exception but the physical connection still gets established. To avoid this the patch queues the close() call up until after the connect() statement has returned. It is accepted behavior that the connection might still get enabled for a very brief moment despite a close() being issues before the connect() actually finished. The SocketConnectThread cleans itself up once the thread finished(). Task-number: QTBUG-44930 Change-Id: I8324497a7395de390529ecd0b97b1a326cd78f63 Reviewed-by: Ulf Hermann <ulf.hermann@theqtcompany.com>
* Fix crash in QBluetoothServiceDiscoveryAgent on Bluez 5.xAlex Blasche2015-03-232-1/+17
| | | | | | | | | | | | | | | | | | | The list of internally discovered devices was already cleared. It should not be referenced anymore. Furthermore the QBluetoothSocket is killed while its internal QBluetoothServiceDiscoveryAgent is still running. This change stops the agent as well and thereby prevents more QBluetoothSocket slots froms being invoked and a more controlled termination of QBluetoothServiceDiscoveryAgent. [ChangeLog][QtBluetooth][Android] Fixed crash in QBluetoothServiceDiscoveryAgent on Bluez 5 when using single device discovery. Single device discovery is used during QBluetoothSocket::connectToService(). Task-number: QTBUG-44930 Change-Id: Ib3129c492151a3fe12b0c451cf5ffdddc62d001c Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Minor code optimizationAlex Blasche2015-03-191-12/+2
| | | | | | | | | QBluetoothSocketPrivate::close() was always called when the internal socket state has been set to ClosingState. The removed checks were meaningless. Change-Id: Ia36808a21de7dd1076cdd47bca8fd6855ec957c3 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* Android: Fix crash in QBluetoothLocalDevice ctor due to Java exceptionAlex Blasche2015-03-181-28/+10
| | | | | | | | | | | | | | | | | | | | In general BluetoothAdapter.getDefaultAdapter should not throw an exception. If the device does not support Bluetooth the function should return a null reference only. However some devices throw a RuntimeException as well. We need to catch it to prevent unwinding of the stack. At the same time the patch simplifies the code by using QAndroidJniObject where possible. [ChangeLog][QtBluetooth][Android] Fixed crash in QBluetoothLocalDevice ctor on some devices due to a platform exception in QBluetoothAdapter.getDefaultAdapter(). Task-number: QTBUG-45066 Change-Id: I933783cda891127e5e37722f96f477c13b433ca7 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* QLowEnergyController_bluez now responds to server requests.Christian Waßmuth2015-03-171-2/+14
| | | | | | | | | | | The bluez implementation of QLowEnergyController now responds to requests with a "Request not supported" message, instead of ignoring it. If such requests are ignored, the remote will close the connection after 30 seconds, according to the bluetooth ATT specification. Task-number: QTBUG-44915 Change-Id: Id81b4a31d92a48269eda7d6c2d5995639dffe00a Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Fix case where BluetoothDevice.getServiceChannel() error is not handledAlex Blasche2015-03-051-1/+2
| | | | | | | | | | This applies to Android versions 4.1.x and below. The function returns BluetoothDevice.ERROR or -1 in case of an error. So far only the ERROR case was caught. Task-number: QTBUG-44792 Change-Id: I512f846d74f2a03b2e6f5bf4df4127d584993f6c Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* Improve QBluetoothServiceInfo documentationAlex Blasche2015-02-171-2/+5
| | | | | | | | | | serviceUuid() may be null and is not the same as the service class uuid. Task-number: QTBUG-44442 Change-Id: I200db4e2a403fabb8d1b5814b9d615dfc76a627d Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Andy Shaw <andy.shaw@digia.com>
* Set QBluetoothServer::ServiceAlreadyRegisteredError where possibleAlex Blasche2015-02-171-2/+4
| | | | | | | | | This affects Bluez 4 & 5. Task-number: QTBUG-44452 Change-Id: Ifa9f6c56499bece3d99dba65a0afeed6c2ed60ac Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Use proper endian conversion functionsAndreas Schwab2015-02-171-7/+8
| | | | | | | bswap_16 isn't defined anywhere, use qbswap from <QtCore/qendian.h> instead. Change-Id: I9ee260752ab7bcae3bbd30b4b71d30d52c837a2b Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* bic: Add 5.{2,3,4}.0 bic data for QtBluetooth and QtNfcSergio Ahumada2015-02-178-0/+23331
| | | | | | Change-Id: I0b98c18e0943b250debcf6e5461ddb19fba024ab Reviewed-by: Liang Qi <liang.qi@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Add the QtCore/ library prefix in public headersSergio Ahumada2015-02-128-9/+9
| | | | | Change-Id: I01f01575a03d95f558b1f1994e0c76b22b3c19e0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Bluez5: Fix plain text handover of xml from sdpscannerAlex Blasche2015-02-121-6/+10
| | | | | | | | | | | | | The plain text option was never triggered as the raw data processing always considered \0 as part of the string. Subsequently the string was always evaluated to be non-printable and the hex based handover was triggered. Fortunately the hex based handover worked without trouble. In addition the plain value was not properly escaped to be valid XML. Change-Id: I537a94ef4705c7eeab143b3053affc6abbd548cc Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Use single-char QString operations for efficiencySergio Ahumada2015-02-112-6/+6
| | | | | Change-Id: Ifdb98e21999ecdcf57c89a3664b8d0db796c73a1 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Merge remote-tracking branch 'gerrit/5.4.1' into 5.4Alex Blasche2015-02-109-61/+113
|\ | | | | | | Change-Id: I1d15de1e31aeecfe162d700c632ad59cc0d6077d
| * Fix crashing btchat example when selecting remote devicev5.4.1Alex Blasche2015-01-296-59/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The example immidiately destroys the QBluetoothServiceDiscoveryAgent when the user selects a remote chat service from the remote selector dialog. This may happen even when the scheduled QtConcurrent call to runSdpScan() was still pending. The subsequent signal callback into the deleted parent caused a crash. Unfortunately QtConcurrent::run() returns a QFuture which does not permit stopping the pending thread execution. Therefore the runSdpScan() had to be rewritten using QProcess to properly destruct pending calls. Change-Id: I1ed5e147feb94a26240901a02d836056eddabbf6 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| * Add changelog for QtBluetooth/QtNfc 5.4.1 release.Alex Blasche2015-01-291-0/+38
| | | | | | | | | | Change-Id: I1f4f3ace78b4619a43581182d885c479314a7603 Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
| * Register PublicBrowseGroup as sequenceAlex Blasche2015-01-212-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on Bluetooth spec Vol3 PartB 5.1.7 the BrowseGroupList consists of a data element sequence. The current approach was not correct. This was discovered because Bluez5 doesn't add a custom service to the Extended Inquiry Response (EIR) unless it is in a sequence. If the service is not part of the EIR other platforms such as Windows report an error or won't simply see the service. This was not a problem when using Bluez4 because it was more tolerant towards such mistakes and added the custom service to the EIR anyway. Task-number: QTBUG-43806 Change-Id: Ib0ca59005c940249fb6aefd8ecafe5b2ceff3878 Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
* | Avoid potential memory leak on variable 'device'Sergio Ahumada2015-02-101-3/+11
| | | | | | | | | | Change-Id: I4a3907dc1f8b8608b1c1b34e16d2e987cdc23be3 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Android: Fix leaking of local reference table in QBluetoothSocketAlex Blasche2015-02-051-33/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In certain situations internal java objects of QBluetoothSocket cannot be deleted fast enough. This causes a crash when the local reference table exceeds its maximum size of entries. This patch converts the pure JNI code to a QAndroidJniObject based version. It ensures faster cleanup of local jobject references and improves readability too. [ChangeLog][Platform Specific Changes][Android] Fixed leaking of java objects when calling QBluetoothSocket::connectToService() on Android. Task-number: QTBUG-44164 Change-Id: Iaa696bfeee69c6a79f3aeddec262ae34d8891743 Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
* | Android: Enable pairing for Android v15+Alex Blasche2015-02-022-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The required API became public in Android v19 which is what was used as check so far. However the same API was already privately provided since Android v15. THis patch ensures that older Android versions can create pairing requests too. This patch was provided by George Najarian. Task-number: QTBUG-43757 Change-Id: I0f38e538a972341a6acf719098f1010e52b639b7 Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* | Fix build with -no-c++11Fatih Aşıcı2015-01-274-55/+58
| | | | | | | | | | | | | | | | | | | | | | | | With -no-c++11, - Enum type names cannot be used as namespaces. Use old style naming. - For errno, errno.h must be included. - stdint.h must be included to use uint*_t types. Use quint* equivalents instead. Change-Id: I992f531a46cfc997df0aa6fc7ff6bf75fb750fc6 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Bump versionOswald Buddenhagen2015-01-161-1/+1
|/ | | | Change-Id: I59b24ee6fa29e005233283a10664644d60b7df3c
* Make chat example more error tolerantAlex Blasche2014-12-223-1/+16
| | | | | | | | It becomes more obvious on platforms which do not support Bluetooth that the example will not work. Change-Id: Ia6d249a4a891f93abf29910500ba164662308889 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Bump versionOswald Buddenhagen2014-12-121-1/+1
| | | | Change-Id: Ic018bf8b03e887da5448e0bcd6fdb18219fad184
* Improve documentation for undiscovered QLEServiceAlex Blasche2014-12-011-1/+14
| | | | | | | | | The class' behavior strongly deponds on its state. This can be confusing. This patch reduces the behavior uncertainties. Change-Id: Ib5cd8e821f2bb9aca5b579abf4ae98918f951f24 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4.0' into 5.4Frederik Gladhorn2014-11-276-17/+45
|\ | | | | | | Change-Id: I3f85a68066352e0b163f47d2b8ada1d0b8d34f33
| * Fix crash during service discovery on Androidv5.4.0Alex Blasche2014-11-211-13/+11
| | | | | | | | | | | | | | | | | | | | This is caused when running a service discovery on an Android emulator. The emulator does not have a local Bluetooth device despite the Qt code assuming it. Change-Id: I9c0d826d14e7494bfeb27d449f9b6f568860d917 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| * Add missing InvalidBluetoothAdapterError to QML discovery modelAlex Blasche2014-11-215-4/+34
| | | | | | | | | | | | | | | | | | | | | | | | QBluetoothServiceDiscoveryAgent::InvalidBluetoothAdapter was introduced by Qt 5.3 but never added to the QML BluetoothDiscoveryModel. This patch fixes the problem. This was noticed due to a crash on Android emulator. Change-Id: I652576929659ca370216133154e36158e8425711 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Improve lowenergyscanner status reportingAlex Blasche2014-11-244-10/+10
| | | | | | | | | | | | Change-Id: If6fccce951c2f3c3787cde2fa593e65da26f4370 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Reset the controller's internal state when disconnectingAlex Blasche2014-11-233-0/+14
| | | | | | | | | | | | | | | | | | | | This caused problems when disconnecting from the remote device while an openrequest was pending and if the controller tried to reconnect immediately afterwards. The pending request queue was blocked forever. Change-Id: I444d5ac6763b65ec8baf687e0dccec4b28016a6c Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.4.0' into 5.4Frederik Gladhorn2014-11-214-2/+108
|\| | | | | | | Change-Id: Ib79fe0b33b405cdf6fee87f97f6ebb86bb79d976
| * Fix spelling mistake in change logsv5.4.0-rc1Alex Blasche2014-11-181-1/+1
| | | | | | | | | | Change-Id: Ia82082ce24c98b69697b348dc20164b8ec034a0b Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
| * Add change log for Qt 5.4.0 releaseAlex Blasche2014-11-171-0/+99
| | | | | | | | | | | | | | Change-Id: I9eca03f01ba01e9952c28c6d4bd14f656aa5d838 Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| * Add missing \since tags for new API introduced by Qt 5.4.Alex Blasche2014-11-133-2/+9
| | | | | | | | | | | | Change-Id: Ie51d6e549d80baae57864d4e0d43a1c58897f149 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | More clearly specify the Linux and Bluez version for BTLE supportAlex Blasche2014-11-131-2/+1
| | | | | | | | | | | | Change-Id: If62bce8794855b8865e02ed87ec3faac80bfc3bd Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Fix QLEController::connectToDevice() documentationAlex Blasche2014-11-111-1/+3
|/ | | | | | | | A logical condition was inverted. Change-Id: Ia7b54fe75a8cea4275e3c92c6283bc12f3423b64 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Force lowenergyscanner to show empty list if we did not find servicesAlex Blasche2014-10-301-0/+3
| | | | | | | | | | Previously the UI was only updated when a new service was discovered on a device. In the extremely rare event of no services being found the UI was hanging in the "Searching for services" view. Change-Id: I245216ac4e373a765dea2e182ab541e8830417d0 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Fix lowenergyscanner ui bugs when QLEController connection errorsAlex Blasche2014-10-293-1/+28
| | | | | | | | | | | | | | | | | | 1.) The QLEController may error out during connectToDevice() which does not require the eventloop to run. At the same time the services view is not yet loaded. Subsequently the services view never notices the errors and loads as if the controller is still trying to connect. 2.) The services view can only be left when a disconnect() signal is received. During a connection error the disconnect never happens because the connect never happened. Artificially introduce a disconnect() when the controller is not connected but disconnect was called by the UI. This part should be cleaned up to properly allow tracking of the controller's state in the future. Change-Id: I2cbd90d55b5e70fb275a8f4563d9436419874e6d Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* If btle connect attempt fails return QLEController back to UnconnectedAlex Blasche2014-10-291-1/+3
| | | | | | | | | What is really needed is a new ConnectionError for this case. This new error will shortly be introduced to the btle/5.5 branch. Change-Id: I751fa0eeb5cf4d0b78863842c94770f4e8e74015 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Fix lowenergyscanner when dealing with device scan errorsAlex Blasche2014-10-283-4/+16
| | | | | | | | | Previously the error was indicated but other UI elements were still giving the impression that the scan was ongoing. Change-Id: Iafab8f43bff3303eb6ad5e3385db2f81288d2e66 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Unwarn compile of QtBluetoothAlex Blasche2014-10-281-1/+1
| | | | | | | | warning: 'QLowEnergyDescriptorPrivate' defined as a struct here but previously declared as a class [-Wmismatched-tags] Change-Id: I2b90a645ed5aa2d86184d94acb2658460f26f660 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Add QBluetoothDeviceInfo::UnknownCoreConfiguration enum valueAlex Blasche2014-10-163-2/+10
| | | | | | | | | | | | The value is needed for platforms which do not provide this type information. An example are Android versions below 18. The enum was added in Qt 5.4. Therefore we need to add the missing \since tag too. Change-Id: I23582e7500d8da6740b281ba9821d028c4f33e05 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Improve QBluetoothTransferManager documentationAlex Blasche2014-10-163-8/+29
| | | | | | | Change-Id: I918bd3b4134504d5bfc3e160adeb97187186df3d Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Catch segfault when passing 0 to QBluetoothTransferManager::put()Alex Blasche2014-10-133-0/+33
| | | | | | Change-Id: I8c659233fd6eb2232d7bd9d904ce14f1de8a9d34 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>