Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-62877

Qt Bluetooth Changes in Qt 6

    XMLWordPrintable

    Details

    • Type: Epic
    • Status: In Progress
    • Priority: P1: Critical
    • Resolution: Unresolved
    • Affects Version/s: 6.0
    • Fix Version/s: 6.2
    • Labels:
      None
    • Epic Name:
      Qt Bluetooth Changes in Qt 6

      Description

      The following changes should be considered as part of the Qt 6 release.

      • Remove qbluetoothglobal.h (deprecated by https://codereview.qt-project.org/#/c/203657/3)
      • Review QLowEnergyController state machine - Reading all descriptors and characteristic as part of the service discovery is very inefficient. Especially when the user already knows the exact service & char uuids he desires to interact with). The API should be changed such that QLowEnergyController discoverDetails() is no longer necessary.
      • Add convenience function to enable/disable notifications per char and not having to know the details on how to write the ClientCharacteristicConfiguration descriptor
      • Drop BlueZ 4 support
      • Remove Custom GATT stack (pre BlueZ 5.42 releases require it due to missing GATT DBus API)
        • needs evaluation closer to Qt 6 release date (how long ago was 5.42 release?!?)
      • Investigate whether minimal Android version can be raised. This permits dropping of lots of reflection code which ensures that older Android version continue to work.
        • Qt 5.13 increased to API v21 -> LE Scan API updated - see QTBUG-67482
        • More reflection calls in the backend -> needs verification
        • Can be done after Qt 6
      • Various API cleanups (see various TODO items in headers), e.g.:
        • Remove QLEController remoteAddressType property (only required on Linux for Custom Gatt stack)
        • Remove QBluetoothDeviceDiscovery::inquiryType and all related functions and enums
        • Cleanup the confusing notion when QBluetoothDeviceDiscovery::deviceDiscovered() and deviceUpdated() are emitted (see https://codereview.qt-project.org/c/qt/qtconnectivity/+/262375)
      • Drop legacy QLEC on WinRT
        • this implementation remains even if WinRT as platform is dropped from Qt 6 (there is no adequate win32 APi)
        • two implementations on WinRT currently used (with differing Win10 API requirements)
        • => compare the implementation, state minimal requirements (Anniversary vs Creators update)
        • final decision based on wider Qt decision for minimal Win10 API
      • Test behavior of platforms in case of same service uuid twice per peripheral or same char uuid twice per service
        • small peripheral test app
        • test across platforms
        • if concluded decide on course of action for API
      • Rename/deprecate QLEService:: DiscoveringServices -> QLEService:: DiscoveringService
      • Remove concept of handle ID from QLECharacteristic & QLEDescriptor -> deprecation required
      • Remove/deprecate the various error() signals
        • current system requires extensive use of qOverload (getter and signal have same name)
        • add replacement (errorOccurred or sth similar) to QLEController, QLEService, QBluetoothServer etc
      • Plugin system for Bluetooth Stack
      • A few iOS/macOS implementations have their own public class implementations (e.g. QLowEnergyService)
        • Removes duplicated code
        • Likely due to Objective C specifics -> needs investigation
      • QBluetoothDiscoveryAgent uses a very complicated start/stop/cancel logic which shall be removed (behavior change)
        • Replaced by simple isActive() logic which blocks start() while previous stop() is still pending
        • Unit test needs adoption
      • Review consistent use of Q_DECLARE_PRIVATE/Q_DECLARE_PUBLIC and QObjectPrivate inheritance
      • Improve interaction between QBluetoothServer and QBluetoothServiceInfo
        • QBluetoothServiceInfo becomes a true value type
        • Move SDP registration part of QBluetoothServiceInfo to QBluetoothServer
          • isRegistered() -> isListening()
          • (un)registerService() -> becomes part of listen()/close() in server class
          • removes need for fakeServerPort workaround
          • QBluetoothServiceInfoPrivate becomes QObjectPrivate
          • add assignment/mutable operator to QBSI
      • QBluetoothServer::setSecurityFlags() (same in QBluetoothSocket)
        • investigate a better parameter type as current set is based on old Linux kernel version (which has been replaced)
      • QBluetoothSocket::Error & QBluetoothSocket::SocketState should loose the value coupling to QAbstractSocket (the class has no QAbstractSocket dependency
        https://codereview.qt-project.org/c/qt/qtconnectivity/+/337069
      • Remove QBluetoothTransferManager and friends from Qt
        There is no evidence of it being used, the number of bug reports is zero too
        https://codereview.qt-project.org/c/qt/qtconnectivity/+/335713/
      • Remove QML API (socket programming in QML is very very limited at best if not even impossible)
        https://codereview.qt-project.org/c/qt/qtconnectivity/+/335766
      • Remove pairing agent related API from QBluetoothLocalDevice. Bluez 4 had the only complete and working implementation. Android requires unobtainable permission sets and no other platform implements it.
        https://codereview.qt-project.org/c/qt/qtconnectivity/+/337005

        Attachments

          Issue Links

          1.
          Remove qbluetoothglobal.h Technical task Closed Alex Blasche

          0%

          Original Estimate - 1 day
          Remaining Estimate - 1 day
          2.
          Improve QLowEnergyController state machine Technical task Reported Alex Blasche

          0%

          Original Estimate - 12 weeks
          Remaining Estimate - 12 weeks
          3.
          Convenience API to enable/disable notifications/indications Technical task Reported Alex Blasche

          0%

          Original Estimate - 2 days
          Remaining Estimate - 2 days
          4.
          Remove Bluez4 support Technical task In Progress Alex Blasche

          0%

          Original Estimate - 2 weeks
          Remaining Estimate - 2 weeks
          5.
          Remove Custom GATT stack from QLEController on Linux Technical task Reported Alex Blasche

          0%

          Original Estimate - 4 days
          Remaining Estimate - 4 days
          6.
          Various API cleanups Technical task Reported Oliver Wolff

          0%

          Original Estimate - 4 weeks
          Remaining Estimate - 4 weeks
          7.
          Drop Legacy implementation of QLEController on WinRT (anniversary update) Technical task Reported Oliver Wolff

          0%

          Original Estimate - 3 days
          Remaining Estimate - 3 days
          8.
          Support for duplicated service/char uuid on same device/service Technical task Reported Alex Blasche

          0%

          Original Estimate - 2 weeks, 1 day
          Remaining Estimate - 2 weeks, 1 day
          9.
          Remove macOS/iOS specific implementations for public classes Technical task Closed Timur Pocheptsov

          0%

          Original Estimate - 2 weeks
          Remaining Estimate - 2 weeks
          10.
          Plugin system for QtBluetooth Technical task Reported Alex Blasche

          0%

          Original Estimate - 8 weeks
          Remaining Estimate - 8 weeks
          11.
          Simplify QBluetoothDeviceDiscoveryAgent start/stop logic Technical task Reported Alex Blasche

          0%

          Original Estimate - 1 week
          Remaining Estimate - 1 week
          12.
          Review/Fix QObject dptr/QObjectPrivate usage Technical task Reported Alex Blasche

          0%

          Original Estimate - 3 days
          Remaining Estimate - 3 days
          13.
          Simplify QBluetoothServer/QBluetoothServiceInfo interaction Technical task Reported Alex Blasche

          0%

          Original Estimate - 2 weeks, 2 days
          Remaining Estimate - 2 weeks, 2 days
          14.
          Remove QBluetoothTransfer* from QtBluetooth Technical task Closed Andreas Buhr

          0%

          Original Estimate - 1 day
          Remaining Estimate - 1 day
          15.
          Remove QtBluetooth QML API Technical task Closed Andreas Buhr

          0%

          Original Estimate - 1 day
          Remaining Estimate - 1 day
          16.
          Review Android API usage in light of Qt's Android minimal SDK version Technical task Reported Alex Blasche

          0%

          Original Estimate - 3 days
          Remaining Estimate - 3 days
          17.
          Build system cleanups Technical task Closed Alex Blasche  
          18.
          Adopt new bindable QProperty API in Qt Bluetooth Technical task Reported Alex Blasche  
          19.
          Port QAndroidJniObject/Environment to QJniObject/Environment Technical task Reported Alex Blasche  
          20.
          Cleanup QBluetoothLocalDevice API related to pairing agent activities Technical task In Progress Alex Blasche  
          For Gerrit Dashboard: QTBUG-62877
          # Subject Branch Project Status CR V

            Activity

              People

              Assignee:
              ablasche Alex Blasche
              Reporter:
              ablasche Alex Blasche
              PM Owner:
              Maurice Kalinowski Maurice Kalinowski
              RnD Owner:
              Alex Blasche Alex Blasche
              Votes:
              2 Vote for this issue
              Watchers:
              16 Start watching this issue

                Dates

                Created:
                Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - 37 weeks, 1 day
                  37w 1d
                  Remaining:
                  Remaining Estimate - 37 weeks, 1 day
                  37w 1d
                  Logged:
                  Time Spent - Not Specified
                  Not Specified

                    Gerrit Reviews

                    There is 1 open Gerrit change