In my application I'm using RxAndroidBLE library. Thanks for the awesome library. But I have some issues. I'm trying to connect to BLE device using
rxBleDevice.establishConnection(false)
Device is out of range. Timeout for connect operation is 30 seconds. At the same time I want to discover other devices using
rxBleClient.scanBleDevices(scanSettings)
But scan operation getting queued and will be performed after connect operation timeout (30 seconds). I can see this behavior in the logs:
08-01 17:25:59.978 : QUEUED ConnectOperation(155884145)
08-01 17:25:59.981 : STARTED ConnectOperation(155884145)
08-01 17:25:59.989 : Connecting without reflection
08-01 17:26:15.585 : QUEUED ScanOperationApi21(75017989)
08-01 17:26:18.353 : onConnectionStateChange newState=0 status=133
08-01 17:26:18.361 : Connection operations queue to be terminated (C3:27:5F:B2:60:C9)
08-01 17:26:18.363 : Terminated.
08-01 17:26:18.370 : FINISHED ConnectOperation(155884145) in 18385 ms
08-01 17:26:18.377 : STARTED ScanOperationApi21(75017989)
08-01 17:26:18.379 : Scan operation is requested to start.
08-01 17:26:18.381 : QUEUED DisconnectOperation(41108292)
08-01 17:26:18.398 : FINISHED ScanOperationApi21(75017989) in 26 ms
08-01 17:26:18.401 : STARTED DisconnectOperation(41108292)
08-01 17:26:18.410 : FINISHED DisconnectOperation(41108292) in 10 ms
Is this correct and expected behavior? And can I somehow start scan operation immediately without queueing?