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

Qt Bluetooth Changes in Qt 6

    XMLWordPrintable

Details

    • Epic
    • Resolution: Done
    • P1: Critical
    • 6.2.0
    • 6.0
    • None
    • 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 https://bugreports.qt.io/browse/QTBUG-75342
      • Remove Custom GATT stack (pre BlueZ 5.42 releases require it due to missing GATT DBus API)
        • will not be done as its a good debug system and provides the BTLE peripheral functionality on Linux
      • 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
      • 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

          There are no Sub-Tasks for this issue.
          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              ablasche Alex Blasche
              ablasche Alex Blasche
              Vladimir Minenko Vladimir Minenko
              Alex Blasche Alex Blasche
              Votes:
              2 Vote for this issue
              Watchers:
              18 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 29 weeks
                  29w
                  Remaining:
                  Remaining Estimate - 29 weeks
                  29w
                  Logged:
                  Time Spent - Not Specified
                  Not Specified

                  Gerrit Reviews

                    There are no open Gerrit changes