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

Android device (Android12 Go Edition) cannot reconnect to BLE peripheral device

    XMLWordPrintable

Details

    • Android
    • 13
    • cc337336f (dev), da88795e0 (6.6), 45675834c (6.5)
    • Foundation Sprint 90, Foundation Sprint 91

    Description

      Step to reproduce

      1. Several tries to connect / disconnect from Android device to peripheral BLE device.
      2. If the disconnection occurs during the establishing of a connection with the discovered service, reconnection will be unavailable thereafter.
        • I have attached the log file when problem occurs. ( ble.log )

      Cause of problem

      • I think QLowEnergyController is in an abnormal state and cannot be reconnected, because reconnection becomes possible after calling QLowEnergyController::createCentral() and initializing QLowEnergyController.

      Request

      • If the QLowEnergyController is in an abnormal state and cannot be reconnected, then I would like QLowEnergyController::error() to be called to return some error status.
        • When a reconnection problem occurs, a call to QLowEnergyController::error() returns a status of QLowEnergyController::NoError.
        • I want to call QLowEnergyController::error() to check QLowEnergyController's error status and initialize it with QLowEnergyController::createCentral() if necessary. (as follow)
      if (m_pController != nullptr) {
          if (m_pController->error() != QLowEnergyController::Error::NoError) {
             m_pController->disconnectFromDevice();
             delete m_pController;
              m_pController = nullptr;
                m_pController = QLowEnergyController::createCentral(m_currentDevice.getDevice());
          }
      } 

      Appendix

      • When a reconnection problem occurs, a call to QLowEnergyController::error() returns a status of QLowEnergyController::ConnectionError on Android 11 Go Edition ( Lenovo Tab M7 3rd Gen ). However, on Android12 Go Edition, QLowEnergyController::Error::NoError is returned.

      Attachments

        1. ble.log
          5 kB
        2. ble-1.log
          53 kB
        For Gerrit Dashboard: QTBUG-115370
        # Subject Branch Project Status CR V

        Activity

          People

            vuokko Juha Vuolle
            dfree Atsushi Nakanishi
            Vladimir Minenko Vladimir Minenko
            Alex Blasche Alex Blasche
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes