summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* QBluetoothTransferReply - fix a memory leak.v5.4.0-beta1Timur Pocheptsov2014-10-102-8/+8
| | | | | | | Fix a potential memory leak in _bluez and _qnx versions of copyToTempFile. Change-Id: I4c21d25b88620747adaaea8f2da561ca0b3d5df6 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Improve QBluetoothSocket::close() documentationAlex Blasche2014-10-101-0/+9
| | | | | | | | | | The disconnected() and stateChanged() signals are delayed which may easily overlooked by API users. This change specifically points out this behavior difference. Change-Id: I3a9e9c656da50c9efe455cd2dbf903a2849e36da Task-number: QTBUG-41770 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* Doc: Applied title case to section1 titlesNico Vertriest2014-10-093-5/+5
| | | | | | | Change-Id: I4bf466a3f6c34b338f741ec003343b572e73d738 Task-number: QTBUG-41250 Reviewed-by: Topi Reiniö <topi.reinio@digia.com> Reviewed-by: Martin Smith <martin.smith@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>
* Add new QML Chat example to Bluetooth module example listAlex Blasche2014-10-021-9/+12
| | | | | | | | | The change makes a few minor cosmetic changes (e.g. sorting by alphabet and better descriptions) to the overview page too. Change-Id: I20c6e4735dd531b457fdf52b59f00e8a285a7397 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Remove nfctestserver test applicationAlex Blasche2014-10-018-609/+0
| | | | | | | | | It is realted to nfc socket streaming which we don't support at this stage. Change-Id: Idae80decad7aa2cdf7eb67b82ddc3e20384df8b8 Reviewed-by: Martin Leutelt <martin.leutelt@basyskom.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Fix QBluetoothServiceInfo uni test on platforms using fake server portsAlex Blasche2014-09-302-6/+56
| | | | | | | | | | Those platforms require a running QBluetoothServer to satisfy the prerequisites of calling QBluetoothServiceInfo::registerService(). This requirement is imposed by the public API contract anyway. Change-Id: I2498030fa2787df9745580cd744886693945fe4f Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Android: Fix broken QBluetoothServer::isListeningAlex Blasche2014-09-301-1/+1
| | | | | | | | | | | | | | | | | The function didn't return true right after calling listen(). This is caused by the fakeserverport implementation. On Android listen() doesn't really initiate the listen until QBluetoothServiceInfo::registerService() was called. We need to check the fakeServerPort registration to check whether we are listening already. [ChangeLog][QtBluetooth][Android] Fixed broken QBluetoothServer::isListening(). It returned false right after a successful call to listen(). Change-Id: I24de02602b401ecbbedaafd19d824170a181e03f Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Provide example documentation for new chat example.Alex Blasche2014-09-304-3/+103
| | | | | | 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-3015-2/+600
| | | | | | Change-Id: I235c54591dbbf04aa58c024093beca8c068b4aed Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Extend docs on Minimal SDP discoveryAlex Blasche2014-09-301-4/+10
| | | | | | Change-Id: If1add78a34f4d01313e022bd7af1d53ac2abd535 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>
* Fix tr()-context in src/bluetooth/qbluetoothservicediscoveryagent_qnx.Friedemann Kleint2014-09-291-1/+1
| | | | | Change-Id: I161cac536d261c517a8323777561f8380b7d4bfb Reviewed-by: Alex Blasche <alexander.blasche@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>
* Don't permit write of non-existing or empty data via socketAlex Blasche2014-09-261-0/+7
| | | | | | Change-Id: Ic8387dd411a9784b6163a15d423cdeaa5e63ea30 Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> 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>
* Add \since tag to NFC classes which didn't have the tag yetAlex Blasche2014-09-269-0/+9
| | | | | | | | Internal or not yet released classes have been skipped Change-Id: I5bc3e08f87348ae8df61b923d7cdb81186ebebc8 Task-number: QTBUG-36775 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Add \since to all Qt Bluetooth classes which didn't have the tag yetAlex Blasche2014-09-2614-0/+28
| | | | | | Change-Id: I50d818294cb53962bca2b08edbfdc4558890777c Task-number: QTBUG-36775 Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Make it more obvious that QLowEnergy* classes are Tech previewAlex Blasche2014-09-264-0/+12
| | | | | | | | 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>
* QNX/BB10 fix build failureWolfgang Bremer2014-09-221-1/+1
| | | | | | | service was not declared, it should be lowEnergyService Change-Id: I1419dbaa865b0bcce51ad2e8cf13c24cef40f1fa Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Remove not needed invokeMethod() calls when emitting finished() signalAlex Blasche2014-09-193-13/+19
| | | | | | | | | | | Internally the transfer reply starts via QueuedConnection. Therefore the finished signal doesn't have to be delayed even further. In addition document the tight restriction when being interested in signals from QBluetoothtransferReply. Change-Id: I0358140e96e1e9709158310c493f34ea5e40582a Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Add missing error() signal to QBluetoothTransferReplyAlex Blasche2014-09-186-8/+47
| | | | | | | | | | | | The signal makes error handling much more conveniant. One error situation on QNX did not emit the required finished()/errorType() signals when required. A few minor typo fixes. Task-number: QTBUG-38983 Change-Id: I89c3fbee43921c8894a0ab200ee5550e7dc44543 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Merge "Merge remote-tracking branch 'origin/5.3' into 5.4" into refs/staging/5.4Frederik Gladhorn2014-09-170-0/+0
|\
| * Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-09-160-0/+0
| |\ | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: Id031d60ca79d8c90063c1d12903e75a418f47290
| | * Bump version5.3Frederik Gladhorn2014-08-291-1/+1
| | | | | | | | | | | | Change-Id: Ie6b24bd43dde20efcae1ac6ca938a7cccae969d3
* | | Encrypt all read/write commands which come back with related errorsAlex Blasche2014-09-172-29/+95
| | | | | | | | | | | | | | | Change-Id: I1249009d90ce9d0a7cc1e1b86a0cde8ca23ad917 Reviewed-by: Lars Knoll <lars.knoll@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>
* | Upgrade ATT reads requests to encrypted links when indicatedAlex Blasche2014-09-164-8/+138
| | | | | | | | | | | | | | | | | | | | | | | | This is triggered if the GATT server complains about missing authorization/encryption when reading an attribute. The same mechanism has to be applied to all remaining read and write types Change-Id: Ia8330951ffdc61afb98424557bbeffe444e9a812 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Add class for HCI protocol interactionAlex Blasche2014-09-164-2/+522
| | | | | | | | | | | | | | | | The first step is to monitor encryption changes. Later we will add more events and possibly commands as needed. Change-Id: I03ca547678bbfc971f53b32b1efde601685dd7e1 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Add ability to set the security level of the l2cp connectionAlex Blasche2014-09-163-0/+105
| | | | | | | | | | | | | | | | Later this will be needed to read/write authorized and encrypted characteristic/descriptor values. Change-Id: Ibc70b65b51723d6e0668ee177f5dbd1df2ba047f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Fix a small rfcomm related typo in warning on AndroidAlex Blasche2014-09-121-1/+1
| | | | | | | | | | | | Change-Id: Id57a4da506ca34f01d615eef8a38b812bf3df13b Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* | Add limitations to the API documentationAlex Blasche2014-09-081-0/+5
| | | | | | | | | | | | | | | | | | These limitations are not expected to be fixed during Qt 5.4 release. They are tracked by QTBUG-41174 & QTBUG-41175 Change-Id: Ibc102e35fe5d459f424a704572ec78436ca9d6d6 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* | Add support for long descriptor value writesAlex Blasche2014-09-085-36/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the combination of prepare/execute commands to implement writing of descriptor values which are longer than ATT MTU size. Long characteristic writes are already implemented and the related code was adopted to cater for descriptor writes. At the same time we remove related TODO's from the code base. Last but not least ensure that writing of a descriptor with the same value as the pre-existing value is possible. This restriction is not helpful as some BTLE devices use writing of values as trigger for internal events and notifications. This was encountered on a test device when implementing the long write support. Change-Id: If765dc9393239dbbd1bb6a9bc942287b28d65cd6 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* | Misc TODO and test fixesAlex Blasche2014-09-084-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 1.) Use updateValueOf*() where possible to channel all value changes through the same gate. 2.) BTLE connects have a much larger timeout when the remote device is not present. The device discovery could still turn up this device due to existing pairing information. 3.) Remove obsolete write long characteristic TODO Change-Id: I5b5815b0c3b99f8c4f87e0f1747ac6f1e274e592 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* | Rename defines which indicate ATT header sizesAlex Blasche2014-09-081-43/+43
| | | | | | | | | | | | | | | | Adding HEADER to the name makes it more obvious which part of the message is meant. Change-Id: I207db40134db1ce558ccf89c3fd8b53fa68891f6 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* | Support writing of long characteristic valuesAlex Blasche2014-09-084-13/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-053-2/+4
| | | | | | | | | | | | | | This adds some valuable piece of information from the Bluetooth spec. Change-Id: Idb0211e23a3fc03674f7878eaebea9c529dbd69d Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Set ATT as protocol descriptor for BTLE SDP recordsAlex Blasche2014-09-034-7/+46
| | | | | | | | | | | | | | | | At the same time we fix up some cases where the ProtocolDescriptorList was not a list within a list. Change-Id: If0ec6cf6374902a47a905edd08523906be9fd86b Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Remove QLowEnergyServiceInfoAlex Blasche2014-09-0318-661/+68
| | | | | | | | | | | | | | | | 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>
* | Improve documentation on how to enable characteristic notificationsAlex Blasche2014-09-022-1/+70
| | | | | | | | | | Change-Id: I87575fb7b5115a536e12c0a00374cc0e67428706 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Add QLES::characteristicWritten() signalAlex Blasche2014-09-026-139/+116
| | | | | | | | | | | | | | | | | | | | | | | | The previous characteristicChanged() signal was emitted when the characteristic was updated due to a notification and when the value was changed using writeCharacteristic(). This meant that it was not possible to distinguish the two use cases. The new signal is only emitted in response to writeCharacteristic() whereas the old signal is only emitted when the peripheral indicates a change. Change-Id: Ie8797090f9463ae0e7fb053a42a79afa6829ca75 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Rename descriptorChanged() to descriptorWritten()Alex Blasche2014-09-027-14/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 BTLE write command (BlueZ/Linux)Alex Blasche2014-09-028-41/+382
| | | | | | | | | | | | | | | | So far, we only supported write requests which reply with write responses. Change-Id: Ibdad36dcf18dec23260f003911b9361cc4ab1e3d Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Add a way to detect that the QLEController is performing a discoveryAlex Blasche2014-09-026-5/+69
| | | | | | | | | | Change-Id: Ie3146c136461ad4ecde4169f3b30dda0c814ca7b 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>
* | Add support for random vs public remote address connectionsAlex Blasche2014-09-027-5/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Fix failing L2CP socket's on high-endian systemsAlex Blasche2014-09-021-2/+2
| | | | | | | | | | | | | | | | Bluetooth byte order is little endian. htbos ensures the psm is converted to the required byte order. Change-Id: I22362d1f1fe3978df7855eab14154644a1d60a0d Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* | Merge remote-tracking branch 'origin/5.3' into 5.4Frederik Gladhorn2014-08-2867-39/+865
|\| | | | | | | | | | | | | Conflicts: src/bluetooth/qbluetoothdevicediscoveryagent_p.cpp Change-Id: Ie8bf1903f9c7c1ccd5b05a3f97049ae0882b88b8
| * Fix L2CP socket connectionsv5.3.2Alex Blasche2014-08-274-9/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | L2CP's psm (the RFCOMM port equivalent) was never published via SDP. Therefore the service client could not get the required information to connect to the server. After this patch Qt properly publishes the psm. Also, QBluetoothSocket::connect() initiated a service discovery to obtain the missing psm. Since the published SDP entry didn't contain one, protocolServiceMultiplexer() always returned 0 and another service discovery was initiated. This caused a crash inside QBluetoothSocket because the 1st QBluetoothServiceDiscoveryAgent instance was deleted in favor of the 2nd. The patch changes the client behavior such that it doesn't crash if the service discovery didn't turn up a valid psm/port. It improves the robustness in case of an error and avoids a second service discovery (which wouldn't turn up more information anyway). The bug only affected Bluez as it is the only platform supporting pure L2CP sockets. Last but not least a capability to test L2CP sockets was added to bttestui. Change-Id: I46c88a67c2baa4782ea908e645dcd4db9422dbba Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
| * Add missing private headers warningSamuel Gaist2014-08-1861-1/+662
| | | | | | | | | | Change-Id: I0f079a9b1b45bd2d2e946e06d7688f299a9c3fc3 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>