3

I'm trying to get my receipt printer working on Debian Wheezy.

On being plugged into computer, my USB-serial Receipt Printer (epson tm-t88ii/ii compatible) tics question marks every few seconds, and does not respond to commands.

the output from the printer is:

˥ ?????????????????£???≡█

attempting to print to it by echo fails with error:

/dev/ttyUSB0: Permission denied

even as root.

attempting to open the cash drawer fails with error:

/dev/ttyUSB0: No such device

How do I get it to stop the tic and print?

cpendlebury
  • 91
  • 1
  • 7

1 Answers1

5

Here's how I got it working:

after sending:

# echo "test" > /dev/ttyUSB0

returns Permission denied,

# dmesg | tail 

returns:

[92780.658576] ftdi_sio 2-3:1.0: FTDI USB Serial Device converter detected
[92780.658624] usb 2-3: Detected FT232BM
[92780.658626] usb 2-3: Number of endpoints 2
[92780.658628] usb 2-3: Endpoint 1 MaxPacketSize 64
[92780.658630] usb 2-3: Endpoint 2 MaxPacketSize 64
[92780.658632] usb 2-3: Setting MaxPacketSize 64
[92780.664556] usb 2-3: FTDI USB Serial Device converter now attached to ttyUSB0
[92782.102904] usb 2-3: usbfs: interface 0 claimed by ftdi_sio while 'brltty' sets config #1
[92782.104874] ftdi_sio ttyUSB0: FTDI USB Serial Device converter now disconnected from ttyUSB0
[92782.104891] ftdi_sio 2-3:1.0: device disconnected

This indicates there is a conflict with package 'brltty', (braille device), which is installed by default.

# apt-get remove brltty

stops the tic

set baud with

# stty -F /dev/ttyUSB0 9600

try echo

$ echo "test" > /dev/ttyUSB0

it prints!

What about the cash drawer?

$ echo -e "\033\0160\0\031\372" >> /dev/ttyUSB0

it opens!

Problem solved. Unless you need a braille display as well.

cpendlebury
  • 91
  • 1
  • 7
  • I found that with the TM-T88II and a Profilic PL2303 one needs a stty setting of `38400 8N1`. Just leaving that here. – nemo Nov 30 '13 at 01:34
  • This was ver helpful, how did you get the code to open the drawer from the command line? I am looking to feed and cut the paper with this method. – Marco Zink Jan 29 '18 at 05:28