qt:qtconnectivity.git
4 years agoFixed QNX compile error
Nedim Hadzic [Mon, 17 Mar 2014 09:18:41 +0000 (10:18 +0100)]
Fixed QNX compile error

After one patch, QtConnectivity would not compile on QNX.

Change-Id: I675b3fa4288d1ddfdacf378679821a6c90bccc08
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
4 years agoBind QLowEnergyController to a particular local adapter.
Alex Blasche [Fri, 14 Mar 2014 15:30:33 +0000 (16:30 +0100)]
Bind QLowEnergyController to a particular local adapter.

This simplifies the internal LEServiceInfo logic and let's us later deal
with multiple adapters.

Change-Id: I7d3e991207cd6571b5d644ae99c6bf1a2c99ec68
Reviewed-by: Nedim Hadzic <nhadzic@blackberry.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoCleanup of BtLE code
Alex Blasche [Fri, 14 Mar 2014 14:59:26 +0000 (15:59 +0100)]
Cleanup of BtLE code

1.) Remove dead pieces of code
2.) Fix warnings
3.) Optimize some code lines

Change-Id: I952fe34e8966a501a54c9ef42e9624c1fc46a2a1
Reviewed-by: Nedim Hadzic <nhadzic@blackberry.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoUpdate .gitignore for btle examples
Alex Blasche [Fri, 14 Mar 2014 10:17:48 +0000 (11:17 +0100)]
Update .gitignore for btle examples

Change-Id: I21b02d8900238575b4420171e93201fb2ca8e1ec
Reviewed-by: Nedim Hadzic <nhadzic@blackberry.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoMerge "Merge branch 'dev' into btle" into refs/staging/btle
Alex Blasche [Fri, 14 Mar 2014 12:48:47 +0000 (13:48 +0100)]
Merge "Merge branch 'dev' into btle" into refs/staging/btle

4 years agoQNX BLE communication moved to controller class
Nedim Hadzic [Wed, 12 Mar 2014 12:53:59 +0000 (13:53 +0100)]
QNX BLE communication moved to controller class

Moving communication with device to QLowEnergyController class.

Change-Id: Id783d3aac81c215fbda7c1390bb2abf8ecd2fb2a
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoMerge branch 'dev' into btle
Alex Blasche [Fri, 14 Mar 2014 10:16:27 +0000 (11:16 +0100)]
Merge branch 'dev' into btle

Conflicts:
src/bluetooth/qbluetoothuuid.cpp
tests/bttestui/btlocaldevice.cpp

Change-Id: Id16ab93ec61361950669da7eb232769c5dc4644f

4 years agoBluez BLE write characteristic and descriptor value moved to controller
Nedim Hadzic [Tue, 11 Mar 2014 13:11:37 +0000 (14:11 +0100)]
Bluez BLE write characteristic and descriptor value moved to controller

In the QLowEnergyController class write options for characteristic and
descriptors are added.

Change-Id: I5cc5dab1d3d2ef75d99eae045959f70524e65c91
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoMerge branch 'stable' into dev
Alex Blasche [Thu, 13 Mar 2014 08:25:37 +0000 (09:25 +0100)]
Merge branch 'stable' into dev

Change-Id: I1c528ed03bf592bcd762fa0cb7710217fbf37eba

4 years agoFix a few TODOs around the source code and remove obsolete ones
Alex Blasche [Tue, 11 Mar 2014 14:36:22 +0000 (15:36 +0100)]
Fix a few TODOs around the source code and remove obsolete ones

Change-Id: I01e867cb5efb231e7c85b0d106897b2f31448977
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoFix code snippet error in docs and point out supported NFC platforms
Alex Blasche [Mon, 10 Mar 2014 14:48:23 +0000 (15:48 +0100)]
Fix code snippet error in docs and point out supported NFC platforms

The code snippet was shifted into a compiled project to ensure continued
compilation.

Task-number: QTBUG-34978
Change-Id: I93f3b39442992bfb4049a44ed0dd6330d3ca9270
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
4 years agoImprove NFC documentation
Alex Blasche [Mon, 10 Mar 2014 13:52:00 +0000 (14:52 +0100)]
Improve NFC documentation

1.) Extend the NFC overview page
2.) Ensure that snippets are compiled at all times
3.) Mark Qt 5.3 APIs using \since

Task-number: QTBUG-32401
Task-number: QTBUG-34978
Change-Id: I8928be3d7dd2c9de1314eb1ec6ed55c8d4301f4a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoBLE characteristic notification moved to controller class
Nedim Hadzic [Sun, 9 Mar 2014 19:56:12 +0000 (20:56 +0100)]
BLE characteristic notification moved to controller class

Enable and disable notification communication moved
to the QLowEnergyController class.

Change-Id: I34ceb10a5dec067133399257d544dd56db7e626e
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoBLE communication moved to controller class
Nedim Hadzic [Fri, 7 Mar 2014 17:19:02 +0000 (18:19 +0100)]
BLE communication moved to controller class

BLE communication code was implemented in QLowEnergyServiceInfo class.
It is moved now to the QLowEnergyController class.
Needed adjustments are done in order to make this work.

Change-Id: I9206d2324ad59f79f4e035509e23f5c7f7cfb328
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoAndroid: Fix crashes due to concurrency issues
Alex Blasche [Tue, 4 Mar 2014 15:17:09 +0000 (16:17 +0100)]
Android: Fix crashes due to concurrency issues

BroadcastReceiver.onReceive() is executed in the main thread whereas
the Qt classes are in a different thread. This created issues whereby
Java's qtObject pointer was reset by the Qt classes/thread but
onReceive still trying to access the same object later on.

In most cases the Qt classes using BroadcastReceiver were half way
through their object tear down. This patch fixes the problem by
guarding qtObject against concurrent thread access and ensures that
the qtObject pointer is reset before the object tear down starts.

Change-Id: Iab97b0af8e10686d97419ac8504f2fe69e9536f3
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
4 years agoAndroid: Don't directly use java field values
Alex Blasche [Tue, 4 Mar 2014 10:05:08 +0000 (11:05 +0100)]
Android: Don't directly use java field values

Action strings were previously converted. This patch fixes all
non-action fields.

Task-number: QTBUG-36810
Change-Id: I4011c619e900dcb4137c6552046f0342327a7288
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
4 years agoAndroid: Don't directly use the action string values but refer to the fields.
Alex Blasche [Mon, 3 Mar 2014 12:45:04 +0000 (13:45 +0100)]
Android: Don't directly use the action string values but refer to the fields.

This increases the robustness of the code since the field value
is not an implementation detail.

In addition we guard the action field lookup against fields
which have been introduced later than the standard SDK version 10
supported by Qt.

Task-number: QTBUG-36810
Change-Id: Ib6582e77202d40aaf116fe8dfa81562d89367ea2
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
4 years agoUpdate .gitignore for qtconnectivity after several binary adds/removals
Alex Blasche [Mon, 10 Mar 2014 15:00:38 +0000 (16:00 +0100)]
Update .gitignore for qtconnectivity after several binary adds/removals

Change-Id: Ie2e11e8c359d03785488a2ddd31f8b0f3a98340e
Reviewed-by: Nedim Hadzic <nhadzic@blackberry.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoMerge remote-tracking branch 'origin/stable' into dev
Sergio Ahumada [Mon, 10 Mar 2014 16:34:18 +0000 (17:34 +0100)]
Merge remote-tracking branch 'origin/stable' into dev

Change-Id: Ib2659a2ab8960e05953b433496d739f83f823bfd

4 years agoUpdate QtBluetooth docs for Qt 5.3
Alex Blasche [Fri, 7 Mar 2014 15:32:40 +0000 (16:32 +0100)]
Update QtBluetooth docs for Qt 5.3

This fixes some spelling/grammar mistakes and updates information
that has changed in Qt 5.3

Change-Id: I09d1ea1dc3edef08c3ee6a494968e13e91385c29
Reviewed-by: Nedim Hadzic <nhadzic@blackberry.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoBuild the bluetooth doc snippet.
Alex Blasche [Fri, 7 Mar 2014 14:23:27 +0000 (15:23 +0100)]
Build the bluetooth doc snippet.

This ensures that it keeps compiling and is correct. Although
it wasn't able to compile due to a partial implementation, the snippet
itself had errors which demonstrated wrong API aspects.

Change-Id: I24048d968573e260d5b3ba92e38ce1dc9d24e52f
Reviewed-by: Nedim Hadzic <nhadzic@blackberry.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoAdd screenshots and description to the QML scanner example.
Alex Blasche [Fri, 7 Mar 2014 15:34:16 +0000 (16:34 +0100)]
Add screenshots and description to the QML scanner example.

Change-Id: I06c42105a8a64f41fc841958f7cd33b544b1fcae
Reviewed-by: Nedim Hadzic <nhadzic@blackberry.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoBLE scanner search bar fix
Nedim Hadzic [Sat, 8 Mar 2014 13:19:55 +0000 (14:19 +0100)]
BLE scanner search bar fix

During device scan, search bar was gone after device is added
and device scan was not yet done.

Change-Id: I39bd7fc1c3f8c22a93921313d818ba1cd00363a0
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoImprove BtTestUI device and service discovery output
Alex Blasche [Fri, 7 Mar 2014 11:40:46 +0000 (12:40 +0100)]
Improve BtTestUI device and service discovery output

This was recently used to debug Androids buggy discovery code.

Change-Id: I6c3eca85a650d6fbb853d2cfc8ee73b434b5e7a9
Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoAndroid: Fix ommission of found services during SDP discovery
Alex Blasche [Thu, 6 Mar 2014 14:37:38 +0000 (15:37 +0100)]
Android: Fix ommission of found services during SDP discovery

serviceClassUuids were not correctly written and hence only ever one
service was found per device. The deviceInfo and serviceUuid were the
same anyway as we are talking about the same remote device and the
absence of custom service uuids.

Change-Id: I2d8dad2d38381b1c171afb236ee56822e62ffee3
Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoUnused error enums removed
Nedim Hadzic [Mon, 3 Mar 2014 15:00:19 +0000 (16:00 +0100)]
Unused error enums removed

Emitting errors is done by QLowEnergyController class.
These enums were not used.

Change-Id: I7883ee16ce67bf6ae06916ae7789efe802c098d6
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoQNX notification value fix
Nedim Hadzic [Mon, 3 Mar 2014 14:05:57 +0000 (15:05 +0100)]
QNX notification value fix

1.) Implemented proper conversion to hexadecimal value.
2.) Error was emitted in case of value assignment and it is
fixed now.

Change-Id: Ifb6220a6379b350eaa8bb67841a5029ecc55cad2
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoUnify the BtLE service class id descriptions
Alex Blasche [Wed, 5 Mar 2014 11:37:55 +0000 (12:37 +0100)]
Unify the BtLE service class id descriptions

The previous class ids where sorted by uuid. We should keep it this way
even if sorting by alphabet is more convenient for the reader.

This change is done to align the documentation with
https://codereview.qt-project.org/#change,79960

Task-number: QTBUG-36123
Change-Id: Ib859c666b069f7c7f955823904e147db96021f34
Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoAdd missing Standard BT service/profile uuids
Alex Blasche [Wed, 5 Mar 2014 10:21:35 +0000 (11:21 +0100)]
Add missing Standard BT service/profile uuids

The BtLE related uuids will be added by the BTLE feature branch.

This change adjusts the docs such that it becomes obvious whether
a UUID is a service, profile or both.

Task-number: QTBUG-36123
Change-Id: I487471c9227a0fe11f443c54d21a29b23a11e076
Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoQNX service discovery for dual mode devices fix
Nedim Hadzic [Fri, 28 Feb 2014 13:42:56 +0000 (14:42 +0100)]
QNX service discovery for dual mode devices fix

For devices which have standard and LE services
LE services were not read.
Discovery of all custom services implemented.

Change-Id: I41c89d8d4ea442153c12cd647fd2cd1a6dd7f0f7
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
4 years agoFix uuid value of ServiceClassId PnpInformation
Alex Blasche [Wed, 5 Mar 2014 09:25:18 +0000 (10:25 +0100)]
Fix uuid value of ServiceClassId PnpInformation

Fo far it was using the GNSS profile uuid.

Change-Id: Ifbe51353a6355d260c42d870656a78059e440181
Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoFix 16 bit mode for heart rate measurement
Alex Blasche [Mon, 24 Feb 2014 15:58:30 +0000 (16:58 +0100)]
Fix 16 bit mode for heart rate measurement

At the same time the code has been streamlined to enhace its visual
clarity (the section is directly used in the documentation)

Change-Id: I9a126c6f7b412fc0918d45d308540651cb105f0e
Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoRemove insignificant flag from working unit test.
Alex Blasche [Tue, 4 Mar 2014 07:45:06 +0000 (08:45 +0100)]
Remove insignificant flag from working unit test.

This was missed during the earlier fixes to this test.

Task-number: QTBUG-22017
Change-Id: Ica5bac09b565439bd65bfc42e9614544a21a0637
Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoFix some typos
Sergio Ahumada [Mon, 3 Mar 2014 15:57:46 +0000 (16:57 +0100)]
Fix some typos

Change-Id: I37a1749cbb239211c2a3e2003f2f4057b840afd7
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
4 years agoCreate QBluetoothServer unit test from QRfcommServer/QL2CAPServer tests
Alex Blasche [Fri, 28 Feb 2014 14:50:26 +0000 (15:50 +0100)]
Create QBluetoothServer unit test from QRfcommServer/QL2CAPServer tests

Task-number: QTBUG-22017
Change-Id: I3e5613153d2496567f7afd87c8a0a44c1067a4e7
Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoPrefer to use normalised signal/slot signatures
Sergio Ahumada [Sun, 2 Mar 2014 10:22:48 +0000 (11:22 +0100)]
Prefer to use normalised signal/slot signatures

Change-Id: Idd8127e577be7381e170dab296d8f0564c478020
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoFix not working listen() on Bluez with default Bluetooth addresses
Alex Blasche [Fri, 28 Feb 2014 14:23:22 +0000 (15:23 +0100)]
Fix not working listen() on Bluez with default Bluetooth addresses

Binding to the address 0 does not work.

Change-Id: Ie2e9bfc64729e6bf82556c3384d2e72117fc39ab
Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
4 years agoFix qrfcomm unit test
Alex Blasche [Fri, 28 Feb 2014 14:15:03 +0000 (15:15 +0100)]
Fix qrfcomm unit test

The patch also aligns the error behavior of QBluetoothServer::listen()
across the various platforms.

Task-number: QTBUG-22017
Change-Id: Ic81808c94d060ca07bd125afa842452e53efaec7
Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
4 years agoQNX compile error fix
Nedim Hadzic [Fri, 28 Feb 2014 11:00:18 +0000 (12:00 +0100)]
QNX compile error fix

QNX compile was broken after stdint.h was removed.
Some warnings resolved.

Change-Id: I04d5f30ec79f35bc489ed5f11b0f8bee930f204d
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoAdd dependencies to project file.
Alex Blasche [Fri, 28 Feb 2014 08:24:45 +0000 (09:24 +0100)]
Add dependencies to project file.

CONFIG += ordered is inefficient and was replaced by proper dependencies.

Change-Id: I7328ac428758d1719a2ae820a403d25b66de2ab4
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
4 years agoNormalize signal & slot signatures
Alex Blasche [Thu, 27 Feb 2014 14:14:20 +0000 (15:14 +0100)]
Normalize signal & slot signatures

Change-Id: I81fd5cc89d88e4527778c6aed4cddeb0648dd812
Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoRemove btclient
Alex Blasche [Thu, 27 Feb 2014 12:05:52 +0000 (13:05 +0100)]
Remove btclient

It is replaced by bttestui which runs on any platform and is
the official test tool for a variety of other tests too.

Task-number: QTBUG-22017
Change-Id: Ia675876375901a0f19d1820e2167729aa863bd34
Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoFix qbluetoothsocket unit test
Alex Blasche [Thu, 27 Feb 2014 10:34:44 +0000 (11:34 +0100)]
Fix qbluetoothsocket unit test

Task-number: QTBUG-22017
Change-Id: I876b8a052873d198e8991b7eab3ca70714eb0dcc
Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoDon't create invalid LEServices on Bluez due to default adapter usage
Alex Blasche [Thu, 27 Feb 2014 13:02:38 +0000 (14:02 +0100)]
Don't create invalid LEServices on Bluez due to default adapter usage

A valid LEServiceInfo on Bluez requires an adapter address. If the
service discorvery was initialized with a default adapter,
the internal service discovery never actually determines
the adapter address. Subsequently every LEServiceInfo object got an
invalid adapter address.

Change-Id: I3d95ee5b2169f8a049121fe6cc4591d3b79262d9
Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoLowenergyscanner example improved
Nedim Hadzic [Wed, 26 Feb 2014 11:09:23 +0000 (12:09 +0100)]
Lowenergyscanner example improved

Error handling improved, code styling improved.

Change-Id: I1f35c6a6ef9641cb445fdbe55e0127b554e50ebc
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoFix wrong error message.
Alex Blasche [Thu, 27 Feb 2014 13:39:15 +0000 (14:39 +0100)]
Fix wrong error message.

Change-Id: I933d1f1e196b1009de6b33a2e603043d85d28b08
Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
4 years agoFix crash when interrupting QBluetoothSocket's input stream thread
Alex Blasche [Wed, 26 Feb 2014 10:08:41 +0000 (11:08 +0100)]
Fix crash when interrupting QBluetoothSocket's input stream thread

The previous QThread did not always properly resume when
InputStream.read() was interrupted by BluetoothSocket.close().
This patch converts the QThread to a Java thread which works
as the Android API docs suggested.

Task-number: QTBUG-37061
Change-Id: Id6ac9b57a28f3b532cbe49ff1dfdc9d1e6432aaa
Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
4 years agoAndroid: Fix crash in QBluetoothServer::close()
Alex Blasche [Thu, 20 Feb 2014 10:39:09 +0000 (11:39 +0100)]
Android: Fix crash in QBluetoothServer::close()

Java's BluetoothSocketServer.accept() is meant to be interrupted
via BluetoothSocketServer.close(). Unfortunately if the surrounding
thread is a QThread the returning accept call crashes the thread. This
does not happen if it is a Java Thread.

This commit changes the server's private backend to a Java thread.

Task-number: QTBUG-36754
Change-Id: I5aacc5444bbcd1275a11743b6aa04d2b11a5b22b
Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
4 years agoUtilize new QBluetoothSocket::OperationError on QNX and Bluez
Alex Blasche [Wed, 26 Feb 2014 12:45:15 +0000 (13:45 +0100)]
Utilize new QBluetoothSocket::OperationError on QNX and Bluez

Task-number: QTBUG-36817

Change-Id: I17f7d57537f7f1a5cedd01ce6043cfd6aac26db4
Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoAdd copy operator to QBluetoothHostInfo.
Alex Blasche [Wed, 26 Feb 2014 16:10:09 +0000 (17:10 +0100)]
Add copy operator to QBluetoothHostInfo.

The QBluetoothSocket unit test was sometimes failing because of it.

Change-Id: I6071902e1aaa9e1138f071b7f2ce2a8ccb436789
Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoRemove QBluetoothSocketPrivate::socketDescriptor()
Alex Blasche [Wed, 26 Feb 2014 13:31:25 +0000 (14:31 +0100)]
Remove QBluetoothSocketPrivate::socketDescriptor()

The function is not required as the public accessor function directly
returns the socket descriptor.

Change-Id: I6d64bec7b4f0542ce213dc90dcfe30c3885ed21d
Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoQNX Service registered value fix
Nedim Hadzic [Fri, 21 Feb 2014 13:09:59 +0000 (14:09 +0100)]
QNX Service registered value fix

Once registerService() was called isRegistered() will always return true.
A call to unregisterService() now resets the value.
Cleaning fake server port hash.

Task-number: QTBUG-36626
Change-Id: I452651266192e5773b8330e5f7c02885adff2279
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoFix crash when calling QBluetoothLocalDevice::connectedDevices()
Alex Blasche [Wed, 26 Feb 2014 12:58:51 +0000 (13:58 +0100)]
Fix crash when calling QBluetoothLocalDevice::connectedDevices()

The crash happened on Bluez while no local Bt device is connected.

Change-Id: I418f73b964edc3c302665d4e3374b49a68cfdc46
Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoMax pending connection check for QNX server implemented
Nedim Hadzic [Fri, 21 Feb 2014 10:56:12 +0000 (11:56 +0100)]
Max pending connection check for QNX server implemented

Max pending connections was ignored when adding new connections.

Change-Id: I96b1ae87254a772008b18a662faa7bc2bd84164b
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoRevert "Bump latest Nfc QML API version to 5.4"
Alex Blasche [Wed, 26 Feb 2014 11:37:53 +0000 (12:37 +0100)]
Revert "Bump latest Nfc QML API version to 5.4"

This reverts commit 4bc3513f18fa6a7345708748590f6a1acda486dd

THis should have gone to dev branch

Change-Id: I231818b3ac31871072a7b4630e14659a7aea78c1
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
4 years agoBump latest Nfc QML API version to 5.4
Alex Blasche [Mon, 24 Feb 2014 09:16:44 +0000 (10:16 +0100)]
Bump latest Nfc QML API version to 5.4

Change-Id: Ie25ae77b71a89e51a95f030f315544f69200bda4
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
4 years agoQNX QBluetoothSocket state fix
Nedim Hadzic [Tue, 25 Feb 2014 13:53:41 +0000 (14:53 +0100)]
QNX QBluetoothSocket state fix

Wrong socket state order fix. Due to this, the socket was not keeping
remote device info.

Change-Id: I860f15af9de4eb2e1238989d33bc59d62536f7aa
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoOptimize the gatttool interaction code.
Alex Blasche [Mon, 24 Feb 2014 15:26:42 +0000 (16:26 +0100)]
Optimize the gatttool interaction code.

Change-Id: Icd22be7e320e21d643dbda6f1ff1cdd1133ab04b
Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoBump latest Nfc QML API version to 5.4 v5.3.0-alpha1
Alex Blasche [Mon, 24 Feb 2014 09:16:44 +0000 (10:16 +0100)]
Bump latest Nfc QML API version to 5.4

Change-Id: I1c4615c3d78985fbd410eafcee5a0a9ab72c8763
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
4 years agoBump latest Bluetooth QML API version to 5.4
Alex Blasche [Mon, 24 Feb 2014 09:14:14 +0000 (10:14 +0100)]
Bump latest Bluetooth QML API version to 5.4

Change-Id: Ie93caad6c14754e037cc071d8076dce32fb3ebf1
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
4 years agoMerge remote-tracking branch 'origin/stable' into dev
Frederik Gladhorn [Mon, 24 Feb 2014 19:00:33 +0000 (20:00 +0100)]
Merge remote-tracking branch 'origin/stable' into dev

Change-Id: Iaed8b924608e047760db6f7cc21b6a6eb250cbd6

4 years agoUUID filter for LE service implemented
Nedim Hadzic [Thu, 20 Feb 2014 11:21:16 +0000 (12:21 +0100)]
UUID filter for LE service implemented

Change-Id: I7c79a7ca1f29ca428509847a7e32a4b0d157c018
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoRenaming QLowEnergyServiceInfo methods
Nedim Hadzic [Wed, 19 Feb 2014 14:59:53 +0000 (15:59 +0100)]
Renaming QLowEnergyServiceInfo methods

Ensures that QLowEnergyServiceInfo and QBluetoothServiceInfo are more alike.

Tests and examples updated as well.

Change-Id: I0f6a97900891a9673f99578bdc8d156a8c403513
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoQNX pairing status fix implemented
Nedim Hadzic [Thu, 20 Feb 2014 15:06:53 +0000 (16:06 +0100)]
QNX pairing status fix implemented

Pairing status was returning Unpaired status even if device was paired.

Change-Id: Ib529cc4868f8043f5d83076f96ac9d71acc7c96f
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoFix for enabling BLE notifications on Linux implemented
Nedim Hadzic [Mon, 17 Feb 2014 10:33:02 +0000 (11:33 +0100)]
Fix for enabling BLE notifications on Linux implemented

For some devices it was not possible to enable notification because of the if clause.

One warning in the constructor fixed.

Change-Id: Ic11ce4109829eeb2022490f256f4e873ef3073a5
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoHeart Listener example added
Nedim Hadzic [Thu, 30 Jan 2014 22:04:20 +0000 (23:04 +0100)]
Heart Listener example added

Bluetooth Low Energy example for connecting and receiving measurements from the heart belt.

Documentation added too.

[ChangeLog][QtBluetooth] Heart Listener Bluetooth Low Energy heart belt example has been added

Change-Id: I1b690827af85411c962eb09aa87936f1fb7d9246
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoQBluetoothServer QNX closing error fix
Nedim Hadzic [Fri, 21 Feb 2014 10:11:44 +0000 (11:11 +0100)]
QBluetoothServer QNX closing error fix

In case socket was not defined error was emitted and it should not
do anything when closing a socket.

Resetting of d->activeSockets implemented.

Task-number: QTBUG-36626
Change-Id: Id1f37c0019981ffb6d9b5fd00159c118d313f44c
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoSocket memory leak fix for QBluetoothServer QNX
Nedim Hadzic [Fri, 21 Feb 2014 10:00:25 +0000 (11:00 +0100)]
Socket memory leak fix for QBluetoothServer QNX

listen(const QBluetoothAddress &address, quint16 port) was leaking memory if socket was not in listening state.

This occurred when calling a method multiple times.

Task-number: QTBUG-36626

Change-Id: I6a90f865d6c0e69d9f0b7acf0d200ec71910d448
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoQBluetoothDeviceInfo coreConfiguration fix implemented
Nedim Hadzic [Thu, 20 Feb 2014 13:40:09 +0000 (14:40 +0100)]
QBluetoothDeviceInfo coreConfiguration fix implemented

Order of device configuration changed.

Change-Id: Ie8287958bef6eefa4d821d0f6199347bb38cc8c4
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoFix some BTLE service discovery issues
Alex Blasche [Mon, 17 Feb 2014 10:54:35 +0000 (11:54 +0100)]
Fix some BTLE service discovery issues

1.) In Bluez avoid incomplete and/or premature finish of service
discovery process.

2.) Add Testcode for
QBluetoothServiceInfo::serviceDiscovered(QLowEnergyServiceInfo) to
bttestui application

Change-Id: I037a6303862dcf2e29aef4b761731b13c85b29aa
Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoShow characteristic values with proper encoding in LEscanner example
Alex Blasche [Wed, 19 Feb 2014 14:39:42 +0000 (15:39 +0100)]
Show characteristic values with proper encoding in LEscanner example

Change-Id: I7f5fceae5d47e62d9b26fbced0cf73abe8d18d23
Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoUse proper include syntax for public headers
Alex Blasche [Wed, 19 Feb 2014 15:08:13 +0000 (16:08 +0100)]
Use proper include syntax for public headers

This fixes all qmake warnings.

Change-Id: Ib103f0513ad0285ed55b45f7067742aaddd9cd58
Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
4 years agoRemove all compiler warnings.
Alex Blasche [Wed, 19 Feb 2014 15:07:56 +0000 (16:07 +0100)]
Remove all compiler warnings.

Change-Id: I8322ce0db87aec86cd1341bb49198d812e969122
Reviewed-by: Nedim Hadzic <nedimhadzija@gmail.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoDon't refuse the connect attempt while in ServiceLookupState.
Alex Blasche [Thu, 20 Feb 2014 15:18:06 +0000 (16:18 +0100)]
Don't refuse the connect attempt while in ServiceLookupState.

QBluetoothSocket::connectToService can be called by itself when it
does an SDP discovery. This affects Bluez only but the bug was introduced
by the Android port.

Change-Id: I1c9b0504acaafc7dbf2fc3d94b0c2c20a0cb8c65
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
4 years agoDon't assert when we discover a new SDP property.
Alex Blasche [Thu, 20 Feb 2014 15:21:38 +0000 (16:21 +0100)]
Don't assert when we discover a new SDP property.

Change-Id: I4beb72aac294511b87ef95c459c52daa85c62499
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
4 years agoMake android compile on BTLE branch
Alex Blasche [Thu, 20 Feb 2014 14:54:27 +0000 (15:54 +0100)]
Make android compile on BTLE branch

Change-Id: I43d143b9a6f64c59912d696f71820201e773479a
Reviewed-by: Nedim Hadzic <nhadzic@blackberry.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoRemove unnecessary stdin.h include which was not even using std notation
Alex Blasche [Thu, 20 Feb 2014 12:54:18 +0000 (13:54 +0100)]
Remove unnecessary stdin.h include which was not even using std notation

Change-Id: Ic17e632c9a88a187a072e914fd0fd5c97a935fe6
Reviewed-by: Nedim Hadzic <nhadzic@blackberry.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
4 years agoFix broken namespace build of QtConnectivity
Alex Blasche [Thu, 20 Feb 2014 11:29:00 +0000 (12:29 +0100)]
Fix broken namespace build of QtConnectivity

Change-Id: I434a80b6ac32524fa429e94c16f663c81f90003c
Reviewed-by: Nedim Hadzic <nhadzic@blackberry.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
4 years agoFix broken QBluetoothDeviceInfo unit test.
Alex Blasche [Thu, 20 Feb 2014 10:17:15 +0000 (11:17 +0100)]
Fix broken QBluetoothDeviceInfo unit test.

Change-Id: I1252a0c78f2b7026041a992bdb1deec3391386cc
Reviewed-by: Nedim Hadzic <nhadzic@blackberry.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoFix incorrect license header.
Alex Blasche [Thu, 20 Feb 2014 09:36:18 +0000 (10:36 +0100)]
Fix incorrect license header.

Change-Id: If58d69ea4afb6418d60b3e0b6e9fef10ae09c055
Reviewed-by: Nedim Hadzic <nhadzic@blackberry.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agothe poster example needs no widgets, but it needs quick
Oswald Buddenhagen [Tue, 18 Feb 2014 14:28:48 +0000 (15:28 +0100)]
the poster example needs no widgets, but it needs quick

Task-number: QTBUG-36893
Change-Id: Ic77fe07aa450001386be0b2e0d4a99f2e674dbb2
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Reviewed-by: Rolf Eike Beer <eb@emlix.com>
4 years agoBump module version to 5.4.0
Thiago Macieira [Wed, 19 Feb 2014 20:20:48 +0000 (12:20 -0800)]
Bump module version to 5.4.0

Change-Id: Ie3f13dde04f6a8128a27f8d7996fce0ae46979a2
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
4 years agoMake compile default backend
Alex Blasche [Mon, 17 Feb 2014 15:41:10 +0000 (16:41 +0100)]
Make compile default backend

Change-Id: Ib28e5a5a8b9c3363061e9d9e6e49f98cf55784b4
Reviewed-by: Nedim Hadzic <nhadzic@blackberry.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoRemove remaining QBBBluetoothDebug statements
Alex Blasche [Tue, 18 Feb 2014 07:27:19 +0000 (08:27 +0100)]
Remove remaining QBBBluetoothDebug statements

Change-Id: I5c8fae0b6546cb1e6907566f3f95b26cdf1ded11
Reviewed-by: Nedim Hadzic <nhadzic@blackberry.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoMerge branch 'dev' into btle
Alex Blasche [Mon, 17 Feb 2014 09:38:48 +0000 (10:38 +0100)]
Merge branch 'dev' into btle

Conflicts:
examples/bluetooth/bluetooth.pro
src/bluetooth/doc/src/examples.qdoc
src/bluetooth/qbluetoothdevicediscoveryagent_qnx.cpp
src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp
src/bluetooth/qbluetoothservicediscoveryagent_p.h
src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp

Change-Id: Ie1577e4b0f469cd5a6b05a61cbe94f180a64448d

4 years agoAdd extensive test application for QtBluetooth
Alex Blasche [Wed, 12 Feb 2014 15:31:07 +0000 (16:31 +0100)]
Add extensive test application for QtBluetooth

This application can be used to manually test most Bluetooth features.

Change-Id: Ib7101ff2f5334026c67c2e00a852d6b10d4674e8
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
4 years agoMerge "Merge remote-tracking branch 'gerrit/stable' into dev" into refs/staging/dev
Alex Blasche [Sat, 15 Feb 2014 16:00:16 +0000 (17:00 +0100)]
Merge "Merge remote-tracking branch 'gerrit/stable' into dev" into refs/staging/dev

4 years agoMerge remote-tracking branch 'gerrit/stable' into dev
Alex Blasche [Fri, 14 Feb 2014 15:07:58 +0000 (16:07 +0100)]
Merge remote-tracking branch 'gerrit/stable' into dev

Conflicts:
src/bluetooth/qbluetoothserver.cpp
src/bluetooth/qbluetoothserver.h

Change-Id: Ia99c341ab6b4fb30d9ceb9e4516c7083eed1c547

4 years agoFix namespaced builds
Alex Blasche [Fri, 14 Feb 2014 11:13:58 +0000 (12:13 +0100)]
Fix namespaced builds

It seems the logging frameworks function pointer
creates errors on some compilers.

Change-Id: I35d9b2bbc9817789bfd1eafa9c62d19ca72eda8c
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
4 years agoQNX: Config test for libbb2
Fabian Bumberger [Thu, 13 Feb 2014 20:09:07 +0000 (21:09 +0100)]
QNX: Config test for libbb2

