summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Android: Fix crashing QBluetoothDeviceDiscoveryAgent on Androids <v18v5.5.0-rc1v5.5.0Alex Blasche2015-06-101-0/+1
| | | | | | | | | | | | | | | | The new BTLE aware device discovery crashes due to a wrong internal activity state. The device discovery emits finished() signal when the SDP discovery finishes. It does not continue with BTLE scans oin Android releases 4.1.x or earlier. The signal emission causes the classes dtor to run. In turn the dtor calls stop() because the activity flag still indicates a running device scan which emits error(), which calls the classes dtor and the entire loop continues until a stack overflow is caused. Task-number: QTBUG-46588 Change-Id: If7e4af6773c6063cee11f59e0b0db477fea0c003 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* Add changelog for Qt 5.5.0 releaseAlex Blasche2015-06-081-0/+105
| | | | | Change-Id: If87264deae64c863701633f2d6ff4bd6f3c4d8b0 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* Test Q_DECLARE_OPERATORS_FOR_FLAGS operatorsAlex Blasche2015-05-285-1/+133
| | | | | | | | | This global operator was added to QBluetoothDeviceInfo and QLowEnergyService flags. Change-Id: Ic841cf8c08a2289a9c112dc6283c8891dcc8750e Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Provide missing Q_DECLARE_OPERATORS_FOR_FLAGSKonstantin Ritt2015-05-282-0/+5
| | | | | Change-Id: Ife85fc5a3e01752de07e91ba49216363ca5a5789 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Emit missing BluetoothService.detailsChanged signalAlex Blasche2015-05-271-0/+2
| | | | | | | | Device address and service name changes never triggered the signal despite the documentation and Q_PROPERTY definitions requiring it. Change-Id: I5d3d5f827b3e092bce3c2e7a4ce3cf687b251e6e Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* Provide missing comparison operatorsKonstantin Ritt2015-05-272-0/+26
| | | | | Change-Id: Ic940a8a61797c05f930b8063b67c1602292bb266 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Unit test for new QBluetoothHostInfo comparison operatorsAlex Blasche2015-05-271-0/+58
| | | | | Change-Id: I40ac86ccf94e8575220e6094dfec0d5537eba3a1 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Provide missing Q_DECLARE_METATYPEKonstantin Ritt2015-05-261-0/+2
| | | | | Change-Id: Id4ff2740cb89b0c20cd66a823a145855d28c2ec4 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Fix GCC warningKonstantin Ritt2015-05-261-0/+3
| | | | | | | | | The actual message was: > warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing] Change-Id: I70f30da77a925e50032c5a82014af2e1aee511fb Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Don't mention non-existing `servicePort` property in the docsKonstantin Ritt2015-05-261-1/+0
| | | | | Change-Id: I5d0302f37199a21d281e0dd20fb785dfb60b84b3 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Merge remote-tracking branch 'gerrit/5.4' into 5.5Alex Blasche2015-05-191-0/+50
|\ | | | | | | Change-Id: Ic7d8afddc1a3a5b7bc26824fbc9ec888f3487c21
| * 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>
* | | Remove some Tech preview remnants from Bluetooth documentationAlex Blasche2015-05-186-19/+2
| | | | | | | | | | | | | | | Change-Id: Ifcae07ef5e046f45848495f4d6af973cde713fdf Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* | | Reduce platform specific code linesAlex Blasche2015-05-127-87/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QLEController(QBluetoothAddress) ctor is not usable on iOS and OSX. On those platforms we have to use QLECOntroller(QBluetoothDeviceInfo). We mark the QBluetoothAddress based ctors of QLEController obsolete and remove most uses of them. This cleans up some ifdefs throughout the QtBluetooth code base. Change-Id: Ibe1e3fa271a29461e39fc3c0eeba7a910a250077 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* | | add remoteName() method to QLowEnergyControllerKevron Rees2015-05-125-0/+24
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-45435 Change-Id: I3ded6bf88d3980481e386073ce160d5d54520034 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* | | Bugfix: Bluetooth Le for Android need to close BluetoothGattPeter Rustler2015-05-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Android can only handle a defined count of simultaneously connections to bluetooth le devices. Every Android device have a different defined amount of possible simultaneously connections. If we do not close the connection and reconnect to the device or another device, the count of used connections get up. If we exceed the maximum connection count we can not connect to bluetooth le devices anymore. The only way to recover is to restart the application to reset the open connection count. This patch closes the connection after it has been disconnected. Change-Id: Id96a69ef07eb973216495a0ba8e46fd639338165 Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | | Bugfix Andoid Bluetooth coreConfiguration data in discoveredDevicesPeter Rustler2015-05-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In current implementation of processDiscoveredDevices, if we receive the same device again with different coreConfiguration, the device will be just replaced. In Android there are 2 ways to scan for bluetooth devices. One is the scan for all bluetooth devices (including LE) and one for scanning just LE devices. Currently they are used both, which means we receive dual devices multiple times. Depending of the arrival in time of the QBluetoothDeviceInfo the coreConfiguration is different. In the List of discovered devices this lead to devices reported as LE only or classic only which is wrong. If the Application calls discoveredDevices() it will get a list with wrong coreConfiguration. This patch update the coreConfiguration of the QBluetoothDeviceInfo in list. Change-Id: I312544ca513503c5d6b31a1ca0cfbe530c0be911 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
* | | iOS: make QtBluetooth compileAlex Blasche2015-05-051-1/+1
| | | | | | | | | | | | | | | Change-Id: I414965f475a1b66aec30098804c71ef07b80a032 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* | | Merge branch '5.4' into 5.5Alex Blasche2015-05-040-0/+0
|\| | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I50d35abb0377dcdb645faa46d458c12934cf3514
| * | Bump versionOswald Buddenhagen2015-04-201-1/+1
| |/ | | | | | | Change-Id: I68ab6620664c53ecb15d04645162d03325a55afe
* | Add detection for running Bluez 4 daemonAlex Blasche2015-05-041-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | So far we tried to detect Bluez5. If we couldn't find it the code automatically assumed Bluez4. That's not always true though as the Bluez daemon (bluetoothd) may not actually be running. In such cases we print a warning from now on. Change-Id: I6bf803ab21cb8906bb786bc0549db8e1bb3a0a3b Task-number: QTBUG-45750 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* | Revert "qndefnfcsmartposterrecord.h: Fix build with headersclean check."v5.5.0-beta1Friedemann Kleint2015-04-211-4/+0
| | | | | | | | | | | | | | | | | | | | | | Follow-up commit will fix the headers clean test properly by adding the missing assignment operator to QNdefNfcSmartPosterRecord. This reverts commit 2d4f7fd1f8d29175c8dab88a6d6cc72162511e1a. Change-Id: I9bbe381a429f695e70770ba7de33ecd704d63a86 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Add assignment operator to QNdefNfcSmartPosterRecord.Friedemann Kleint2015-04-212-0/+13
| | | | | | | | | | | | | | Required to pass the headersclean test. Change-Id: I0b274ee90c4172dde99dc2f8f60525466fb8d35f Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Bluetooth LE - add readCharacteristic/readDescriptor (OS X/iOS)Timur Pocheptsov2015-04-205-66/+311
| | | | | | | | | | | | | | Add read descriptor/characteristic support for iOS and OS X. Change-Id: If7547f3756dc37930052c9cefd243d6063bcab1c Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | qndefnfcsmartposterrecord.h: Fix build with headersclean check.Friedemann Kleint2015-04-201-0/+4
| | | | | | | | | | | | | | | | Skip check, required for qtbase/ 6668f5becfb8fcb6d10e42495c6ea5cdba2d15c5. Change-Id: Ie14c1f6201e60f71ce694323bf209422c7dba779 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Fix trailing commas in enumsAlex Blasche2015-04-204-6/+5
| | | | | | | | | | | | | | This was caused by the new headersclean enforcing warnings as errors Change-Id: Idd595fc4cf78411a80ff3dbb46477d5130a04c3e Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
* | Android: Avoid code duplication and don't break readWriteQueueAlex Blasche2015-04-151-82/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | handleFor(Characteristic|Descriptor)() find a handle for a given char and desc. We should reuse it inside the read notifier for chars and descs. In addition, under certain circumstances the read/write queue operation was finished although the queue was not empty yet. This happened when the last read operation failed with a certain type of error. Now we always finish with a call to performNextIO(). Change-Id: Ifdb66c0b03d25ae19db7c49bcbe70eeec2665b6e Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* | Misc fixes based on code review commentsAlex Blasche2015-04-151-3/+3
| | | | | | | | | | | | | | - doc fixes Change-Id: I4a5f413672d30c53be0cfcb022953e8ba3da6a83 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* | Make the QLEService unit test more error tolerantAlex Blasche2015-04-151-10/+11
| | | | | | | | | | | | | | | | | | The service discovery sometimes takes longer than 10s on Adroid and there is really no point in testing the value of the System ID characteristic. This value is different for every device. Change-Id: Ib418e852e8a41db7483c5b47d2d0dc61f28b05b2 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* | Android: Fix read/write error reports when failure during initial callAlex Blasche2015-04-152-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | The BluetoothGatt.[read|write][Characteristic|Descriptor]() functions may immediately return under certain circumstances such as writing a read-only characteristic. So far, this "synchronous" form of error reporting was not handled. Any read error during the initial service dioscovery and its related cache population continues to surpress any read errors. Change-Id: I4987f67f4a0d2afe58cd144a577a19e0f0d43b33 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* | Android: Implement error reporting for char & desc readingAlex Blasche2015-04-156-17/+80
| | | | | | | | | | | | Change-Id: I5652075b4fde4d4927e86f5394baf176f263104f Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Fix enum value breakAlex Blasche2015-04-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new values CharacteristicReadError & DescriptorReadError were introduced in Qt 5.5 whereas all other values of the QLEService::ServiceError enum were introduced by Qt 5.4. The new values should not have been put in between the existing enum values as it breaks binary compatibility. Although the QLEService API is tech preview in Qt 5.4, there is no reason to break the compatibility here. In fact this broke the Android implementation as the enum values are hardcoded on the Java side. Change-Id: Ic263550f281e03c90f04ae8ae55d1054c1fd7ea6 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* | Android: Implement QLEService:readCharacateristic & readDescriptorAlex Blasche2015-04-152-74/+251
| | | | | | | | | | | | | | | | | | | | | | | | | | In general we extend the concept of the write queue. Not only do we queue up write requests but also read requests. The handling of read errors is still missing. Right now the QLEService::error() signal is not emitted when a readCharacteristic() and readDescriptor() call fails. Change-Id: I4b4f086c351c4a29d6e48e8ee9079e9f33f36539 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Further improve QLEService class docs with regards to recent changes.Alex Blasche2015-04-151-16/+43
| | | | | | | | | | Change-Id: Iba3ec93eb4ad1e6bca30f5ddffde2c80fcd25063 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* | Add tests for QLEService::readDescriptor()Alex Blasche2015-04-151-4/+31
| | | | | | | | | | Change-Id: I84f6d76e89036d29f14f8ca326f3fa26e626ff63 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* | Add QLEService tests dealing with read and write error casesAlex Blasche2015-04-151-0/+230
| | | | | | | | | | Change-Id: If3ea946371583b0011e6fb9533d4d5789db3739b Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* | Always read/write the GATT hardware even if meta data reports otherwiseAlex Blasche2015-04-153-15/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is possible that a ATT attribute is not readable or writable. Usually this is reported via descriptors or other types of meta data. However it is possible that the meta data is reporting the wrong information. Therefore we always ensure that every read and write request is forwarded to the hardware. It is up to the hardware to respond to such requests. This change keeps the device usable in cases of buggy device meta data. This only affected writeCharacteristic() calls. Change-Id: Ieb2b95f47aa51c86a8ae7c4bebed4043d7478874 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* | Emit OperationError if char or desc is not part of current serviceAlex Blasche2015-04-152-40/+24
| | | | | | | | | | | | | | | | So far, the OperationError was not set. This improves the error feedback to the user. Change-Id: I37eccb2419d6ede3b9bd4e94b9e0538182d1db7e Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* | Add writeCharacteristic() test to encrypted characteristicAlex Blasche2015-04-151-4/+26
| | | | | | | | | | | | | | The test is not automatic and the right hardware setup is required. Change-Id: I6ad9115e21cbd826cfe647a66f5b58f56a380a6f Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* | Add tests for QLES::readCharacteristic()Alex Blasche2015-04-151-10/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following types of tests are performed: 1. reading of char value that fits into single ATT packet 2. reading of char value that is not readable 3. reading of char value that is requires two ATT packets (blob reads) 4. reading of char value that is exactly as long as one ATT packet (this is different than case 1 as it triggers blob reads where the the first blob read packaet is empty) Cases 1 & 2 are done using the TI Sensor Tag. Cases 3 & 4 require programmable CSR dev kit. Those tests are not enabled by default and require manual setup. Change-Id: I402a7369abbbde6b8309bed8bef6b9a9441cabc9 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* | Bluez: Implement QLES::readCharacteristic()/readDescriptor()Alex Blasche2015-04-156-11/+178
| | | | | | | | | | Change-Id: I418db6ea375b8e29def136b28b4fc25154d4ffe8 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Make new read(Descriptor/Characteristic)() API compile on OSX and iOSAlex Blasche2015-04-101-0/+30
| | | | | | | | | | Change-Id: I19a1fd15a5cdc13b28f77fff02949a7895ddb0cb Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* | Minor doc fixesAlex Blasche2015-04-101-2/+2
| | | | | | | | | | Change-Id: I8bf5a48b96fe27d66cd33adb0926591b2302bf8c Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* | Prevent characteristic write if service is not discoveredAlex Blasche2015-04-101-3/+2
| | | | | | | | | | | | | | | | Previously it was possible to issue the characteristic write request while the service was not discovered. Change-Id: Id370a2ae0f15860e28d1aee0624bdf13517e1e32 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* | Add ability to read characteristics and descriptorsAlex Blasche2015-04-104-5/+110
| | | | | | | | | | | | | | This patch introduces the new API elements without any implementation. Change-Id: Ia2a4d4c588f2f2f219288967ed9cc69b13b682c6 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* | Merge branch '5.4' into 5.5Alex Blasche2015-04-017-117/+296
|\| | | | | | | Change-Id: I177affc6c60fd3cc55e914a7ea2a9aeba260906f
| * 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>