summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* QBluetoothDeviceDiscoveryAgent - timeout on OS X/iOSTimur Pocheptsov2014-12-051-1/+1
| | | | | | | | On OS X we have to first make Classic device scan and then LE device scan. Shorten Classic discovery from 20s to 15s. Change-Id: I653b2d9f6c911bdf09c900735273bd6d1e95b078 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Provide user visible strings/translations for new BTLE uuidsAlex Blasche2014-12-051-1/+81
| | | | | | Change-Id: I02e4b3518c57e120d46fdcc427663a5910e01a97 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Add new environmental sensing descriptor typesAlex Blasche2014-12-052-2/+16
| | | | | | Change-Id: Id0ed9503da1cff66a04a83196cf61863289b98ab Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Add newly adopted BTLE service/characteristic type uuidsAlex Blasche2014-12-052-11/+191
| | | | | | Change-Id: I57eff858c2e5700ac814d24fb173c269ebff5fd3 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Client characteristic configuration (OS X and iOS)Timur Pocheptsov2014-12-052-2/+10
| | | | | | | | If client characteristic configuration descriptor has an indication/notification bit set - enable ("automatically" == no explicit user's request) notifications. Change-Id: I839aabd6f5513141f66c8e4467618b3edd523350 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Update supported platforms and feature in QtBluetoothAlex Blasche2014-12-052-17/+8
| | | | | | | | | The Low Energy API is final from Qt 5.5 onwards and OSX and iOS are platform additions. Change-Id: I73f18b3169c5e1438af4d90c6655eabb515e0d39 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* QLowEnergyCharacteristic - cached values (OS X and iOS)Timur Pocheptsov2014-12-041-2/+6
| | | | | | | | Cache a characteristic's value in update/write notification only if characteristic has a 'Read' property. Change-Id: Idc705e0c4f2ee704a80bf37b4e59e1dd09ca9e4f Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Low energy descriptor - value on iOSTimur Pocheptsov2014-12-042-0/+59
| | | | | | | | On OS X CBDescriptor's value is always NSData, on iOS it can be NSData, NSString, NSNumber. Change-Id: I6ffa4b813238ec26759508a012fa6e236db04c63 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Don't update cached char value when property is not readableAlex Blasche2014-12-044-6/+23
| | | | | | | | | In addition we update the documentation to reflect the slightly changed API behavior. Change-Id: Ieddee750aa35a32d3c01213dfbf678ee2a1d88d7 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Android: enable writing of characteristics without response modeAlex Blasche2014-12-042-5/+24
| | | | | | Change-Id: I9c26aaa11857db8dc33a99d42347a9b7f6281ad7 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* QLowEnergyController/Service - enable for iOSTimur Pocheptsov2014-12-032-3/+13
| | | | | | | Enable Core Bluetooth-based version for iOS. Change-Id: Ica13fdc6c01744713483771e7c8ad6153c9fccdf Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Bluez: Do not update char value() if char is non-readableAlex Blasche2014-12-031-3/+6
| | | | | | Change-Id: Ia075bfb4174c7a2b90376b215f3366076d9ae1c9 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* QBluetoothLocalDevice - isValid, tests (OS X and iOS)Timur Pocheptsov2014-12-031-5/+1
| | | | | | | | | | | Cancel the previous modification - even if BT is off, the device is valid unless we create it with some address (in the 'OFF' state I can not verify any address and the device is considered invalid). Enable (back) auto-test - if BT is off we just skip the test (as it's done in other test functions). Change-Id: I8b013af6a73eab9699a91834e197716836b00e78 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Android: Fix automatic notification sending when device demands itAlex Blasche2014-12-031-0/+18
| | | | | | | | | | | | | Some BTLE devices enable notifications be default. However since Android's BTLE API requires a call to BluetoothGatt.setCharacteristicNotification(..) to forward them, we have to peek at the ClientCharacteristicConfigurations during the service detail discovery and tell Android to forward the notification when required. Change-Id: Ief419404694d70a1373218c1b8275ef868a49ddb Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Merge "Merge remote-tracking branch 'origin/5.4' into dev" into refs/staging/devAlex Blasche2014-12-036-2/+23
|\
| * Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-11-276-2/+23
| |\ | | | | | | | | | Change-Id: I6c1eabeea1b3397803e285d13cef147220ff5aa4
| | * 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-213-2/+9
| | |\ | | | | | | | | | | | | Change-Id: Ib79fe0b33b405cdf6fee87f97f6ebb86bb79d976
| | | * 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>
* | | | QLowEnergyService - ClientCharacteristicConfigurationTimur Pocheptsov2014-12-035-36/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Core Bluetooth has a special method to enable/disable char update notifications and even more - Core Bluetooth does not allow to use writeValue:forDescriptor: with ClientCharacteristicConfiguration - that's why need this 'workaround'. Change-Id: I4a01690a76aabf62397321ca6ba22c4abb1c420c Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | | | QBluetoothLocalDevice - bug on OS X (isValid)Timur Pocheptsov2014-12-011-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If BT adapter is off local device is invalid on OS X: no way to access information like address/name, no way to turn the device on, all operations fail. Considering it's valid breaks the logic: you can pass any address to such a device (invalid non-null address) and device can not check if it's valid or not. Change-Id: I25f70723d566d4de8f993fc9c9a9e6867f936b7f Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | | | QLowEnergyController - service state (OS X/iOS)Timur Pocheptsov2014-12-011-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a bug - call setState on a service instead of stateChanged (which is just a signal not actually chanding the service's state). Change-Id: I243f1f6c6775a5592357a443a2f180e4afcf8219 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | | | QLowEnergyController - concurrent characteristic writesTimur Pocheptsov2014-12-015-78/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Qt's API assumes that several write operations must be serialized (this is not guaranteed with Core Bluetooth AFAIK). I can enqueu only write with response operations, otherwise I never know when to do the next write. Change-Id: Iaa83514748358437e2c39335ab142d084ff197e3 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | | | Android: Add characteristic indication supportAlex Blasche2014-12-011-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At this point in time characteristic indication is very much under- documented. We have to make some guesses along the way notifications work. Also, it turns out the code already supported indications but was not very future proof. If the ClientCharacteristicConfiguration is expanded by future Bluetooth specifications the notifications could have been enabled despite the two relevant bits not being set. All that was required was to write {0xFC FF} and the notifications would have been enabled. This was due to assumption that only the byte array {0x00 0xFF} being the disabling data set. Change-Id: I6c54d557f51977418f91baf658b62e1121785029 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | | | QLowEnergyController - writeDescriptor (OS X/iOS)Timur Pocheptsov2014-12-016-29/+241
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Core Bluetooth - based implementation. Change-Id: Ie642a13ae9a4d75401dd10648fac6eeee4123a3b Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | | | Update QLEService::Type() documentation for Android specificsAlex Blasche2014-12-011-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Android doesn't expose the required API elements to set the correct service type. Therefore all services are by definition primary services too. Change-Id: Ifae4a1baa856382d481ab377b98f05b5b9974a85 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | | | Android: Implements QLEService::includedServices() and type()Alex Blasche2014-12-012-0/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately it is not possible to say whether a service is primary or secondary on Android. The platform doesn't expose this information. Change-Id: I9b0aad191308120d2d1992a5e7736b985a375e30 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | | | Bluetooth LE - handles/chars/descriptors/services (OS X and iOS)Timur Pocheptsov2014-12-014-108/+165
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt we work with handles (real for Bluez, emulated for Android/iOS/OS X). Core Bluetooth has its own (quite primitive and inconvenient) data structures (arrays of objects, containing nested arrays). To make things not so ugly I'm adding several maps to be able to find a characteristic/descriptor/service using a handle from Qt's layer. Also modify writeCharacteristic to use this new 'addressing scheme'. Change-Id: Ic822c9aa82a4df1e9c4cf4c673451cac8006b9ba Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | | Fix missing update of cached characteristic valueAlex Blasche2014-11-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we receive a characteristic update we have to update the cached value on the Qt side. This was accidentally missed during an earlier commit. Change-Id: I0f84e35ee44e38d1e46b7ddcd4e78b7e216e49d5 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | | QLowEnergyService::writeCharacteristic - implementation for OS X and iOSTimur Pocheptsov2014-11-268-15/+468
| | | | | | | | | | | | | | | | | | | | | writeCharacteristic - implemented with Core Bluetooth for OS X and iOS. Change-Id: Ia228ff451e1e6d7b6fb7de6cad29198aa9257602 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | | 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>
* | | QLowEnergyController - service details discovery (OS X and iOS)Timur Pocheptsov2014-11-256-15/+588
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement details discovery: characteristics, their values (if any), descriptors. We have to emulate handles (QLowEnergyHandle) - while Core Bluetooth internally has the notion of handles, it never exposes them as a public API. Change-Id: I09158433ce6835dd34fe8ad47d047212dab59e8e Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | | Merge branch 'neard' into devAlex Blasche2014-11-2531-8/+1893
|\ \ \ | | | | | | | | | | | | | | | | | | | | This merges the new Neard backend for QtNfc into Qt 5.5 Change-Id: I67a13add5b3655ba4f2f3a8caa54d6a010093362
| * \ \ Merge branch 'dev' into neardAlex Blasche2014-11-25277-4326/+23875
| |\ \ \ | | | | | | | | | | | | | | | Change-Id: I700bda01e7bb96331458fd98d1940cbd44f4eb78
| * | | | Update documentation to reflect new Linux platform supportAlex Blasche2014-11-132-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes a few qdoc errors along the way. Change-Id: Ia0caf483f5c86dbd5c47f3d96a6d5bcf622db312 Reviewed-by: Martin Leutelt <martin.leutelt@basyskom.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| * | | | Extend QML NearField item to support neardMartin Leutelt2014-10-172-6/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The property 'polling' has been added to query the current state and to allow the user to start and stop target detection. The signals 'tagFound' and 'tagRemoved' have been added to allow the user to react to those events. Change-Id: Ieb07b5b799679982429a66f1790fa9985c55a24d Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * | | | Updated documentation to include neardMartin Leutelt2014-10-161-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I5fbcc7975f9d01374ac296d6a5528974e8513601 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * | | | Fixing crash when stopping poll loopLutz Schönemann2014-10-092-30/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When stopping the neard adapter poll loop without starting it from the same QNearFieldManagerPrivateImpl instance the m_adapter variable does not hold a valid pointer to an instance of OrgNeardAdapterInterface. This patch fixes that issue by creating a temporary instance on the stack to call the appropriate function on the D-Bus interface. Change-Id: I42ced8d00ca9f87756c8f3f81ca78969702344c1 Reviewed-by: Martin Leutelt <martin.leutelt@basyskom.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * | | | QNearFieldManager::registerNdefMessageHandler returns -1 on errorAlex Blasche2014-10-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This brings it in line with another function overload. Change-Id: I9120f755790e60b5073024133955c2b10671308f Reviewed-by: Martin Leutelt <martin.leutelt@basyskom.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * | | | Neard: porting to neard v0.14Martin Leutelt2014-09-3028-447/+948
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The dbus interfaces have been adapted to the state of neard v0.14. Reading from the supported tags works, writing to them works to a limited extent. Change-Id: Ib0704c6d951baa31ad58484e0c11534aaad359be Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * | | | Neard: Implement tag writeFabian Bumberger2014-07-081-3/+75
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I423658f5365ed51ccb117f5e388b93cc3ab2b8f9 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * | | | Add neard ndef record parsingFabian Bumberger2014-07-025-10/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the neard dbus interface and provides logic to parse data from this interface. Change-Id: Id9a5df88d75c71cf6f2b320afed644a38d03c38d Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * | | | Implement tag detected and tag lost signalsFabian Bumberger2014-07-023-15/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch also implements reading the record pathes from the tag. Change-Id: Ia19ff235149cb91d3cbf7ae7c043d07d6aeae429 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * | | | Introduce a logging category for the neard implementationFabian Bumberger2014-07-024-10/+66
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I3bee8a5c2e3bee9a83ddcb6f3a5b2b42fdb24d89 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * | | | Clean up neard implementationFabian Bumberger2014-07-024-32/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Besides some code cleanups this patch makes sure to only build the neard implementation if dbus is available. This patch also deals with the possibility that the neard daemon is not running on the system. Change-Id: I8546d34b808d8236e0434e00cf5950b31e20cb72 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * | | | Add QNearfieldTarget neard implementationFabian Bumberger2014-07-023-1/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is mostly a skeleton implementation. There is no support yet for reading records or ndef messages. Change-Id: Id521468517c04b088152e15a327cff9b26fa346f Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * | | | Initial implementation of the QNearfieldmanagerFabian Bumberger2014-07-025-4/+338
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While the QNearFielManager is not functional yet, this commit contains a sceleton implementation on which the future implementation can be built on. Change-Id: I075b42bb74051db4629e7a93b2aaea89785807b9 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * | | | Add neard Tag dbus interfaceFabian Bumberger2014-07-024-2/+120
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Id4152a5c6d622d8a0195d30d28b9ac8714491b92 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * | | | Add C++ Dbus neard interfacesFabian Bumberger2014-07-015-0/+224
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ice6343bf486f4a908704de14772e8d4464106f4a Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * | | | Add Neard dbus xml interfacesFabian Bumberger2014-07-012-0/+65
| | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ie3661fe2b35735e22613e1c7ce0a408652b69970 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>