summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Bump version5.3Frederik Gladhorn2014-08-291-1/+1
| | | | Change-Id: Ie6b24bd43dde20efcae1ac6ca938a7cccae969d3
* 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>
* Add changelog for QtBluetooth & QtNfc 5.3.2 release.Alex Blasche2014-08-131-0/+47
| | | | | Change-Id: Id21197134f525d6835664a2b2f27ca48d405406c Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Move socket workaround into own fctn and fix possible channel mismatchAlex Blasche2014-07-242-122/+121
| | | | | | | | | | | | | | | | | | | | | | Previously the remote rfcomm channel was fixed to 1 which may not always match the correct rfcomm port. At the end of the day this is still a workaround for failure to connect when socket creation via UUID fails. We assume that the remote rfcomm service can be reached via the channel number. There is the remote chance that we connect to the wrong remote channel because getServiceChannel() fails and we attempt to connect to the hardcoded channel 1. However the workaround significantly reduces the chance of failure as a few devices (especially on the low end margin) cannot successfully connect via the UUID. The patch improves code readability and formatting too. Task-number: QTBUG-40172 Change-Id: Iae90252c877ca13953a81ea1ed83cc2c73abdf2a Reviewed-by: firatagdas <firatagdas@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Fixed QTBUG-40172 Android Bluetooth Socket Connection fails in some cases.Firat Agdas2014-07-242-10/+130
| | | | | Change-Id: Ibc4c835a9778bfa220ad6553f2c0140a7727d75d Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Remove dead code.Alex Blasche2014-07-171-15/+0
| | | | | | | | This is the default backend and Bluez is not a default backend. Hence the default backend can never build Bluez specific sections. Change-Id: I66f4ce9f4b7b4c4d222138ac2e56640d2bc08808 Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
* Reduce system header dependenciesAlex Blasche2014-07-165-9/+92
| | | | | Change-Id: I52ac33b4864d6bfca248ff3fad5a069154a9c756 Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
* Add code to test service discovery on specific remote deviceAlex Blasche2014-07-153-0/+26
| | | | | Change-Id: I548d17928fb371ba7dbf2010efb6995bc6f5ff2d Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Remove usage of BluetoothSocket.isConnected()Alex Blasche2014-07-101-9/+8
| | | | | | | | | | | | | | | | It seems not all devices reliably return the correct value when calling isConnected(). connect() succeeds but isConnected() is still false. On the positive side it is not really needed either. Calling connect() returns an exception if it fails and close() can be safely called multiple times. Therefore we only have to check for ocurring exceptions. Furthermore isConnected() is API lvl 14 and was not guarded. Removing the call resolves this problem too. Task-number: QTBUG-39815 Change-Id: Idf8472c268231a2cfac0f5cd87294384ff779c3f Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* Add ability to abort server sockets via bttestuiAlex Blasche2014-07-021-0/+6
| | | | | | | | | This equalizes the behavior of the Close and Abort button. Abort will disconnect the local client socket as well as all sockets which were established via the listening server socket. Change-Id: I68d3d7190641aab44612fa3fc00b38fdc31799a3 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Fix crash in bttestui when using default backendAlex Blasche2014-06-251-0/+2
| | | | | | | The cause are uninitialized pointers. Change-Id: I4ba5f79dbda3e20361fc1127fa08e93a2b7ce80e Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* Bump versionOswald Buddenhagen2014-06-181-1/+1
| | | | Change-Id: I98350110680ee20cd9a2fa55b57b390e66969b65
* 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>
* Add changelog for upcoming Qt 5.3.1 release.Alex Blasche2014-06-041-0/+89
| | | | | | Change-Id: I8343a3a474e3b6378b24c08182d767262111ec19 Reviewed-by: Sergio Ahumada <sahumada@blackberry.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Bluez4: Ensure QBluetoothLocalDevice becomes invalid if adapter disappearsAlex Blasche2014-05-273-7/+62
| | | | | | | | | | | | | | The DBus object disappears when the dongle is removed. Once a QBluetoothLocalDevice instance is invalid it remains invalid. The patch further ensures that an invalid instance does not initiate pairing activitiy. Last but not least this patch fixes a memory leak in case a DBus error occurs during the adapter initialization. Task-number: QTBUG-38399 Change-Id: I2e13e393060c77fab5f79d5451dd6fe9a2a6e3bb Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
* Process Bluez5 URLs during SDP scanAlex Blasche2014-05-271-1/+1
| | | | | | | | | | | | | | | | | | Bluez5 advertises the following SDP attributes - QBluetoothServiceInfo::DocumentationUrl - QBluetoothServiceInfo::ClientExecutableUrl - QBluetoothServiceInfo::IconUrl They come as <url> xml tag but otherwise follow the <text> syntax. So far this type of xml tag was unknown, a warning was printed and the service info didn't contain the relevant info. Although Bluez5 seems to be the first to advertise this attribute, Bluez4 has to be able to deal with it too. Hence this patch goes to Qt 5.3/stable. Change-Id: I216fdaee23c75b1ed86702086be2d95a0efe109e Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
* Add a few Qt 6 TODO entriesAlex Blasche2014-05-153-0/+3
| | | | | Change-Id: Ic169d907b872fd277df4f32be1270d7bceabac32 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Merge remote-tracking branch 'origin/release' into stableFrederik Gladhorn2014-05-141-4/+3
|\ | | | | | | Change-Id: Ia3c8079ad2c35f9573d8a59347af281275232e30
| * Minor changelog clarification and other "nice-ifications"v5.3.0-rc1v5.3.0Alex Blasche2014-04-301-4/+3
| | | | | | | | | | | | Change-Id: I1eee55a970a7ed5e1813d70ec254ed0348d1e567 Reviewed-by: Oleg Shparber <trollixx@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* | Fix uncategorised usage of qWarning().Alex Blasche2014-05-091-2/+2
| | | | | | | | | | Change-Id: Iee8b8e619f1679fe9b6e8aed47d05f7414417043 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | Add missing classname tag to Bluetooth and NFC qml moduleAlex Blasche2014-05-072-0/+2
| | | | | | | | | | | | | | This is required for static builds. Change-Id: Ia6861685ff2845dc6c3998079cf10019ea9fbdd7 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* | BlackBerry C API added for OS>10.2.1Nedim Hadzic2014-04-294-19/+154
| | | | | | | | | | | | | | | | | | | | | | With new OS 10.3 some PPS object paths are changed. Therefore BB C API was used intead of PPS communication in some parts of QtConnectivity. The BB C API is introduced for OS 10.2.1 and newer. Change-Id: I94a21ed61a49a94dd2101990df4801a6925a3ce6 Reviewed-by: Alex Blasche <alexander.blasche@digia.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* | Check for QT_NO_DEBUG_STREAM for QBluetoothUuid QDebug helperOleg Shparber2014-04-281-0/+3
| | | | | | | | | | | | | | | | [ChangeLog][QtBluetooth] QDebug helper for QBluetoothUuid became aware of QT_NO_DEBUG_STREAM define. Change-Id: I20941c32560bfc6beaa8f4f465799af987d0b0cd Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* | Fix a renamed qdoc tag and improve grammar/spellingAlex Blasche2014-04-252-4/+4
| | | | | | | | | | Change-Id: Iee11fdfe3b57fbe94d7e3362454851867d25e98a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* | Build snippet outside of example build configurations too.Alex Blasche2014-04-241-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a partial revert of 9615e7fbf439d0b2b9476ea7cb15ad145e675583. The CI does not test a combined developer-build and example configuration. Ensuring the snippet compiles is mostly a private test. This patch drops the additional example condition to provide an increased chance of compiling the snippets on the CI. So far the condition never triggered and hence the CI couldn't ensure a compiling snippet. Task-number: QTBUG-37638 Change-Id: I8d815c6ddeaa2955c2824697a937d3b08729b979 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | Remove duplicate function definitionLouai Al-Khanji2014-04-241-4/+5
| | | | | | | | | | Change-Id: I1d76c50d84a0c33e56c2e197e5eb528b00082949 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* | Merge remote-tracking branch 'origin/release' into stableJani Heikkinen2014-04-2313-38/+267
|\| | | | | | | Change-Id: Ic86710cdf2550f5cf70c81af3f351d6712cd1b0e
| * Fix discovery hanging in unrecoverable state due to incorrect error handlingAlex Blasche2014-04-162-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The discovery of services happens in a sequentiali per-device order. Once the first device's services were found, the results are processed and the discovery is started on the next device. Unfortunately if the search didn't create any results due to the remote device refusing the SDP discovery or because the given remote Bluetooth address was not valid, the discovery agent didn't continue with the next device. Now the error handling ensures that the discovery process is continued with the next device (if there is any). Task-number: QTBUG-38362 Change-Id: Ie27bbc5327eadc4bcc31b589227c51dc4fa2c7c1 Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
| * Add Qt 5.3.0 change log for QtNfc and QtBluetoothAlex Blasche2014-04-151-0/+154
| | | | | | | | | | Change-Id: Id489adfe1cfb4c652907e67950b8a12bf1c18c8c Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
| * Do not always filter Serial Port profiles out anymore on AndroidAlex Blasche2014-04-151-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1.) If we find a custom and SPP uuid we create only on service using custom uuid as service uuid and SPP as service class uuid. THis is the recommended way. Any remote service should really advertise a custom uuid. Unfortunately this is not always the case on some embedded devices. Hence we need to cover the cases below. 2.) If we find a custom uuid only we create a service which uses the custom uuid as service uuid but we do not set a service class. 3.) If we find a SPP uuid only, we create a service which uses SPP as service uuid and as service class uuid. This is no problem as Android's connectToRfcommService() call explicitly permits an SPP uuid as connection parameter. 4.) We find none of the above the problem doesn't exist in the first place and no service was found. Task-number: QTBUG-38140 Change-Id: I2e9080f65b98db23782264ef9e62a410ab9f91f1 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
| * 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>
* | Bump MODULE_VERSION to 5.3.1Sergio Ahumada2014-04-221-1/+1
| | | | | | | | | | Change-Id: I295b61c203f2bb43f0cc0e71da78cefb4b6ddc0c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* | Fix crash in QDeclarativeBluetoothServiceOleg Shparber2014-04-222-41/+23
| | | | | | | | | | | | | | | | The crash was caused by the listen() always returning -1 because the condition m_service->socketProtocol() == UnknownProtocol was always true. Change-Id: I13725bb13db3e7000e01a80601fdcb3380710798 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* | Bluez4: Fix incorrect list of connected devices in QBluetoothLocalDeviceAlex Blasche2014-04-222-25/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ConnectionChange signals were never emitted for remote devices which already existed at class instanciation time. At the same time this patch removes the delayed creation of the connectedDevices set. This simplifies the code and the caching did not save much effort. Task-number: QTBUG-38402 Change-Id: Ic871f919435c0d42ce2d79fd54f0da693816010a Reviewed-by: Oleg Shparber <trollixx@gmail.com> Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* | Provide correct code snippet for QBluetoothServiceDiscoveryAgentOleg Shparber2014-04-223-4/+29
| | | | | | | | | | Change-Id: I8b975a2f55833c58479edac5d62809c1e83ea417 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* | Fix a crash in QBluetoothSocket on reconnection attempt (BlueZ)Oleg Shparber2014-04-161-0/+6
| | | | | | | | | | | | | | | | | | Ensure a native socket is obtained after QBluetoothSocket has been closed. [ChangeLog][QtBluetooth][QBluetoothSocket] Fixed a crash on reconnect. Change-Id: I9f470d23366250dc20ad3305ddec16300c1ad8ec Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* | Fix internal buffer corruption in QBluetoothSocket (BlueZ)Oleg Shparber2014-04-161-2/+1
| | | | | | | | | | | | | | | | | | When _q_readNotify() is called and no data is available (e.g. in case of timeout), then the internal buffer grows indefinitely, causing a one time corruption of the following good data. Change-Id: I75929382db73953bbccdd86b9ae248329df879fa Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* | Refactor disconnection signals emittance in QBluetoothSocketOleg Shparber2014-04-153-17/+10
| | | | | | | | | | | | | | | | | | | | | | This fixes duplicate switching to the unconnected state in case the disconnect() signal is used to reconnect. [ChangeLog][QtBluetooth][QBluetoothSocket] Fixed duplicate emission of unconnected state in the reconnection case. Change-Id: If449420d936c96e62518fc408e6a1e35b79988a8 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* | Don't double up the internal list of discovered servicesAlex Blasche2014-04-151-4/+19
| | | | | | | | | | | | | | | | | | | | | | Convention is that calling QBluetoothServiceDiscoveryAgent maintains an internal list of discovered services. When start() is called already discovered services are kept unless clear() was called. The Bluez code never checked which services were already discovered by previous discovery runs. This patch fixes this problem. Change-Id: I3987d6ea65ea41aefc9726acc31f6abaa478c72c Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* | Fix inconsistent behavior between BtDiscoveryModel & BtServiceDiscoveryAgentAlex Blasche2014-04-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | The model always resets the model content when starting a new service discovery. However QBluetoothServiceDiscovery doesn't do that. It adds newly discovered services and maintains the existing services. Since the model updates its content based on the serviceDiscovered signal, every second run created an empty list or only ever added services. Change-Id: I9c1d29562b9178678ab42bee98d5d1e3d0c4367f Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
* | Build snippets during developer builds with examples only.Alex Blasche2014-04-141-3/+8
| | | | | | | | | | | | | | | | | | This replaces an earlier Android specific solution against a more generic solution. Task-number: QTBUG-37638 Change-Id: I472ea48567e872c658094a5576b9260bf2d02c89 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@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>
* Temporary file copy fix BluezNedim Hadzic2014-04-041-1/+10
| | | | | | | | If size is -1 it will go in endless while loop. Added error handling in case QIODevice cannot be read. Change-Id: I2026e45ac48592f32ce275871bf992413d7815b6 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Cleaning headers in QBluetoothTransferReplyQnx classNedim Hadzic2014-04-031-4/+1
| | | | | Change-Id: Ic986a615a48ffe4e8387be8bda755cf7610b1457 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Implemented sending buffer files in QBluetoothTransferReply QNXNedim Hadzic2014-04-034-20/+62
| | | | | | | | | | | QTemporaryFile did not work since it created temporary file in the app folder, which was not accessible for sending and sharing the file. Task-number: QTBUG-32742 Change-Id: Icf3f30e800976916d3e82a928d04143757bf9afe Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Remove old Bluetooth tennis exampleAlex Blasche2014-04-0224-2591/+7
| | | | | | | | 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-0215-1/+1190
| | | | | | | | | 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>
* Equalize the docs front page layout with qtlocation and qtsensors.Alex Blasche2014-04-022-8/+21
| | | | | Change-Id: Iedd783ff59a62ca21e61502999dd450392f48644 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Replace double quote with single quote for single charactersSergio Ahumada2014-03-292-3/+3
| | | | | | | | Adding single characters to a QString is faster if the characters are QChars and not QStrings. Change-Id: I31a9e24b31bad76726231c8d164584abddde6c28 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>