summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qlowenergycontroller.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Don't register meta types during static init time5.5Alex Blasche2015-11-301-6/+5
| | | | | | | | | | The QMetaType register my not be up and running by the time we attempt these meta type registration. Change-Id: I1a857a936a24b4b00a49574fac311c08c09b3d5a Task-number: QTBUG-49455 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Remove some Tech preview remnants from Bluetooth documentationAlex Blasche2015-05-181-3/+0
| | | | | Change-Id: Ifcae07ef5e046f45848495f4d6af973cde713fdf Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* Reduce platform specific code linesAlex Blasche2015-05-121-0/+4
| | | | | | | | | | | | 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-121-0/+11
| | | | | | Task-number: QTBUG-45435 Change-Id: I3ded6bf88d3980481e386073ce160d5d54520034 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
* Update copyright headersJani Heikkinen2015-02-161-7/+7
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I3822a6484e8f7a420330de1cb1aeb0c3d1cf41b7 Reviewed-by: Sergio Ahumada <sahumada@texla.cl>
* Document Android's caching of BTLE service data.Alex Blasche2014-11-261-0/+7
| | | | | | | | | | It can be confusing. As more platforms are supported, this behavior needs to be verified too. The Bluez implementation does not exhibit this cache behavior. Change-Id: I42dd003f2ac2632c32e48b1b1784e4ca529950f3 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-11-211-1/+3
|\ | | | | | | Change-Id: Ie8293c006bb74cdf324073044a0c622d44651324
| * 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>
* | Fixes for QLowEnergyController unit test on AndroidAlex Blasche2014-11-111-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | It turns out mutliple connections to the sam remote device are possible. The limitations on Linux are implementation specific. We lift the general API limitation and document the insufficient behavior on Linux. A bug has been filed to track this limitation. On Android, unit tests require widgets support to run as we need a QGuiApplication. Change-Id: I37c487246ea6115d3441ca91a920279adbdf726e Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Add enum for failure to connect to remote BTLE device.Alex Blasche2014-11-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | In addition we restrict the emission of disconnected() signal on Android to those cases when we had an established connection. [ChangeLog][QtBluetooth][QLowEnergyController] QLowEnergyController::ConnectionError enum value added. Change-Id: I3602e303e61a872855925a26e695f2bc880cf540 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* | Android: Add ability to (dis)connect to BTLE devices on AndroidAlex Blasche2014-11-041-0/+12
| | | | | | | | | | | | | | | | and keep tracking the connection state Change-Id: If4d05fa18c78802ae06096884fba78eed123e77f Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* | QLEController(QBtDeviceInfo, QObject*) ctor is new, mark it as suchAlex Blasche2014-10-281-1/+3
| | | | | | | | | | | | Change-Id: I861c69c0afc8a85a7c1127a9de4e76b9d486c0bc Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* | Add QLeController ctor that takes QBluetoothDeviceInfoAlex Blasche2014-10-171-0/+22
|/ | | | | | | | | | This ctor is required for OSX as the remote device address cannot be retrieved. On other platforms this ctor is syntactic sugar to be able to directly feed the device search results into the controller. Change-Id: I4839a48861ebc625740e37aee5a779deeb32f96d Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Make it more obvious that QLowEnergy* classes are Tech previewAlex Blasche2014-09-261-0/+3
| | | | | | | | Although no larger changes are expected the QLowEnergy* classes only provide a limited API commitment. Change-Id: I244403b8818c2b34a97c8d6f2633e4b94646e49b Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* Support writing of long characteristic valuesAlex Blasche2014-09-081-1/+1
| | | | | | | | | | | | | | | | | In this context long means the characteristic value is longer than the maximal ATT message size. In such cases the Bluetooth spec demands a combination of PrepareWrite commands finished by an ExecuteWrite. This is very similar to reliable writes which use the same combination of prepare/execute but permit the atomic writing of multiple characteristics at the same time. Reliable writes are not (yet) supported by the public API. Also, this works for characteristics only. Long descriptor writes will follow. Change-Id: Id139ad1848c92ca5ebf1bd1dfe8e3da297312d4f Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Improve extended properties docs and fix qdoc errorv5.4.0-alpha1Alex Blasche2014-09-051-1/+1
| | | | | | | This adds some valuable piece of information from the Bluetooth spec. Change-Id: Idb0211e23a3fc03674f7878eaebea9c529dbd69d Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Add a way to detect that the QLEController is performing a discoveryAlex Blasche2014-09-021-0/+5
| | | | | Change-Id: Ie3146c136461ad4ecde4169f3b30dda0c814ca7b Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add support for random vs public remote address connectionsAlex Blasche2014-09-021-0/+34
| | | | | | | | | | | | | | | | This is required to be able to connect to devices which use random device addresses. Some platforms can determine this flag based on their last device scan. The flag is likely to be provided as part of QBluetoothDeviceInfo once the information is available. Unfortunately non-le scan on BLuez doesn't inform about the flag. The LE device scan is currently not implemented and, even worse, requires root privileges on Linux. The new API element permits the selection of the correct type when the scan doesn't detect the type properly. Change-Id: I8e7118658a7c927e0ea07b0d639d57f9483cb33c Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update license headers and add new licensesJani Heikkinen2014-08-241-18/+10
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I7a8b8b787fcae9a178794364efdefe1021d10b1b Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Add class documentation for QLowEnergyServiceAlex Blasche2014-08-181-1/+8
| | | | | | | This class is part of the new Bluetooth Low Energy feature in Qt 5.4 Change-Id: If10cac1ac1312cb63137c854a4456bf2d646f630 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* Add class documentation for QLowEnergyControllerAlex Blasche2014-08-151-1/+205
| | | | | | | This class is part of the new Bluetooth Low Energy feature in Qt 5.4 Change-Id: Ib1a8000b4ad256400f18e241a296fe1ffa97414a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* Support reading of chars & descs if their value is larger than MTUAlex Blasche2014-08-131-9/+28
| | | | | Change-Id: I49945b13f9b2ee025541c7f689b55fa994c8057d Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Implement support for QLowEnergyService include hierarchies.Alex Blasche2014-08-131-0/+24
| | | | | Change-Id: Id11d2dcb06bd04bc1d911d746002fbbc53326ffa Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Rename QLowEnergyControllerNew -> QLowEnergyControllerAlex Blasche2014-07-231-0/+317
| | | | | | | | Moves the new API into its place and completes the removal of the old API. Change-Id: I10a285e24e288aeb747cb1606574e27a4bf57308 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Remove old GATT APIAlex Blasche2014-07-231-261/+0
| | | | | | | | | The subsequent patches will rename QLowEnergyControllerNew to QLowEnergyController and fix up the documentation fragments which still point to the old API. Change-Id: I084e6b1a85a17f424702018f3ad7047bda35d46a Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Fix BTLE related qdoc errorsAlex Blasche2014-06-041-33/+32
| | | | | | Change-Id: Id1a56b0ed050fd9cebee8738351e560b442d748f Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Improve handling of QBluetoothUuid::CharacteristicType enumAlex Blasche2014-06-041-0/+1
| | | | | | | | | | | - Sort enum values based on their hex values - Add QBluetoothUuid::characteristicToString(CharacteristicType) - Rename QBluetoothUuid::CharacteristicDescriptor -> DescriptorType - Add a couple of missing \since tags Change-Id: I9724eb2f43c6978f07420bf6ec4c8557ad9efbaf Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Added and improved error handling in controller classNedim Hadzic2014-03-251-3/+26
| | | | | | | Error enums added and implemented together with examples. Change-Id: I912c396080ee9a6b87f41104eb7e41f8c62abf8b Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Bind QLowEnergyController to a particular local adapter.Alex Blasche2014-03-151-3/+19
| | | | | | | | | This simplifies the internal LEServiceInfo logic and let's us later deal with multiple adapters. Change-Id: I7d3e991207cd6571b5d644ae99c6bf1a2c99ec68 Reviewed-by: Nedim Hadzic <nhadzic@blackberry.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Bluez BLE write characteristic and descriptor value moved to controllerNedim Hadzic2014-03-131-0/+24
| | | | | | | | In the QLowEnergyController class write options for characteristic and descriptors are added. Change-Id: I5cc5dab1d3d2ef75d99eae045959f70524e65c91 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* BLE characteristic notification moved to controller classNedim Hadzic2014-03-111-20/+2
| | | | | | | | Enable and disable notification communication moved to the QLowEnergyController class. Change-Id: I34ceb10a5dec067133399257d544dd56db7e626e Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* BLE communication moved to controller classNedim Hadzic2014-03-111-113/+10
| | | | | | | | | BLE communication code was implemented in QLowEnergyServiceInfo class. It is moved now to the QLowEnergyController class. Needed adjustments are done in order to make this work. Change-Id: I9206d2324ad59f79f4e035509e23f5c7f7cfb328 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Renaming QLowEnergyServiceInfo methodsNedim Hadzic2014-02-211-9/+24
| | | | | | | | | Ensures that QLowEnergyServiceInfo and QBluetoothServiceInfo are more alike. Tests and examples updated as well. Change-Id: I0f6a97900891a9673f99578bdc8d156a8c403513 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Fixed couple minor things for QNX platformNedim Hadzic2014-01-141-0/+2
| | | | | | | | Connecting error signals in QLowEnergyController, deleting pointers in descructor in QLowEnergyProcess and added loading btapi for QNX platform. Change-Id: I8785583e38b4e9eaa7b2cf1103df4ab206392a5a Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Implemented the characteristic error handling.Nedim Hadzic2013-11-281-1/+20
| | | | | | | In case of enabling notifications and writing values to the LE device, some errors can occur and which are reported now. Change-Id: I02c6deab925d06916c5b56705c9423386400f713 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Removed get part in return methods.Nedim Hadzic2013-11-281-9/+9
| | | | | | | In case method name is getValue(), it was renamed to value(). Change-Id: I914e16bd0b630c0810932c52af14f091cc35bd8f Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Additional constructors to QLowEnergyDescriptorInfo class and method ↵Nedim Hadzic2013-11-111-5/+6
| | | | | | | | | modification in QLowEnergyCharacteristicInfo class. Characteristic notification change and solving the warnings were implemented. Change-Id: I8abec8b580e477578b4bc1dfd1e92e838ef7a372 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Implemented Bluetooth Low Energy gatt service and characteristics discoveryNedim Hadzic2013-11-041-0/+282
Bluez v4.x does not have total support for LE devices, a new approach, using gatttool command was implemented. Auto-tests and documentation will be in other commits. Change-Id: Iee711cc111199e15956052eebb7593bd3a5e27c8 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>