Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Signal QLowEnergyController::connected/disconnected is not emitted in Qt 6.7
Forum Updated to NodeBB v4.3 + New Features

Signal QLowEnergyController::connected/disconnected is not emitted in Qt 6.7

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 358 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    chitz
    wrote on last edited by
    #1

    I'm migrating an application implementing a BLE Peripheral device using QLowEnergyController from Qt 5.15 to Qt 6.7. The application runs on Linux with BlueZ 5.72.

    I observe that the signals QLowEnergyController::connected and QLowEnergyController::disconnected are not emitted on Qt 6.7.

    This is also reproducible in the BLE Peripheral example (https://code.qt.io/cgit/qt/qtconnectivity.git/tree/examples/bluetooth/heartrate-server/main.cpp?h=6.7). The "reconnect" lambda is never called. Interestingly, the advertisements restart anyway as soon as the client disconnects.

    Is this behavioral change intentional with the new BlueZ-DBus backend introduced in Qt 6.7?

    Pl45m4P 1 Reply Last reply
    0
    • C chitz

      I'm migrating an application implementing a BLE Peripheral device using QLowEnergyController from Qt 5.15 to Qt 6.7. The application runs on Linux with BlueZ 5.72.

      I observe that the signals QLowEnergyController::connected and QLowEnergyController::disconnected are not emitted on Qt 6.7.

      This is also reproducible in the BLE Peripheral example (https://code.qt.io/cgit/qt/qtconnectivity.git/tree/examples/bluetooth/heartrate-server/main.cpp?h=6.7). The "reconnect" lambda is never called. Interestingly, the advertisements restart anyway as soon as the client disconnects.

      Is this behavioral change intentional with the new BlueZ-DBus backend introduced in Qt 6.7?

      Pl45m4P Offline
      Pl45m4P Offline
      Pl45m4
      wrote on last edited by Pl45m4
      #2

      @chitz said in Signal QLowEnergyController::connected/disconnected is not emitted in Qt 6.7:

      Is this behavioral change intentional with the new BlueZ-DBus backend introduced in Qt 6.7?

      On Linux BlueZ DBus peripheral backend the remote is considered connected when it first reads/writes a characteristic or a descriptor.

      (From: https://doc.qt.io/qt-6/qlowenergycontroller.html#connected)

      Does this help? It's one of the differences between those two.


      If debugging is the process of removing software bugs, then programming must be the process of putting them in.

      ~E. W. Dijkstra

      C 1 Reply Last reply
      0
      • Pl45m4P Pl45m4

        @chitz said in Signal QLowEnergyController::connected/disconnected is not emitted in Qt 6.7:

        Is this behavioral change intentional with the new BlueZ-DBus backend introduced in Qt 6.7?

        On Linux BlueZ DBus peripheral backend the remote is considered connected when it first reads/writes a characteristic or a descriptor.

        (From: https://doc.qt.io/qt-6/qlowenergycontroller.html#connected)

        Does this help? It's one of the differences between those two.

        C Offline
        C Offline
        chitz
        wrote on last edited by
        #3

        @Pl45m4 said in Signal QLowEnergyController::connected/disconnected is not emitted in Qt 6.7:

        On Linux BlueZ DBus peripheral backend the remote is considered connected when it first reads/writes a characteristic or a descriptor.

        (From: https://doc.qt.io/qt-6/qlowenergycontroller.html#connected)

        Does this help? It's one of the differences between those two.

        Based on this I was expecting the connected() and disconnected() signals to be emitted. But they never are, regardless how many characteristics and/or descriptors I read.

        I was able to simulate the connected() signal through observing the stateChanged() signal instead. But once the state changes to ControllerState::ConnectedState it never goes back to ControllerState::UnconnectedState.

        Pl45m4P 1 Reply Last reply
        0
        • C chitz

          @Pl45m4 said in Signal QLowEnergyController::connected/disconnected is not emitted in Qt 6.7:

          On Linux BlueZ DBus peripheral backend the remote is considered connected when it first reads/writes a characteristic or a descriptor.

          (From: https://doc.qt.io/qt-6/qlowenergycontroller.html#connected)

          Does this help? It's one of the differences between those two.

          Based on this I was expecting the connected() and disconnected() signals to be emitted. But they never are, regardless how many characteristics and/or descriptors I read.

          I was able to simulate the connected() signal through observing the stateChanged() signal instead. But once the state changes to ControllerState::ConnectedState it never goes back to ControllerState::UnconnectedState.

          Pl45m4P Offline
          Pl45m4P Offline
          Pl45m4
          wrote on last edited by
          #4

          @chitz said in Signal QLowEnergyController::connected/disconnected is not emitted in Qt 6.7:

          But once the state changes to ControllerState::ConnectedState it never goes back to ControllerState::UnconnectedState.

          If you think it's a bug in Qt, you maybe want to file a bug report.
          Search the existing bugs first, in case there is already something similar and either provide an example to reproduce it or refer to the Qt example, if it is also not working as expected.


          If debugging is the process of removing software bugs, then programming must be the process of putting them in.

          ~E. W. Dijkstra

          1 Reply Last reply
          0
          • A Offline
            A Offline
            ajpat
            wrote last edited by
            #5

            I've encountered the same. But this time on iOS, whereby the stateChanged signal stays stuck in ConnectedState, even if the central device disconnects.

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved