Android Question Star-Dust BT Printer library - How to get printer responses

abilio486software

Active Member
Licensed User

How to check if the printer does not have paper or its door is open?
Do we have any event to receive answers from printer, according with the ESC/POS commands we sent to printer?
 

agraham

Expert
Licensed User
Longtime User
Theoretically my Bluetooth printer class can receive responses from the printer, but I haven't actually tried it.
It's a BA class module that uses the Serial library and AsyncStreams so you can tweak it if you need to.
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
Hi, in the various documentations it does not appear that a printer sends back any error messages or communication.

If you find one let me know
 
Upvote 0

abilio486software

Active Member
Licensed User
Hi,

With "DLE EOT n", we can obtain the printer status, knowing if the door is open or if it is out of paper.

I think you only need to triger an even to us with bytes returned by the printer.
 

Attachments

  • Epson TM-T20 ESC-POS Quick Reference Guide .pdf
    254.6 KB · Views: 1,968
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
Hi,

With "DLE EOT n", we can obtain the printer status, knowing if the door is open or if it is out of paper.

I think you only need to triger an even to us with bytes returned by the printer.
We must also see how it responds. We will have to do some tests.
 
Upvote 0

abilio486software

Active Member
Licensed User
If you could trigger NewData bytes would be wonderful

serial response:
Sub AStream_NewData (Buffer() As Byte)
    
    Log("len:" & Buffer.Length)
    If  Buffer.Length>0 Then
        printer_answer_byte1    = Buffer(0)
    End If
    
End Sub
 
Upvote 0

Star-Dust

Expert
Licensed User
Longtime User
If you could trigger NewData bytes would be wonderful

serial response:
Sub AStream_NewData (Buffer() As Byte)
   
    Log("len:" & Buffer.Length)
    If  Buffer.Length>0 Then
        printer_answer_byte1    = Buffer(0)
    End If
   
End Sub
In the current version, what arrives from the printer is sent in the LOGs.
So try to see what it returns in the logs and let me know
 
Upvote 0
Top