-
-
Notifications
You must be signed in to change notification settings - Fork 351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connection Exception when printing #494
Comments
Same here, it onl prints after a few attempts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am using Xprinter model XP-P502A.
Whenever I attempt printing, I get the stacktrace below
java.io.IOException: read failed, socket might closed or timeout, read ret: -1 at android.bluetooth.BluetoothSocket.readAll(BluetoothSocket.java:776) at android.bluetooth.BluetoothSocket.readInt(BluetoothSocket.java:790) at android.bluetooth.BluetoothSocket.connect(BluetoothSocket.java:415) at com.dantsu.escposprinter.connection.bluetooth.BluetoothConnection.connect(BluetoothConnection.java:69) at com.dantsu.escposprinter.connection.bluetooth.BluetoothPrintersConnections.selectFirstPaired(BluetoothPrintersConnections.java:26) at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684) close() this: android.bluetooth.BluetoothSocket@d46d890, channel: -1, mSocketIS: android.net.LocalSocketImpl$SocketInputStream@c864589, mSocketOS: android.net.LocalSocketImpl$SocketOutputStream@f51898emSocket: android.net.LocalSocket@f7505af impl:android.net.LocalSocketImpl@e8edbc fd:java.io.FileDescriptor@704b145, mSocketState: INIT com.dantsu.escposprinter.exceptions.EscPosConnectionException: Unable to connect to bluetooth device. at com.dantsu.escposprinter.connection.bluetooth.BluetoothConnection.connect(BluetoothConnection.java:75) at com.dantsu.escposprinter.connection.bluetooth.BluetoothPrintersConnections.selectFirstPaired(BluetoothPrintersConnections.java:26)...
The text was updated successfully, but these errors were encountered: