Skip to content
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

Epson TM-T88II printing garbage #475

Open
1 task done
pinpox opened this issue Feb 15, 2022 · 1 comment
Open
1 task done

Epson TM-T88II printing garbage #475

pinpox opened this issue Feb 15, 2022 · 1 comment

Comments

@pinpox
Copy link

pinpox commented Feb 15, 2022

I have:

  • searched open and closed issues for duplicates

Bug description

I'm having trouble getting my Epson TM-T88 to print anything. The printer is connected via a USB to serial adapter and recognized as /dev/ttyUSB0 on my system. Holding the Feed button while turning the printer on prints the connection model on this information (9600 bps, 8 bits data, parity none, stop bit: 1 or more, handshaking: dtr/dsr)

I have used this information to confirm the correct connection parameters (see example code below). When trying to print anything either nothing happens or garbage is printed (random unicode characters). Running the script multiple times sometimes produces nothing (not printing at all) then garbage.

I have tried various adapters and ports to rule out the cable is broken, all do the same.

This comment suggests a similar issue, but I have not been able to solve it:#301 (comment)

I tried sudo stty -F /dev/ttyUSB0 9600 cs8 -cstopb -parenb and echo "Hello World" >> /dev/ttyUSB0. This results in one line of garbage being printed.

Steps to reproduce

  • connect printer via USB adapter
  • run code below using sudo python print.py
from escpos import *

p = printer.Serial(devfile='/dev/ttyUSB0',
           baudrate=9600,
           bytesize=8,
           parity='N',
           stopbits=1,
           timeout=1.0

p.text("Hello World\n")
p.text("Hello World\n")
p.cut()

Device info

Printer: EPSON TM-T88II

python-escpos version: 2.2.0

python version: 3.9.9

operating system: Linux

@kedare
Copy link
Contributor

kedare commented Jul 4, 2022

I don't know with printers (I don't use them with serial) but in general (for serial terminals) it's recommended to disable handshaking (you would have to go to your printer settings to disable it on its side too), misconfiguring it produce exactly what you way (garbage on the screen instead of the proper text

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants