tinyb
tinyb copied to clipboard
How to deal with device connect time out
Hellow everyone
when
bluetoothDevice.connect(),There is a exception as follows:
tinyb.BluetoothException: Timeout limit
at tinyb.BluetoothDevice.connect(Native Method)
at com.cnlod.bbtmonitor.scanner.ble.BleManager.connect(BleManager.java:116)
at com.cnlod.bbtmonitor.scanner.ble.BleManager.connectDevice(BleManager.java:105)
at com.cnlod.bbtmonitor.scanner.ble.AsyncBluetooth.readBleData(AsyncBluetooth.java:33)
at com.cnlod.bbtmonitor.scanner.service.impl.BleCoreServiceImpl.processDataRecord(BleCoreServiceImpl.java:171)
at com.cnlod.bbtmonitor.scanner.service.impl.BleCoreServiceImpl.deviceInit(BleCoreServiceImpl.java:145)
at com.cnlod.bbtmonitor.scanner.service.impl.BleCoreServiceImpl.lambda$startScanner$0(BleCoreServiceImpl.java:104)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
when reconnet
tinyb.BluetoothException: GDBus.Error:org.bluez.Error.Failed: Operation already in progress
at tinyb.BluetoothDevice.connect(Native Method)
at com.cnlod.bbtmonitor.scanner.ble.BleManager.connect(BleManager.java:116)
at com.cnlod.bbtmonitor.scanner.ble.BleManager.connectDevice(BleManager.java:105)
at com.cnlod.bbtmonitor.scanner.ble.AsyncBluetooth.scannerBleData(AsyncBluetooth.java:104)
at com.cnlod.bbtmonitor.scanner.service.impl.BleCoreServiceImpl.scannerBleData(BleCoreServiceImpl.java:191)
at com.cnlod.bbtmonitor.scanner.service.impl.BleCoreServiceImpl.processDataRecord(BleCoreServiceImpl.java:175)
at com.cnlod.bbtmonitor.scanner.service.impl.BleCoreServiceImpl.deviceInit(BleCoreServiceImpl.java:145)
at com.cnlod.bbtmonitor.scanner.service.impl.BleCoreServiceImpl.lambda$startScanner$0(BleCoreServiceImpl.java:104)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
when device connect time out, How should we deal with it?
Hello @andy-huaan, were you able to find the solution?