CesarBalzer / Cordova-Plugin-BTPrinter

A cordova plugin for bluetooth printer for android platform
Apache License 2.0
81 stars 64 forks source link

read failed, socket might closed or timeout, read ret: -1 #16

Open shameemtbitech opened 5 years ago

shameemtbitech commented 5 years ago

I m using this Cordova-Plugin-BTPrinter and first time it's connected but after sometime it's automatically disconnected and showing this error read failed, socket might closed or timeout, read ret: -1 anybody please help me

NicolaasZA commented 4 years ago

I encountered this error in the following situations:

Seems like this is the generic error given when the socket/streams are not ready to use. It's not a very specific error...

silo commented 4 years ago

@shameemtbitech did u solve it? For me i can print every second time else i get the same error read failed, socket might closed or timeout, read ret: -1

i run BTPrinter.connect( , and inside i run BTPrinter.printBase64( to print

silo commented 4 years ago

I actually solved it. I had to run BTPrinter.disconnect every time i print

danicarla commented 1 year ago

There's a way to change this error message? Some users don't quite understand what is happening...