summaryrefslogtreecommitdiffstats
path: root/src/bluetooth/qleadvertiser_bluez.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Replace foreach with for loop and set QT_NO_FOREACHOliver Wolff2018-08-151-2/+5
| | | | | | | | To avoid unnecessary copies, const is used wherever possible. Change-Id: Ic743716512751cfd24fad5bd37c244b115dd26fe Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add separate interfaces for QBluetoothSocketPrivate on LinuxAlex Blasche2018-07-251-1/+1
| | | | | | | | | | | | | | | | Uses the new QBluetoothSocketBasePrivate interface to separate the Linux implementations from other platforms. On Linux, there will be the existing raw socket implementation and a BlueZ5 DBus implementation. The DBus implementation is required for very recent Bluez5 deployments (v5.4x+) which restrict access to traditional SDP discovery means like sdptool. For now the DBus implementation is non-existing/dysfunctional. Task-number: QTBUG-68550 Change-Id: Idd248ecdb2a443a95cde521ced929218d40df3fe Reviewed-by: Lubomir I. Ivanov <neolit123@gmail.com> Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* BlueZ: Ensure stop advertisement calls are actually sent when issuedAlex Blasche2017-05-151-0/+1
| | | | | | | The command queue was not flushed out to the HCI socket. Change-Id: Ic249fc6d7c93c8ca1026ec010f667b7e155d9c46 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix readvertisement failure on peripheral restart on BlueZAlex Blasche2017-05-151-9/+7
| | | | | | | | | | | | | | When the QLowEnergyController disconnects and immediately restarts the re-advertisement, it fails when sending the OcfLeSetAdvEnable ocf command. Subsequenly an advertisement error is thrown which stops the QLowEnergyCOntroller instance itself. Starting with this patch we choose to ignore failures when trying to disable advertisement. The API cannot report the error back anyway. Task-number: QTBUG-58941 Change-Id: Ifd6b43193c41e6cdc22d4876441bcdcbcc2ca7b6 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Fix endianness conversion order bug when handling 128bit Qt UuidAlex Blasche2016-05-181-1/+7
| | | | | | | | | | QBluetoothUuid.toUInt128() always returns big endian notation. We have to convert it to host order before we convert to Bluetooth order. Task-number: QTBUG-53421 Change-Id: Ibab4f06fa70739adb163523c803a203608454427 Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Zero out the advertising parameters data before setting the fields.Christian Kandeler2016-05-181-0/+2
| | | | | | | | | While I did not find anything in the spec that requires unused fields to be zero, some controllers seem to require that. Task-number: QTBUG-53224 Change-Id: I5ab05a6689f2632a1d60ee0f259cbdd792467729 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* BLE: Write the whole 31 bytes of advertising data to the controller.v5.7.0-alpha1Christian Kandeler2016-03-041-1/+3
| | | | | | | | | | | The specification says: "Only the significant part of the Advertising Data is transmitted in the advertising packets". This seems to refer to the data that is actually sent by the hardware and not to the data used in the HCI command, as our original implementation assumed. At least there seem to be controllers who won't accept such "short" packets. Change-Id: I732cfc1e05fc135fd336d832e725d969c98b60cf Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Bluetooth Advertising: Inform clients we want an LE connection.Christian Kandeler2016-02-231-0/+1
| | | | | | | | | | When given the choice, devices will try to establish the GATT connection over BR/EDR, which we don't offer. It also makes little sense, considering we advertise over an LE mechanism only. This patch makes connections from e.g. Android and iPhone work. Change-Id: I7a224ab20a50c1c6ead698ea864b1ec13bca3851 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Bluetooth LE: Fix typo in advertising code.Christian Kandeler2016-02-171-1/+1
| | | | | Change-Id: Ia8a0287e2e963e1a6353de4eb2aaa165549d6a8b Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Update to new Qt license headersneardAlex Blasche2016-01-261-15/+21
| | | | | Change-Id: I2c799dbac99c66d5e87fd92efc215e121064cfde Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
* Bluetooth LE: Fix check for space left in advertising data.Christian Kandeler2016-01-221-1/+1
| | | | | | | The value we compare against can be smaller than zero. Change-Id: Iea67ea3439d966ff24f93e63870a3b487f4c4644 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Bluetooth LE Advertiser: Add missing endianness conversion.Christian Kandeler2016-01-181-2/+2
| | | | | Change-Id: Ie10a247eddf298cb09edc53c75d414d3b0891a96 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Bluetooth: Introduce API for LE advertising.Christian Kandeler2015-11-171-0/+443
And provide an implementation for BlueZ. Change-Id: I302aee7c43b77016d9e1e7a0d5bcbf00096abf76 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>