Commit Graph

237 Commits

Author SHA1 Message Date
Alex Blasche 794df27126 Improve QML Chat example UI
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>
2014-10-05 11:23:56 +02:00
Alex Blasche 22042412de Provide example documentation for new chat example.
Change-Id: I073b0b4432d7e51516584aa1d23c681bb8544392
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-09-30 14:05:04 +02:00
Alex Blasche 8be9bf4cea New QML based Bt chat client
Change-Id: I235c54591dbbf04aa58c024093beca8c068b4aed
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-09-30 14:04:54 +02:00
Timur Pocheptsov f5a1cb81eb QtBluetooth : pingpong example on OS X
Re-order some declarations to make the example work on OS X.

Change-Id: I9e74ce7b19a3d749f6ba0f951c1ce013f42729f7
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-09-26 15:41:00 +02:00
Alex Blasche b32a8ffc58 Fix pingpong example
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>
2014-09-26 15:16:30 +02:00
Alex Blasche 5a69401899 Remove QLowEnergyServiceInfo
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>
2014-09-03 08:38:55 +02:00
Alex Blasche 2da622742a Rename descriptorChanged() to descriptorWritten()
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>
2014-09-02 20:18:26 +02:00
Alex Blasche 6837d143b4 Add support for random vs public address selection to lowenergyscanner
Change-Id: I963f47f0089d072249b73bdfb0c715d43186b08d
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-09-02 13:58:14 +02:00
Alex Blasche 0a8327d422 Update and extend the lowenergyscanner example docs
Change-Id: I0be30191cbceb963c7e1bfd7e55a1f2f38772d5f
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2014-08-25 14:03:25 +02:00
Alex Blasche 7a3a3f7664 First round of fixes for heartrate example docs
Remove old and obsolte code description. Later this will be readded
based on the Bluetooth-le-overview documentation which describes the
same thing.

Improve screenshot section of the example.

Change-Id: I499809fa0afdb27f09844678a52d0ce5a492b3c0
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2014-08-25 14:03:19 +02:00
Alex Blasche 1da3df99c1 Provide a documentation overview for Bluetooth LE
Change-Id: I252c085f5b3ea6ccc2820a1f59d9228745ae2900
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
2014-08-25 14:03:12 +02:00
Alex Blasche 199bd83065 Detect secondary services and display service type in lowenergyscanner
QLowEnergyService::ServiceState was converted to a flag because a
primary and secondary service can be included by other services.

Change-Id: I425ce8e3f39ee07cccee2763b57a049a624f6178
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-07-23 15:28:49 +02:00
Alex Blasche 58d1b5bdff Characteristic and descriptor value() are no longer hex encoded
There is no point converting the data to its hex representation. The
use case at hand will decide it in the current application context.
The returned QByteArray is the raw byte array as it comes from the
device.

This behavior was legacy (introduced by the previous API) and
subsequently it was simply adopted.

Change-Id: If662c02a5e3c3d37cccb374add02e75522352894
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-07-23 15:28:47 +02:00
Alex Blasche 45536c645b Rename QLowEnergyControllerNew -> QLowEnergyController
Moves the new API into its place and completes the removal of the old
API.

Change-Id: I10a285e24e288aeb747cb1606574e27a4bf57308
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-07-23 12:13:21 +02:00
Alex Blasche d5731113e9 Remove old GATT API
The subsequent patches will rename QLowEnergyControllerNew to
QLowEnergyController and fix up the documentation fragments which still
point to the old API.

Change-Id: I084e6b1a85a17f424702018f3ad7047bda35d46a
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-07-23 11:01:47 +02:00
Alex Blasche ae61ed1764 Minor anchor optimization pointed out during code review
Change-Id: Ia83faca0a48174e1faf47491b22db636200f5ea8
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-07-17 20:20:10 +02:00
Alex Blasche ba3c1f4f2a Various improvements to lowenergyscanner example
1.) Improves UI flow
2.) Improves error behavior (e.g. device disconnects)
3.) Adds missing signal/model updates whcih caused unexpected UI flow

Change-Id: Icc7edf4945df0e964b5c91b407ce5976a1585b81
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-07-16 08:28:58 +02:00
Alex Blasche f399837b3a Add simpler API to retrieve descriptor/characteristic for certain uuid
This new API is mostly syntactic sugar and reduces the amount of code
to be written by API users.

Change-Id: I51ff1ea706ac97199646d211e39e79c8140ee74b
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-07-16 08:28:46 +02:00
Alex Blasche 8bf7e9986e Port HeartRateListener Example to new API.
Change-Id: If3af869a8e5d380592d24b7482ff8eb34a11e6a0
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-07-16 08:28:44 +02:00
Alex Blasche 74a4d1b1ab Improve qlowenergyscanner example UI
This patch improves the UI. The changes will be validated against a high
DPI device at a later stage.

Change-Id: Iac15941dd983fb65cc5f3ccf6803c2e95d43c3b4
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-07-15 20:39:46 +02:00
Alex Blasche c39189a922 Port lowenergyscanner example to new API
Some minor improvements have been incorporated too but the focus is on
the port. More code and UI cleanups are required.

Change-Id: I56f226b8418b78190d498df04d67686220a3644e
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-07-15 20:39:40 +02:00
Alex Blasche f78b5f54d8 Merge branch 'dev' into btle
Conflicts:
	src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp

Change-Id: Ib960b9e8d8800af84d2094bdf26c2652d4c81dba
2014-07-03 09:23:25 +02:00
Alex Blasche e31df00987 Merge branch '5.3' into dev
Conflicts:
	.qmake.conf
	src/bluetooth/qbluetoothlocaldevice_bluez.cpp
	src/bluetooth/qbluetoothlocaldevice_p.h
	src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp

Change-Id: Ifb0c01eb8bffbffcd2416ea8d7bf1d36eb1c70f2
2014-06-27 11:47:22 +02:00
Alex Blasche ad0df0de1b Properly deal with pairing errors in btfiletransfer example
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>
2014-06-16 08:38:53 +02:00
Alex Blasche 8b6881d13f Make lowenergyscanner example compile after recent API changes
The handle of a characteristic is not longer a string but a number.

Change-Id: Ic580ec8e365076704192a466cca9a6bf06786f58
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
2014-06-11 12:03:32 +02:00
Alex Blasche b37dcff2f4 QBluetoothDeviceInfo::coreConfiguration() should return the QFlag
Function name was slightly adjusted to reflect the fact that it's a
flag.

Change-Id: I9c1a2fe64b93c7ae7bd826d856f8b87f985d7473
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-06-04 13:42:15 +02:00
Alex Blasche 7abb1f0464 Rename permission related API in QLowEnergyCharacteristicInfo
1.) Rename QLowEnergyCharacteristicInfo::Property to
QLowEnergyCharacteristicInfo::PropertyType

2.) Rename permissions() to properties()

3.) Return PropertyTypes as return value for
permissions()/properties()

Change-Id: I5c4037876047354fd691cadc54d3ac6098db4522
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-06-04 13:42:03 +02:00
Alex Blasche f334ea4b19 Merge branch 'dev' into btle
Conflicts:
	examples/bluetooth/bluetooth.pro
	src/bluetooth/bluez/bluez.pri
	src/bluetooth/doc/src/bluetooth-index.qdoc
	src/bluetooth/qbluetoothdevicediscoveryagent_bluez.cpp
	src/bluetooth/qbluetoothdeviceinfo.cpp
	src/bluetooth/qbluetoothservicediscoveryagent_bluez.cpp
	src/bluetooth/qbluetoothservicediscoveryagent_p.h
	src/bluetooth/qbluetoothservicediscoveryagent_qnx.cpp

Change-Id: I88b22c51a4ee95b067ef8d2b2fddb5cbff4566f8
2014-05-26 14:56:49 +02:00
Alex Blasche 10cd7743aa Utilize QStringLiteral where possible
The only exception are generated files and cases where
QLatin1String based overloads are used (e.g. during QString comparisons)

Change-Id: I6f36789fb8acb3b30c1dc1f8a920b118a979d74f
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-05-15 10:10:05 +02:00
Alex Blasche 94445dd4b9 Merge branch 'stable' into dev
Conflicts:
	.qmake.conf
	src/bluetooth/qbluetoothlocaldevice_bluez.cpp
	src/bluetooth/qbluetoothserver_p.h
	src/bluetooth/qbluetoothsocket_qnx.cpp

Change-Id: I08792f10155f9b4e6af30066b70e24b48985ddd6
2014-05-08 09:51:40 +02:00
Oleg Shparber 19a8f2f275 Replace all occurrences of Q_EMIT with emit
Change-Id: Ieec72048837abe70b0187086b265bcde96c7d6cd
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-04-29 12:22:45 +02:00
Jani Heikkinen f665f9d8c5 Merge remote-tracking branch 'origin/release' into stable
Change-Id: Ic86710cdf2550f5cf70c81af3f351d6712cd1b0e
2014-04-23 12:44:00 +03:00
Jerome Pasion d6f4ada86a Doc: Improved example documentation
-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>
2014-04-14 12:54:45 +02:00
Alex Blasche 1399fc2c3e Use extended SDP discovery in btchat example.
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>
2014-04-14 12:28:33 +02:00
Alex Blasche 1b25616737 Remove old Bluetooth tennis example
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>
2014-04-02 16:00:26 +02:00
Nedim Hadzic 3909595e89 QML PingPong example added
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>
2014-04-02 14:06:19 +02:00
Nedim Hadzic ec4aa0bcb5 Added and improved error handling in controller class
Error enums added and implemented together with examples.

Change-Id: I912c396080ee9a6b87f41104eb7e41f8c62abf8b
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-03-25 11:46:14 +01:00
Alex Blasche 8ba83c809f 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>
2014-03-15 20:59:25 +01:00
Alex Blasche 83cd348bde Merge branch 'dev' into btle
Conflicts:
	src/bluetooth/qbluetoothuuid.cpp
	tests/bttestui/btlocaldevice.cpp

Change-Id: Id16ab93ec61361950669da7eb232769c5dc4644f
2014-03-14 11:16:27 +01:00
Alex Blasche 2802eac9bc Ensure examples behave on default backend and/or with no local Bt device
This patch fixes crashes and ensures that examples give some form of
indication why they are not working.

Change-Id: Id99951e8729c0715505e5fff7448a475979a6406
Reviewed-by: Nedim Hadzic <nhadzic@blackberry.com>
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-03-14 08:39:50 +01:00
Alex Blasche 3300671a9c 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>
2014-03-10 11:24:51 +01:00
Alex Blasche 92b8a0bb37 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>
2014-03-10 10:40:00 +01:00
Nedim Hadzic 10126f30e5 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>
2014-03-10 09:31:41 +01:00
Alex Blasche 9e1fa32246 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>
2014-03-06 08:38:27 +01:00
Sergio Ahumada 5ac9aebf83 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>
2014-03-03 09:50:50 +01:00
Nedim Hadzic eb632012c2 Lowenergyscanner example improved
Error handling improved, code styling improved.

Change-Id: I1f35c6a6ef9641cb445fdbe55e0127b554e50ebc
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-02-27 14:56:08 +01:00
Nedim Hadzic cdc3ee8b00 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>
2014-02-21 22:57:03 +01:00
Nedim Hadzic eea868ab5f 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>
2014-02-21 21:40:30 +01:00
Alex Blasche dc75ca260e 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>
2014-02-20 21:37:53 +01:00
Alex Blasche cb51442e0c Fix incorrect license header.
Change-Id: If58d69ea4afb6418d60b3e0b6e9fef10ae09c055
Reviewed-by: Nedim Hadzic <nhadzic@blackberry.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-02-20 16:34:51 +01:00
Alex Blasche 8fe7fbe6b5 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
2014-02-17 10:38:48 +01:00
Alex Blasche 0f700c166e Adjust qml scanner example to high dpi display
[ChangeLog][QtBluetooth][General] QML scanner example
has been optimized for high DPI displays. This ensures a better
user interface for Android and Blackberry devices.

Change-Id: If757cd9faddc155cbb4bb034885662abc84fc7a6
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-01-29 09:51:44 +01:00
Alex Blasche 6d08ef8b9a Add documentation for picture transfer example and minor QML fixes
Change-Id: I8ef9e19de9f48797034fd186dff4b0e096748b1d
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-01-28 16:06:22 +01:00
Fabian Bumberger eae113bb1c Adding a qml OPP example for sending pictures
[ChangeLog][QtBluetooth][General] Added a new
Object-Push example.

Change-Id: I78988771259dd9c7b65080bb7fb9828f6f55ece4
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-01-28 16:06:11 +01:00
Frederik Gladhorn a58f38f1c1 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	.qmake.conf

Change-Id: I7295292bb7d9b5fc7eba8f099f4592b70de80d11
2014-01-17 17:11:22 +01:00
Alex Blasche 81be87c88f Print error message in Bluetooth QML scanner example.
It required 15 min debugging the not working application till it was
discovered that the Bluetooth device was not turned on.

Change-Id: I05318c78dd4f19780d0b6343a4ae781703c18d91
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-01-15 16:30:58 +01:00
Alex Blasche 1454664752 Don't build scanner example without QtQuick
Task-number: QTBUG-35711
Change-Id: I0406fb5edd8fb2a90046308853485eaaa4311a26
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-01-15 12:20:35 +01:00
Nedim Hadzic 5cb7cd7cb5 Implemented Bluetooth Low Energy: examples documentation
Added documentation for lowenergyscanner example together with two screenshots.

Change-Id: I3615ffee26edd5b2ce75e93adc940ba9d272f072
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2014-01-14 17:15:25 +01:00
Nedim Hadzic 316a17406b Implemented Bluetooth Low Energy: examples
Examples which illustrate how to use BLE API are implemented. First example
is an application for discovering LE devices, services and characteristics.

Change-Id: Ic144c78499b74934541837df9a53183b4e7e32f7
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-01-09 17:48:29 +01:00
Alex Blasche 94f862e278 Use QLoggingCategory to categorize the various debug output streams
Task-number: QTBUG-32253
Change-Id: I193162407d0fc7eca83689e31f03e1641a494ab0
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2013-12-20 09:06:10 +01:00
Alex Blasche 6a07037765 Fix make install rules to all examples in QtConnectivity repo
This was highlighted during the testing of the Qt 5.2.0 package.

Change-Id: I94b27f02a6621bccb9f0ce0d0cc184a449014573
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2013-11-28 15:09:08 +01:00
Nedim Hadzic ec61d7b9e8 Implemented Bluetooth Low Energy gatt service and characteristics discovery
Bluez v4.x does not have total support for LE devices, a new approach, using gatttool command was implemented.

Auto-tests and documentation will be in other commits.

Change-Id: Iee711cc111199e15956052eebb7593bd3a5e27c8
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2013-11-04 09:35:01 +01:00
Nico Vertriest f674d4a5ad Doc: language and style review doc qtconnectivity
Reviewed doc Bluetooth and NFC

Task-number: QTBUG-32173
Change-Id: I80f81c2123c3ee4fc269f471123f332dc39ee958
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-10-14 12:44:21 +02:00
Alex Blasche f50cf1de80 QtBluetooth QML API starts with 5.2.
5.0 remains as silent import though.

Change-Id: I06c839a1224dc0d8b019bd99e354245f829ae750
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2013-10-14 09:30:17 +02:00
Alex Blasche aa5f17bda3 BluetoothDiscoveryModel API fixes
- rename signal: newServiceDiscovered -> serviceDiscovered
- rename signal: newDeviceDiscovered -> deviceDisovered
- add parameter to deviceDiscovered signal
- improve documentation for above signals
- minor example fixes

Task-number: QTBUG-33678
Change-Id: I2f9223250ef844564c3e76a85adc25322867fd6e
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2013-10-11 15:57:06 +02:00
Fabian Bumberger eefe516bd0 Change the service properties in btchat example
And adding some links to the documentation.

Change-Id: I7f9baf6a648547ef028f9521b0d88b88267fa301
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2013-10-01 15:53:59 +02:00
Alex Blasche 176d5208a3 Emit service discovery error during internal device discovery
This was discovered when starting a service discovery while no
Bluetooth device is connected.

Change-Id: Ibb970ee6cb95ff50bca635813cce23c4d7f8e3c6
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2013-09-25 11:26:46 +02:00
Alex Blasche 85de7d64e8 Fix peer to peer communication using two local adapters.
The code assumed to use the default adapter in a variety of places
which caused wrong SDP registrations, device searches and peer names.

The btchat examples was extended to cope with two local adapters. If there are
more than two local adapters they will be ignored.

Change-Id: I27d8bce65d943773e4e6cbd86982446fa79664a4
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2013-09-25 10:37:27 +02:00
Fabian Bumberger ec83763323 Unify QBluetoothSoket, QBluetoothServer and QBluetoothServiceInfo protocol enum
Change-Id: I6e66196a599e2cceabc7d93d728ba97361d8999f
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2013-09-20 10:09:12 +02:00
Fabian Bumberger 8e86bc19f4 Refactor QBluetoothDiscoveryModel
- Add the option to discover devices
- Clear the model when a new discovery is started. In the previous implementation the model was only cleared if new data was available.
This can lead to some funny results.
- Change some property types to enums
- Enhance the qmlscanner example

Change-Id: I94f33e3eabd7440b5c0c6c83f3e8158009bd2dbd
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2013-09-18 17:24:18 +02:00
Alex Blasche 2d8378e498 Cleanup Bluetooth project dependencies
This removes unnecessary Qt dependencies.

Change-Id: I0ae1fe711808f8e40aed5cc8b535bb5e1da58bff
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-17 08:54:51 +02:00
Fabian Bumberger b358f7d991 Remove qdeclarativebluetoothimageprovider
This class in unfinished and does not work properly plus it introduces a dependency to the svg module.
I also refactored the example where the icon was used.

Change-Id: If3bd5e2eb6b05e090255f1bae0015d69c2a83065
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2013-09-16 11:48:33 +02:00
Alex Blasche 1047f9e838 Fix compiler warnings
Change-Id: I5d5eca4af0faa392defcec8ac50c7026eaeba2b1
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2013-09-10 09:52:49 +02:00
Alex Blasche e21b666856 Remove QtBluetooth and QtNfc namespace.
This is based on namespace discussions on the Qt project dev mailing list.
We continue to use the Qt namespace.

Change-Id: I6119d06662f7682c11f42d759f3218be1f5a7d6c
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-09-09 12:44:29 +02:00
Nedim Hadzic ecb93e0f63 Make Bluetooth adapter choosable for device and service search
In case there are more Bluetooth adapter, device and service search
might give different results.

Addition to Change-Id: Ideddb39460985c18547baec986b15e43946c85de - added option
for setting the device adapter for service search. QBluetoothLocalDevice was used
in both classes (device and service search) for passing an argument for setting
adapter. The reason for this to keep the same approach, because in
QBluetoothServiceDiscoveryAgent class there is already a constructor
with QBluetoothAddress argument.

Auto tests and examples updated.

Change-Id: Ib5d7ff23e4846d9d42dae68d8d424031748811e5
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2013-09-05 10:23:47 +02:00
Fabian Bumberger d8d903826d Merge QRfcommServer and QL2capServer to QBluetoothServer
Task-number: QTBUG-32722

Change-Id: Ia75ad5af2f81b737a8cca09dba919a7dc0fa0f8a
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2013-08-29 14:06:54 +02:00
Alex Blasche 40158b4277 Improve QBluetoothTransferManager unit test
and fix some minor issues during the process.

Task-number: QTBUG-22017

Change-Id: Iff1adde28ba818c3ed0511cb5d45404f05d7c36f
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2013-08-09 14:57:14 +02:00
Alex Blasche eacbe014db Improve btfiletransfer application
This improves the general error response while doing OPP.

Change-Id: I28fd68bfb5d6eae83ec6422c723acf98abc3abdd
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
2013-08-06 11:44:38 +02:00
Fabian Bumberger a7d01a4f0d Clean up for OPP
- Remove Operation enum, because we only support put requests
- Add the request to the transfer reply
- Move startOPP to the private area

Task-number: QTBUG-32726

Change-Id: If7dae547326cb74dcdd6449c08dc0d91fb8a78b2
Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
2013-08-01 11:27:52 +02:00
Alex Blasche b0cca9bdd0 Remove code related to dead or currently unsupported platforms
- Removes the Meego/Maemo backend for QtNfc
- Remove Simulator, WinCE and S60 remnants from the examples

If any of these platforms becomes relevant they can be added back
of course.

Change-Id: I84712ea07f01794b622560ce77e08cee347406e3
Reviewed-by: Michael Zanetti <michael.zanetti@canonical.com>
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Alex <alexander.blasche@digia.com>
2013-07-25 14:30:14 +02:00
Alex Blasche 1f0771e278 Fix BluetoothDiscoveryModel API and related fixes in example
This addresses a few bugs in the QML UI and makes the behavior
of the BluetoothDiscoveryModel more sane.

Change-Id: Ifae0848a70b8fa31a2582a5db91b4bed927926aa
Reviewed-by: Alex <alexander.blasche@digia.com>
2013-07-12 10:07:01 +02:00
Alex Blasche 8dad4698d9 Update Copyright headers
- Update Digia's copyright year
- Add copyright to files without it
- Convert old BSD to new LGPL license for auto test code

Change-Id: I47f5c871c436f9c2731b235026434448719cc671
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-06-25 10:08:54 +02:00
Oswald Buddenhagen b2e4fbd2c8 fix examples regarding namespace macro use
Change-Id: I0c06adad47f206c796e242ea265809ca7882807d
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-03-13 14:16:20 +01:00
Aaron McCarthy 1002efbb0c Rename NFC and Bluetooth namespace macros.
Renamed to the namespace macros to follow what syncqt expects.  This
fixes missing namespace macro warnings printed by syncqt.

Change-Id: I7be5a700e8435a559cb4c2e74938851233095887
Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
2013-02-14 13:26:02 +01:00
Aaron McCarthy a9609faf44 Modularise documentation.
Qt Bluetooth documentation had been modularised but it was still
building using the old version. Use the qtbluetooth.qdocconf instead.

Modularise the Qt NFC Documentation.

Change-Id: Idea1631645bf21750254eddc1c41a4f819ac5156
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2013-01-30 12:23:50 +01:00
Oswald Buddenhagen 318e889fd4 make use of qtHaveModule()
Change-Id: I810dc7b5863c1674390a7e471845f1779cbba98c
Reviewed-by: Tasuku Suzuki <stasuku@gmail.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-01-04 09:37:58 +01:00
Jerome Pasion d8a179128c Qt Bluetooth: Modularized documentation
-moved documentation to src/bluetooth/doc
-added a qdocconf file for Qt Bluetooth
-fixed relative paths for snippets
-moved examples to examples/bluetooth

Change-Id: Id41bac50dca628400568d191f1c3ccfbaac790a1
Reviewed-by: Alex <ablasche@gmail.com>
2012-09-27 14:43:52 +02:00