summaryrefslogtreecommitdiffstats
path: root/src/bluetooth
Commit message (Collapse)AuthorAgeFilesLines
* winrt: Added default bluetooth device capabilities for Windows 10Oliver Wolff2016-10-071-0/+6
| | | | | | | | For Windows (Phone) 8.1 the bluetooth capabilities are more complicated and incompatible with the way we add them from qmake. Change-Id: Iccffd2200c0e50b300da27b1207da844f9982091 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* winrt: Enable BTLE support for Windows 10 (Mobile)Oliver Wolff2016-10-073-236/+299
| | | | | | | | | | | | | | | | | As Windows 10 (Mobile) asks for permission before the user is able to use a Bluetooth (LE) device, the synchronous approach does not work any more. While implementing that new asynchronous way the sources were also cleaned up to be more readable (separate declaration and definition of QWinRTBluetoothDeviceDiscoveryWorker). As device discovery and Bluetooth LE work as expected on Windows 10 (Mobile) it is enabled by default now. Task-number: QTBUG-55862 Change-Id: I9e4a8d21d013b9eaf603380a784afdda3e1ab9ec Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* winrt: Added missing error handling to device discovery and low energyOliver Wolff2016-10-042-20/+44
| | | | | | | Task-number: QTBUG-56191 Task-number: QTBUG-56219 Change-Id: I8ad3dc392d09055418b0dca3794386e53f287307 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Check Location permissions before running LE scan on AndroidAlex Blasche2016-09-211-0/+26
| | | | | | | | | This patch requires new private API in QtCore to handle responses when requesting Location permissions. Task-number: QTBUG-55035 Change-Id: I3a6434b9d2d4f66094ed2a4f59667665bd0a905c Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-1913-48/+391
|\ | | | | | | Change-Id: Ia2ce8bf47d9156c550f5360b1422b50313854338
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-1610-42/+383
| |\ | | | | | | | | | Change-Id: I3eec9a22565585d4fc40831d609a3083ce99a52c
| | * QBluetoothSocket::connectToService - check a socket type firstTimur Pocheptsov2016-08-262-4/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Attempt to connect to a service using a socket with UnknownProtocol socket type will fail, but can result in an incorrect UnknownSocketError reported and also can start a device discovery (then finally failing to connect after all). Check this condition early before trying to actually connect/do device discovery and report error properly as UnsupportedProtocolError. Task-number: QTBUG-55073 Change-Id: Ib39e1ca7ad401e07d6387201a4664a1185d38d39 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| | * Doc: Change instances of 'OS X' to 'macOS'Topi Reinio2016-08-167-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of version 10.12 (Sierra), the name of Apple's desktop operating system will be macOS. Change all occurrences where the platform is discussed to use the macro \macos (defined in the documentation configuration in qtbase). Change-Id: I97f7a0d6d2ca351395bed518f01d4365b986500a Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
| | * Android: Avoid newDevice signal spamming in QBluetoothDeviceDiscoveryAgentAlex Blasche2016-08-011-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SDP based scans and LE scans can find the saame device (address) with different device names. This is caused by the fact that different channels are used to retrieve the information. Those two channels can advertise different device names. Before this patch the first entry was added to the list of discovered devices. When the second entry with different name came about, the entry was never added to the list of discovered devices. Nevertheless the deviceDiscovered() signal was triggered each time. This lead to a situation where application which were listening to the signal only never noticed the duplicated entries and showed a new discovered device each time the address matched but not the remainder of the device info. This problem was made worse by the fact that the LE scan on Android continues to fire the new device discovered signal once per second. This patch distinguishes devices with the same address but different names. They are treated as separate entries now. Change-Id: I77259a888708309338110831e86bb7ce9253f2a6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| | * Android: Device discovery doesn't provide major & minor device class infoAlex Blasche2016-08-011-11/+298
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QBluetoothDeviceDiscoveryAgent did not extract the QBluetoothDeviceInfo::majorDeviceClass() and QBluetoothDeviceInfo::minorDeviceClass() information. The Android API provides info for all major device classes. However not each major device class has its set of API for the minor device class information. Caching is applied to match Android major device class values against their matching Qt enum. When a matching entry is found, the value is added to the cache. In principle, the mechanism is applied for minor device class values. However since there are many many more minor device class fields, the caching is a bit more proactive. The patch will proactively read and cache all minor device class values for a given major device class. This avoids a large overhead of very long if..else if...else if..else statements. Change-Id: I26a6c29c6f5dca6d4f3b4b25902cda03a10ae5de Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
| * | Make QtBluetooth Low Energy work when Qt runs as Android serviceAlex Blasche2016-08-031-2/+2
| | | | | | | | | | | | | | | Change-Id: Ic0814c3f5a65ce9ac9236c41397400fc42abb572 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
| * | Make Classic QtBluetooth work as an Android serviceAlex Blasche2016-08-032-4/+6
| | | | | | | | | | | | | | | Change-Id: Ibde0242b058f728fd7e060b37f427c208325db13 Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* | | winrt: Remove comment that no longer appliesOliver Wolff2016-08-091-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Due to recent changes the worker is deleted by the device discovery agent and does no longer handle its own lifetime. Change-Id: I3bd0e4880ab7ee48b900e2b38591c131f468f7a1 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | | winrt: Filter devices found by the LE device watcherOliver Wolff2016-08-092-3/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | It is possible that devices are found by the initial scan and by the device watcher. In this cases the "device found" signal should not be emitted. Change-Id: Ic8aa5a088092adfa8a5b2ea5a3c91350a7897e6a Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | | winrt: Connect LE timeout to correct discovery workerOliver Wolff2016-08-091-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | The timer has to be connected to the newly created workers, otherwise the timeout will only be triggered for the first worker that is created. Change-Id: Ifee8bc16f1308e126a47b3c2a88b5a4475f28620 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | | winrt: Add mean to choose bluetooth discovery modeOliver Wolff2016-08-091-20/+26
| | | | | | | | | | | | | | | Change-Id: I8af49849f6fbe7fc2920a8cb814fa9cf12de392d Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | | winrt: Stop LE scan timer when stopping device discoveryOliver Wolff2016-08-091-0/+2
| | | | | | | | | | | | | | | Change-Id: Ia639ac6ef3418991390c4aab4732be7ecf14c00e Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | | winrt: Start device watcherOliver Wolff2016-08-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | If the device watcher is not started, it cannot be stopped and an originate error will occur. Change-Id: Ia387cf8ada93d34bee9dcea142492cd2fa650249 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | | winrt: Add missing error handling for device discoveryOliver Wolff2016-08-091-3/+8
| | | | | | | | | | | | | | | Change-Id: Idbda4faf542baf2fa7ad652cfa90701fb0f9020c Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* | | winrt: Implement LE device discovery timeoutOliver Wolff2016-08-042-4/+86
| | | | | | | | | | | | | | | Change-Id: If6ec32dc3105b3498eef8a20e8f464a85f1ee891 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | | Do not permit QLEController::connectToDevice() in peripheral modeAlex Blasche2016-08-031-0/+5
| | | | | | | | | | | | | | | | | | Change-Id: Ie6f0e1afdcd81cbd0d3c514d7f02a61109b58d1a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* | | Merge remote-tracking branch 'gerrit/btle' into devAlex Blasche2016-08-038-1/+1435
|\ \ \ | | | | | | | | | | | | | | | | | | | | Merges Qt Bluetooth Low Energy port on WinRT into mainline. Change-Id: Ic519955dfee4a57635c525a79b900340fbc5562f
| * | | Proper state and warning on access denied errorOliver Wolff2016-07-281-0/+5
| | | | | | | | | | | | | | | | | | | | Change-Id: I4cf980c020fa11a1e213a1f5cd0110033aeaec71 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * | | Register connectionStatus callback in Xaml threadOliver Wolff2016-07-261-12/+16
| | | | | | | | | | | | | | | | | | | | Change-Id: I06777c75c20f662d3dff897f65947321eb79d5a2 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| * | | WinRT: getNativeService/getNativeCharacteristic helper functionsOliver Wolff2016-07-262-53/+70
| | | | | | | | | | | | | | | | | | | | Change-Id: I5094eb7252049e55617a2883d0f917700c42b451 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| * | | winrt: Proper handling of ClientCharacteristicConfigurationOliver Wolff2016-07-261-91/+229
| | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-37779 Change-Id: Ie37067abc104a2e6e162ea9e00af8ff6d504fb0e Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| * | | WinRT: use constrefs for ComPtr parameters where applicableOliver Wolff2016-07-191-4/+4
| | | | | | | | | | | | | | | | | | | | Change-Id: Ic4ba77d86f11e984ba66929006df183d227fccce Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| * | | Merge remote-tracking branch 'gerrit/dev' into btleAlex Blasche2016-07-1324-422/+581
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds the minimum compile requirements for the new QBluetoothDeviceDiscoveryAgent API. Change-Id: Idfe07bee63de9d2849ab68eb455d0be470591795
| * | | | WinRT: BTLE: Write descriptorsOliver Wolff2016-06-161-5/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-37779 Change-Id: Ib3ef0723b069275f4dd96dfba8316cc2b4ecb4f3 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| * | | | WinRT: BTLE: Write characteristicsOliver Wolff2016-06-161-6/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-37779 Change-Id: I10a9ebdb6d879646f9b063fa031b02f0c71797b4 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| * | | | WinRT: BTLE: Read descriptorsOliver Wolff2016-06-161-4/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-37779 Change-Id: I25f598ad7b5aef3791070842cbbc1a405e264572 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| * | | | WinRT: BTLE: Read characteristicsOliver Wolff2016-06-161-3/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-37779 Change-Id: I430009132f68ed71e6054bebece05101fde7409a Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| * | | | Merge remote-tracking branch 'gerrit/dev' into btleAlex Blasche2016-06-1025-520/+314
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Change-Id: Ie6cc29263dd8d9d58bdbd14fb0d3b57d7abea9c7
| * | | | | WinRT: Use ComPtr for native typesOliver Wolff2016-05-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Id6b09a04925296ff8b21b9c784df722fae79e3cd Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| * | | | | WinRT: BTLE: Discover service detailsOliver Wolff2016-05-311-2/+237
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-37779 Change-Id: I5a4fb51b9c2402954ce4d370f003e8787561f5a7 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| * | | | | WinRT: BTLE: Discover list of available servicesOliver Wolff2016-05-312-1/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-37779 Change-Id: Ia92facf9f3f1c6aae8fac7a205d3f9ad4921787e Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| * | | | | Merge remote-tracking branch 'gerrit/dev' into btleAlex Blasche2016-05-2715-13/+97
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | Change-Id: I533ed177193b4c7a9a1b6110612103e40a24a597
| * | | | | | winrt: BTLE: Device (dis-)connectionOliver Wolff2016-05-263-1/+276
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-37779 Change-Id: I0f83e706a10d6c42543bd41aa012fde746f1a334 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| * | | | | | Assume presence of local bluetooth adapter on WinPhoneOliver Wolff2016-05-261-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As we cannot obtain any meaningful information (like bluetooth address) or perform operations like pairing using the WinRT API QBluetoothLocalDevice is not implemented for Windows phone. As we assume the presence of a valid bluetooth adapter though isValidLocalAdapter has to return true to enable the functionality. Change-Id: I84d38852d2fa632e0e7cf72bbdd57f1b7a9707fd Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| * | | | | | Detection of bluetooth (LE) devices has to happen in Xaml threadOliver Wolff2016-05-262-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ibfc1b272664b989e9836e02674691f24a53a5231 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| * | | | | | Fix missing printDummyWarning() symbol on WinRTAlex Blasche2016-05-171-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The WinRT port is not complete yet. The dummy backend still very much used by the WinRT backend. For now we leave the dummy warning in. Change-Id: Ifc7e4973000d4279c87294e00d685063e5c8b4fe Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| * | | | | | Merge branch 'dev' into btleAlex Blasche2016-05-13171-3326/+11712
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I073f6c45696fe28b83335fb65cca6270c458851d
| * | | | | | | winphone: Added bluetooth device discoveryOliver Wolff2015-09-224-1/+376
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I1086ffb05b7a632a9329822c150169a3482c6655 Reviewed-by: Samuel Nevala <samuel.nevala@intopalo.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| * | | | | | | Merge remote-tracking branch 'gerrit/dev' into btleAlex Blasche2015-09-0411-87/+136
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I4ddf6c4299a533abbbe638f66b7d792d1cc74d58
| | * \ \ \ \ \ \ Merge remote-tracking branch 'origin/5.5' into devFrederik Gladhorn2015-08-092-3/+4
| | |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: If4411ac45ddf612ddfa450a7f62cbce66172ccfd
| * | \ \ \ \ \ \ \ Merge branch 'dev' into btleAlex Blasche2015-07-0655-3220/+217
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I89a78d5c781a69ab225990744202b84c9717a7e6
| * \ \ \ \ \ \ \ \ \ Merge remote-tracking branch 'gerrit/dev' into btleAlex Blasche2015-06-01198-2741/+8010
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/bluetooth/osx/osxbtdeviceinquiry.mm src/bluetooth/qbluetoothdevicediscoveryagent_osx.mm Change-Id: Iaba26c6affe194eafbb666c7474b566d4980298b
| * | | | | | | | | | | Bluetooth - device discovery agent (cleanup)Timur Pocheptsov2014-11-072-50/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not duplicate messages, improve the text. Change-Id: I1dd81114b6667636f8d62e4211dc2bb4a078caeb Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* | | | | | | | | | | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-025-15/+56
|\ \ \ \ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|_|_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I72d250d21eeed0e7ba30d6c64ef88a797e94a35b
| * | | | | | | | | | | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-013-2/+12
| |\ \ \ \ \ \ \ \ \ \ \ | | | |_|_|_|_|_|_|_|_|/ | | |/| | | | | | | | | | | | | | | | | | | | | Change-Id: I64352b6cc066255972874e2f9c28abff35f0d613