summaryrefslogtreecommitdiffstats
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
...
| * Merge remote-tracking branch 'origin/5.4.0' into 5.4Frederik Gladhorn2014-11-271-0/+2
| |\ | | | | | | | | | Change-Id: I3f85a68066352e0b163f47d2b8ada1d0b8d34f33
| | * Add missing InvalidBluetoothAdapterError to QML discovery modelAlex Blasche2014-11-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Fix corkboard example displayAlex Blasche2014-12-102-81/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1.) The z order of the sticky notes and the corkboard image was totally off. Most likely this is due to a bug in QtQuick's ListView implementation. Now we have a strict parent child relationship which seems to work. 2.) The tag content was always empy. This was due to incorrect usage of QML NdefRecord API usage. Change-Id: I67e9e42e842f1cb051ef62d481b99b3c7b97718c Reviewed-by: Martin Leutelt <martin.leutelt@basyskom.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | | Enable automatic tag polling if message handler is not supported.Alex Blasche2014-12-105-26/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All examples have used message handler registration so far. That's not always supported on all platforms. Neard is one of those platforms against which this this was verified. This patch converts some examples to use manual target detection if handler registration fails. Change-Id: Icfd8b7c695e63351a45b867fd69e9fc5fefb9360 Reviewed-by: Martin Leutelt <martin.leutelt@basyskom.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | | Bluetooth example - lowenergyscanner (OS X and iOS)Timur Pocheptsov2014-12-053-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | Core Bluetooth hides addresses and uses unique UUIDs instead. This patch updates/adjusts lowenergyscanner example to work with UUIDs on iOS and OS X instead of (empty on these platforms) device addresses. Change-Id: Iad0b35250f434b736616fe60e356f2088e6dc279 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | | Merge remote-tracking branch 'origin/5.4' into devFrederik Gladhorn2014-11-274-10/+10
|\| | | | | | | | | | | Change-Id: I6c1eabeea1b3397803e285d13cef147220ff5aa4
| * | 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>
* | lowenergyscanned - update example (iOS and OS X)Timur Pocheptsov2014-11-251-0/+4
| | | | | | | | | | | | | | | | With Core Bluetooth low energy controller must be created using device info, not address (which is invalid on OS X and iOS). Change-Id: I30cb3a061e2cd882981d7e65d636c63e57c36f8e Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | More lowenergyscanner example fixes.Alex Blasche2014-11-112-2/+13
|/ | | | | | | | | This fixes a UI display bug and a hanging UI when the service discovery aborts with an error. Change-Id: Ic84d7b885d777360c8f1396e3973623c1d2c550a 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>
* 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>
* Improve QML Chat example UIAlex Blasche2014-10-0510-51/+36
| | | | | | | | | This makes the example more compliant with general UI color guidelines and cuts out unnecessary code. Change-Id: I1cf7df602e586a667ebd052ed45baef8eafb6955 Reviewed-by: Sami Makkonen <sami.makkonen@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Provide example documentation for new chat example.Alex Blasche2014-09-303-3/+102
| | | | | | Change-Id: I073b0b4432d7e51516584aa1d23c681bb8544392 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* New QML based Bt chat clientAlex Blasche2014-09-3014-1/+600
| | | | | | Change-Id: I235c54591dbbf04aa58c024093beca8c068b4aed Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Update image for NFC poster exampleAlex Blasche2014-09-291-0/+0
| | | | | | | Change-Id: I9dfff5fbbb8ce939de37fcf1b4f03fd7569b9203 Task-number: QTBUG-36496 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com> Reviewed-by: Robert Loehning <robert.loehning@digia.com>
* QtBluetooth : pingpong example on OS XTimur Pocheptsov2014-09-261-12/+12
| | | | | | | Re-order some declarations to make the example work on OS X. Change-Id: I9e74ce7b19a3d749f6ba0f951c1ce013f42729f7 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Fix pingpong exampleAlex Blasche2014-09-262-3/+3
| | | | | | | | | | | | | | | 1.) ElidedMiddle makes the text disappear on Debian and Ubuntu. Swapping elide mode to wrap mode which serves the same purpose 2.) The server was started as rfcomm channel but the client used L2Cap protocol. It may have worked anyway because rfcomm is based on l2cap. In any case this shouldn't be relied upon especially since some platforms don't support l2cap sockets as part of the public API offering. This way the example becomes more widely usable. Change-Id: Ibbcd7029d5843e86af0313037b6433017eb92c76 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Fix reference error in NFC poster exampleAlex Blasche2014-09-161-2/+2
| | | | | | Task-number: QTBUG-37419 Change-Id: I15cedd382ee98845e51da8cd467fda1d941c1332 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Remove QLowEnergyServiceInfoAlex Blasche2014-09-033-15/+0
| | | | | | | | There is no need for this class anymore as QBluetoothServiceInfo covers the same information. Change-Id: I411a8abb68b34a3a4893a67ee9fac096f44bbd62 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Rename descriptorChanged() to descriptorWritten()Alex Blasche2014-09-021-1/+1
| | | | | | | | | | | | | | | | | This is the part of a change to be able to distinguish characteristic write confirmations from characteristic change notifications. Since descriptors cannot receive notifications they won't have a changed() signal and all existing descriptorChanged() signals become descriptorWritten() signals. The changed() signal is emitted when a value notification is received from the device. The written() signal is emitted when a write request from the API user was successful. Change-Id: Ief2491ead4723eaa1bca65a09a09c34458f33630 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Add support for random vs public address selection to lowenergyscannerAlex Blasche2014-09-027-10/+70
| | | | | Change-Id: I963f47f0089d072249b73bdfb0c715d43186b08d Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Update and extend the lowenergyscanner example docsAlex Blasche2014-08-258-3/+121
| | | | | Change-Id: I0be30191cbceb963c7e1bfd7e55a1f2f38772d5f Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* First round of fixes for heartrate example docsAlex Blasche2014-08-257-38/+39
| | | | | | | | | | | Remove old and obsolte code description. Later this will be readded based on the Bluetooth-le-overview documentation which describes the same thing. Improve screenshot section of the example. Change-Id: I499809fa0afdb27f09844678a52d0ce5a492b3c0 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* Provide a documentation overview for Bluetooth LEAlex Blasche2014-08-252-9/+26
| | | | | Change-Id: I252c085f5b3ea6ccc2820a1f59d9228745ae2900 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* Detect secondary services and display service type in lowenergyscannerAlex Blasche2014-07-233-0/+27
| | | | | | | | QLowEnergyService::ServiceState was converted to a flag because a primary and secondary service can be included by other services. Change-Id: I425ce8e3f39ee07cccee2763b57a049a624f6178 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Characteristic and descriptor value() are no longer hex encodedAlex Blasche2014-07-232-8/+7
| | | | | | | | | | | | | There is no point converting the data to its hex representation. The use case at hand will decide it in the current application context. The returned QByteArray is the raw byte array as it comes from the device. This behavior was legacy (introduced by the previous API) and subsequently it was simply adopted. Change-Id: If662c02a5e3c3d37cccb374add02e75522352894 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Rename QLowEnergyControllerNew -> QLowEnergyControllerAlex Blasche2014-07-234-16/+16
| | | | | | | | 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-1/+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>
* Minor anchor optimization pointed out during code reviewAlex Blasche2014-07-171-2/+1
| | | | | Change-Id: Ia83faca0a48174e1faf47491b22db636200f5ea8 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Various improvements to lowenergyscanner exampleAlex Blasche2014-07-164-20/+43
| | | | | | | | | 1.) Improves UI flow 2.) Improves error behavior (e.g. device disconnects) 3.) Adds missing signal/model updates whcih caused unexpected UI flow Change-Id: Icc7edf4945df0e964b5c91b407ce5976a1585b81 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Add simpler API to retrieve descriptor/characteristic for certain uuidAlex Blasche2014-07-161-18/+14
| | | | | | | | This new API is mostly syntactic sugar and reduces the amount of code to be written by API users. Change-Id: I51ff1ea706ac97199646d211e39e79c8140ee74b Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Port HeartRateListener Example to new API.Alex Blasche2014-07-167-232/+273
| | | | | Change-Id: If3af869a8e5d380592d24b7482ff8eb34a11e6a0 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Improve qlowenergyscanner example UIAlex Blasche2014-07-157-46/+60
| | | | | | | | This patch improves the UI. The changes will be validated against a high DPI device at a later stage. Change-Id: Iac15941dd983fb65cc5f3ccf6803c2e95d43c3b4 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Port lowenergyscanner example to new APIAlex Blasche2014-07-1513-149/+260
| | | | | | | | Some minor improvements have been incorporated too but the focus is on the port. More code and UI cleanups are required. Change-Id: I56f226b8418b78190d498df04d67686220a3644e Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Merge branch 'dev' into btleAlex Blasche2014-07-032-11/+26
|\ | | | | | | | | | | | | Conflicts: src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp Change-Id: Ib960b9e8d8800af84d2094bdf26c2652d4c81dba
| * Merge branch '5.3' into devAlex Blasche2014-06-272-11/+26
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/bluetooth/qbluetoothlocaldevice_bluez.cpp src/bluetooth/qbluetoothlocaldevice_p.h src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp Change-Id: Ifb0c01eb8bffbffcd2416ea8d7bf1d36eb1c70f2
| | * Properly deal with pairing errors in btfiletransfer examplev5.3.1Alex Blasche2014-06-162-11/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | Pairing error signals were ignored which lead to a situation in which the UI remained in the "attempting to pair" state. Change-Id: I66f8855cf5ab72d608650b36a844c53e27624452 Reviewed-by: Oleg Shparber <trollixx@gmail.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* | | Make lowenergyscanner example compile after recent API changesAlex Blasche2014-06-111-1/+1
| | | | | | | | | | | | | | | | | | | | | The handle of a characteristic is not longer a string but a number. Change-Id: Ic580ec8e365076704192a466cca9a6bf06786f58 Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
* | | QBluetoothDeviceInfo::coreConfiguration() should return the QFlagAlex Blasche2014-06-042-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Function name was slightly adjusted to reflect the fact that it's a flag. Change-Id: I9c1a2fe64b93c7ae7bd826d856f8b87f985d7473 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* | | Rename permission related API in QLowEnergyCharacteristicInfoAlex Blasche2014-06-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1.) Rename QLowEnergyCharacteristicInfo::Property to QLowEnergyCharacteristicInfo::PropertyType 2.) Rename permissions() to properties() 3.) Return PropertyTypes as return value for permissions()/properties() Change-Id: I5c4037876047354fd691cadc54d3ac6098db4522 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* | | Merge branch 'dev' into btleAlex Blasche2014-05-2652-2639/+1310
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/bluetooth/bluetooth.pro src/bluetooth/bluez/bluez.pri src/bluetooth/doc/src/bluetooth-index.qdoc src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp src/bluetooth/qbluetoothdeviceinfo.cpp src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp src/bluetooth/qbluetoothservicediscoveryagent_p.h src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp Change-Id: I88b22c51a4ee95b067ef8d2b2fddb5cbff4566f8
| * | Utilize QStringLiteral where possibleAlex Blasche2014-05-155-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | The only exception are generated files and cases where QLatin1String based overloads are used (e.g. during QString comparisons) Change-Id: I6f36789fb8acb3b30c1dc1f8a920b118a979d74f Reviewed-by: Kai Koehne <kai.koehne@digia.com>
| * | Merge branch 'stable' into devAlex Blasche2014-05-0811-37/+87
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/bluetooth/qbluetoothlocaldevice_bluez.cpp src/bluetooth/qbluetoothserver_p.h src/bluetooth/qbluetoothsocket_qnx.cpp Change-Id: I08792f10155f9b4e6af30066b70e24b48985ddd6
| | * Merge remote-tracking branch 'origin/release' into stableJani Heikkinen2014-04-2310-36/+86
| | |\ | | | | | | | | | | | | Change-Id: Ic86710cdf2550f5cf70c81af3f351d6712cd1b0e
| | | * Doc: Improved example documentationJerome Pasion2014-04-1410-36/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -include a section about running the example (from qtbase/doc/global) -added links to Qt Bluetooth or Qt NFC -updated copyright year -added markup to a string and other small corrections -added \brief Task-number: QTBUG-33597 Change-Id: Ia65821549a0e2e3fbf164188982114b4741be233 Reviewed-by: Alex Blasche <alexander.blasche@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
| | * | Use extended SDP discovery in btchat example.Alex Blasche2014-04-141-1/+1
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Android's minimal service discovery is very limited and more often than not fails entirely. Using FulklDiscovery dramatically increases the chance to find the remote SPP chat server. Task-number: QTBUG-38140 Change-Id: I1df55f74a6896312236ef06485c4063c9e893e6c Reviewed-by: Nedim Hadzic <nhadzic@blackberry.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * / Replace all occurrences of Q_EMIT with emitOleg Shparber2014-04-292-13/+13
| |/ | | | | | | | | Change-Id: Ieec72048837abe70b0187086b265bcde96c7d6cd Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * Remove old Bluetooth tennis exampleAlex Blasche2014-04-0222-2579/+1
| | | | | | | | | | | | | | | | And update the documentation around the removal. The new ping pong game example is written in QML and much easier to maintain. Change-Id: I885d0c82b8f6eb8935c8f030ebb0adef9c1afc85 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
| * QML PingPong example addedNedim Hadzic2014-04-0213-1/+1186
| | | | | | | | | | | | | | | | | | Example presents the socket communication between two Bluetooth devices. The basic concept is the ping pong game, where coordinate updates of the ball and pedals are sent via socket. Change-Id: I61d8eb0baaa11c1485a923bb0a6ae6b89cd0e6a9 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>