[QT BLE]: Can't scan out the BLE devices on Galaxy S10.
-
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]:
W libdoton.so: qt.bluetooth.android: ACCESS_COARSE|FINE_LOCATION permission available
D BluetoothLeScanner: onScannerRegistered() - status=0 scannerId=8 mScannerId=0
D libdoton.so: @@@<DBG> slotBltState 96: state: 2 --> Start scan
D libdoton.so: @@@<DBG> bltDevDiscover 113: Last device added: HB5910319983
D libdoton.so: @@@<DBG> bltDevDiscover 118: Ignore device: HB5910319983
D libdoton.so: @@@<DBG> bltDevDiscover 113: Last device added: DT_NB_ 20020001 --> My Device
...
D libdoton.so: BLT: scan finishedBut 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]:
W 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
D 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...
D libdoton.so: BLT: scan finished
D libdoton.so: @@@<DBG> slotBltState 96: state: 3[The log without using LowEnergyMethod]:
W libdoton.so: qt.bluetooth.android: ACCESS_COARSE|FINE_LOCATION permission available
D BluetoothAdapter: startDiscovery
D 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.