| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: Ie6b24bd43dde20efcae1ac6ca938a7cccae969d3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: I0f079a9b1b45bd2d2e946e06d7688f299a9c3fc3
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
|
|
|
|
|
| |
Change-Id: Id21197134f525d6835664a2b2f27ca48d405406c
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: Ibc4c835a9778bfa220ad6553f2c0140a7727d75d
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: I52ac33b4864d6bfca248ff3fad5a069154a9c756
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
|
|
|
|
|
| |
Change-Id: I548d17928fb371ba7dbf2010efb6995bc6f5ff2d
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
The cause are uninitialized pointers.
Change-Id: I4ba5f79dbda3e20361fc1127fa08e93a2b7ce80e
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
|
|
|
|
| |
Change-Id: I98350110680ee20cd9a2fa55b57b390e66969b65
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Change-Id: I8343a3a474e3b6378b24c08182d767262111ec19
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: Ic169d907b872fd277df4f32be1270d7bceabac32
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
|
|\
| |
| |
| | |
Change-Id: Ia3c8079ad2c35f9573d8a59347af281275232e30
|
| |
| |
| |
| |
| |
| | |
Change-Id: I1eee55a970a7ed5e1813d70ec254ed0348d1e567
Reviewed-by: Oleg Shparber <trollixx@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
|
| |
| |
| |
| |
| | |
Change-Id: Iee8b8e619f1679fe9b6e8aed47d05f7414417043
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
|
| |
| |
| |
| |
| |
| |
| | |
This is required for static builds.
Change-Id: Ia6861685ff2845dc6c3998079cf10019ea9fbdd7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| | |
[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>
|
| |
| |
| |
| |
| | |
Change-Id: Iee11fdfe3b57fbe94d7e3362454851867d25e98a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| | |
Change-Id: I1d76c50d84a0c33e56c2e197e5eb528b00082949
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
|
|\|
| |
| |
| | |
Change-Id: Ic86710cdf2550f5cf70c81af3f351d6712cd1b0e
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| | |
Change-Id: Id489adfe1cfb4c652907e67950b8a12bf1c18c8c
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
-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>
|
| |
| |
| |
| |
| | |
Change-Id: I295b61c203f2bb43f0cc0e71da78cefb4b6ddc0c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| | |
Change-Id: I8b975a2f55833c58479edac5d62809c1e83ea417
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|/
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: Ic986a615a48ffe4e8387be8bda755cf7610b1457
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: Iedd783ff59a62ca21e61502999dd450392f48644
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
|
|
|
|
|
|
|
|
| |
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>
|