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

Can't scan out BLE devices on Galaxy S10(Android 10)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3: Somewhat important
    • Resolution: Done
    • Affects Version/s: 5.12.0
    • Fix Version/s: None
    • Labels:
      None
    • Platform/s:
      Android

      Description

      Qt version: Qt5.12.0
      Mobile Phone1[Honor V20, Android10.0], Mobile Phone2[Galaxy S10, Android10.0]

      On Honor V20, I can scan out the ble devices by using:
      discoveryAgent->start(QBluetoothDeviceDiscoveryAgent::LowEnergyMethod);
      [log]:
      libdoton.so: qt.bluetooth.android: ACCESS_COARSE|FINE_LOCATION permission available
      D BluetoothLeScanner: onScannerRegistered() - status=0 scannerId=8 mScannerId=0
      libdoton.so: @@@<DBG> slotBltState 96: state: 2 --> Start scan
      libdoton.so: @@@<DBG> bltDevDiscover 113: Last device added: HB5910319983
      libdoton.so: @@@<DBG> bltDevDiscover 118: Ignore device: HB5910319983
      libdoton.so: @@@<DBG> bltDevDiscover 113: Last device added: DT_NB_ 20020001 --> My Device
      ...
      libdoton.so: BLT: scan finished

      But I can't scan out anything on S10(the software was same as on Honor V20).
      When the S10 using Android9.0, I found: QBluetoothDeviceDiscoveryAgent::LowEnergyMethod can't give any scan results,
      but discoveryAgent->start() can scan out my ble devices.
      But after I upgrade my S10 to Android10, even method discoveryAgent->start(); can't scan out anything either.
      [The log by using LowEnergyMethod]:
      libdoton.so: qt.bluetooth.android: ACCESS_COARSE|FINE_LOCATION permission available
      D BluetoothAdapter: startLeScan(): null
      D BluetoothAdapter: STATE_ON
      I chatty : uid=10402(org.qtproject.example.doton) qtMainLoopThrea identical 1 line
      D BluetoothAdapter: STATE_ON
      D BluetoothAdapter: BLE support array set: 111111
      D BluetoothLeScanner: Start Scan with callback
      D BluetoothLeScanner: onScannerRegistered() - status=0 scannerId=9 mScannerId=0
      libdoton.so: @@@<DBG> slotBltState 96: state: 2
      D BluetoothAdapter: stopLeScan()
      D BluetoothAdapter: STATE_ON
      D BluetoothAdapter: STATE_ON
      D BluetoothLeScanner: Stop Scan with callback
      --> no devices...
      libdoton.so: BLT: scan finished
      libdoton.so: @@@<DBG> slotBltState 96: state: 3

      [The log without using LowEnergyMethod]:
      libdoton.so: qt.bluetooth.android: ACCESS_COARSE|FINE_LOCATION permission available
      D BluetoothAdapter: startDiscovery
      libdoton.so: @@@<DBG> slotBltState 96: state: 2 --> Start scan
      --> No log from here
      I am confused by this issue. Could anybody give me help?
      Thanks.

        Attachments

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

          Activity

            People

            Assignee:
            ablasche Alex Blasche
            Reporter:
            zslzxm1314 song zhang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes