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

Qt Bluetooth Changes in Qt 6

    Details

    • 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
        • Replace QList against QVector in public API
      • 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 QLEController:: DiscoveringServices -> QLEController:: 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
      • Remove QBluetoothTransferManager and friends from Qt
        • There is no evidence of it being used, the number of bug reports is zero too
      • Remove QML API (socket programming in QML is very very limited at best if not even impossible)

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              • Assignee:
                ablasche Alex Blasche
                Reporter:
                ablasche Alex Blasche
              • Votes:
                0 Vote for this issue
                Watchers:
                12 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 are no open Gerrit changes