libbb2 is not available in a public NDK yet. In order to be able to compile NFC for
BlackBerry 10 with a public NDK the BB10 implementation for the QNearfieldShareManager is only
built if libbb2 is detected.

Change-Id: Idd11d4584215fade91db9f79895f901547bce3ef
Reviewed-by: Stuart Burge <sburge@blackberry.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Reviewed-by: Wolfgang Bremer <wbremer@blackberry.com>
4 years agoFix qmake and compiler warnings
Alex Blasche [Thu, 13 Feb 2014 11:38:14 +0000 (12:38 +0100)]
Fix qmake and compiler warnings

Public headers should not include local header files (qmake warning)
and fix warning about unused parameter.

Change-Id: Id12d2255f6011507649b25ed2bc74356e0f4538e
Reviewed-by: Stuart Burge <sburge@blackberry.com>
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
4 years agoFix missing QBluetoothSocket::state update after unsuccessful SDP search old/5.2
Alex Blasche [Thu, 13 Feb 2014 09:54:51 +0000 (10:54 +0100)]
Fix missing QBluetoothSocket::state update after unsuccessful SDP search

When connectToService() triggers an SDP discovery the search may
fail. At the beginning of the discovery the socket state was set to
ServiceLookupState. This patch ensures that the socket state resets to
Unconnected if the SDP discovery failed.

Currently only Bluez uses this discovery mechanism and therefore is the
only affected platform.

Change-Id: I982dafc1f5466071bbf910ed3cf7cf7abda14fe4
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
4 years agoAdjust strings for translation
Alex Blasche [Thu, 13 Feb 2014 11:06:43 +0000 (12:06 +0100)]
Adjust strings for translation

This includes unification of error messages, fixes for spelling
mistakes, hints for translators and other forms of simplifications.

Change-Id: Idd0e01614b24ff2d19133f0d19d49649d59e3f57
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
4 years agoFix interaction with Android devices
Alex Blasche [Mon, 10 Feb 2014 12:52:48 +0000 (13:52 +0100)]
Fix interaction with Android devices

The custom uuid of a Serial port profile must be part of the service
class property. This enables Android to find the custom uuid.

Change-Id: Ibe0bfcfe6ba7fa6b72a979153afccf17d6b4eb83
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
4 years agoPort QtBluetooth to Android
Alex Blasche [Mon, 10 Feb 2014 14:37:17 +0000 (15:37 +0100)]
Port QtBluetooth to Android

This is a feature merge to dev targeting Qt 5.3.

Known issues:
-QTBUG-36754: QBluetoothServer::close() crashes
-QTBUG-36763: QBluetothTransferManager port to Android not possible
-QTBUG-36764: Improve QBluetoothLocalDevice::connectedDevices()
-QTBUG-36810: Remove direct use of Android action strings

The above issues and some other minor TODO's will be addressed
until final release time.

Task-number: QTBUG-33792

[ChangeLog][QtBluetooth][Android] QtBluetooth has been ported to
Android.

Change-Id: I31ba83e3b7d6aa68e7258b7e43235de7d1a6e68a
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoAdded class description.
Nedim Hadzic [Tue, 14 Jan 2014 16:45:29 +0000 (17:45 +0100)]
Added class description.

BLE info classes did not have basic description, which is added now.

Change-Id: I5cc679ebe3ad0ae74c558cf0f782a9bf20ed8f21
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
4 years agoAdd support for NFC file and data sharing
Stuart Burge [Wed, 18 Dec 2013 21:38:09 +0000 (16:38 -0500)]
Add support for NFC file and data sharing

Provide ability to allow NFC enabled devices to exchange file and data content
using a high-level API.

[ChangeLog][QtNfc][General] A new NFC share API was added.
The API provides sharing of NDEF messages and arbitrary files via
NFC and may potentially use other communication protocols
such as wifi or Bluetooth as part of its implementation.

Change-Id: I878df1702ce4164384096d00e53dcd354d1bfafc
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
4 years agoReduce debug output on Bluez
Alex Blasche [Mon, 10 Feb 2014 12:54:21 +0000 (13:54 +0100)]
Reduce debug output on Bluez

Change-Id: I82459078c0510d27ae3611e2914b0ec36ff625ed
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
4 years agoExplicitly declare the parameter type of QBluetoothServer::error().
Alex Blasche [Mon, 10 Feb 2014 12:49:27 +0000 (13:49 +0100)]
Explicitly declare the parameter type of QBluetoothServer::error().

The connect signal has trouble deciding on the error type.

Change-Id: I6efde7629af832f394b2ae9ba5a266e281a4a1aa
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
4 years agoMerge branch 'stable' into dev
Alex Blasche [Fri, 7 Feb 2014 14:35:29 +0000 (15:35 +0100)]
Merge branch 'stable' into dev

Change-Id: I8765fee07cec0588a0336178300129b75c13c30a