nosoup4you718
Posts: 4
Joined: Sat Oct 13, 2012 2:52 am

Printing to Epson Thermal Reciept Printer

Sat Oct 13, 2012 2:57 am

Hi,

I'm trying to print directly from my raspberry pi to an epson tm-88iv thermal receipt printer through one of the USB ports.

I have Debian Linux installed and am running CUPS. The root of the issue appears to be that the supplied linux driver from Epson does not support ARM cores.

I was able to print to my HP Color Laserjet with no problems through CUPSs. I contacted Epson who suggested I check out the epson developers.

I have also tried Python ESCPOS which does not require a driver and have had issues.

I would be happy if I was able to just print raw text..

I've been losing my mind trying to figure this out, any help would be greatly

Pulling my hair out trying to print to an epson thermal printer directly from my raspberry pi.

broo0ose
Posts: 318
Joined: Wed Dec 14, 2011 3:59 pm
Location: Wirral, UK

Re: Printing to Epson Thermal Reciept Printer

Wed Oct 17, 2012 7:57 pm


kevinwall
Posts: 1
Joined: Wed Nov 21, 2012 8:13 pm

Re: Printing to Epson Thermal Reciept Printer

Wed Nov 21, 2012 8:18 pm

Hi,

Was there ever any progress on this issue - I roo have a RPI and an Epson TM-T20 which I would like to be able to get working. Epson seem to have completely dismissed ARM architecture compiled drivers so any other suggestions would be greatly appreciated.

Cheers.

Kevin

hrudolph
Posts: 3
Joined: Tue Dec 04, 2012 11:52 pm

Re: Printing to Epson Thermal Reciept Printer

Tue Dec 04, 2012 11:54 pm

I have also spent many hours trying to figure this out. If I could get any thermal printer similar to the tm-t88 series to print then that would do.

xfx
Posts: 24
Joined: Thu Dec 06, 2012 10:09 pm

Re: Printing to Epson Thermal Reciept Printer

Fri Dec 14, 2012 6:25 pm

Having the same issue here.
Has anyone tried the driver linked by broo0ose?

hrudolph
Posts: 3
Joined: Tue Dec 04, 2012 11:52 pm

Re: Printing to Epson Thermal Reciept Printer

Sat Dec 15, 2012 6:48 am

I have not tried it. Not really sure how...

xfx
Posts: 24
Joined: Thu Dec 06, 2012 10:09 pm

Re: Printing to Epson Thermal Reciept Printer

Sat Dec 15, 2012 4:16 pm

I was able to get Python ESCPOS to work.
Unfortunately, the printer I'm using (a brand-less Chinese $40.00 thermal printer) seems to be having issues "receiving" or "interpreting" ESC/POS commands.

I'll be running some more tests later next week and I'll post back...
I really need to get this working.

TheDozer
Posts: 1
Joined: Mon Dec 17, 2012 10:57 am

Re: Printing to Epson Thermal Reciept Printer

Mon Dec 17, 2012 11:07 am

I post following question to EPSON because i have an TM-T20 i would like to get running :)
---------------------------------------------------------------------------------------------------
I´m looking for ARM / Linux drivers for Epson TM-T20
The Linux driver you supply for the Epson TM-T20 works like a charm
on x86 Linux but when you come to ARM there is no option.

The ARM platform "Raspberry PI" ruing a "Debian based" Linux
has caught many developers eyes due to it´s low price, high performance and simplicity
but printing from this device is limited due to lacking support of compatible drivers for ARM architecture.

So my question is can ESPON compile drivers for ARM support or is it possible for you to put the source needed for this in your Linux driver package?
found at..
http://download.epson-biz.com/modules/p ... =32&pid=37
---------------------------------------------------------------------------------------------------

I got following response with links
Hmm Have i got this wrong does this not need ARM drivers? or will the driver work as long it is for Linux?
Maybe this will help somebody.

---------------------------------------------------------------------------------------------------
Thank you for contacting Epson Support.

There are quite a number of options for Unix/Linux. This is outside of the many commercial Postscript software options available.

Epson has always been supportive of the Linux community:
http://www.epsondevelopers.com/home/linux_printers

GIMP Print would be the most popular solution:
http://gimp-print.sourceforge.net/

An excellent source of information is at:
http://www.linuxfoundation.org/collabor ... enprinting

Other info:
http://www.ghostscript.com/
http://www.cups.org/
http://www2.mandriva.com/

If you require further assistance regarding this issue please click on the link at the top of this page to access your question from our support site.


Regards

Epson Customer Support

hrudolph
Posts: 3
Joined: Tue Dec 04, 2012 11:52 pm

Re: Printing to Epson Thermal Reciept Printer

Sat Feb 23, 2013 2:34 pm

Any luck making this work?


User avatar
silverfox0786
Posts: 215
Joined: Mon Feb 04, 2013 10:32 pm
Location: Slough, UK
Contact: Website

Re: Printing to Epson Thermal Reciept Printer

Wed Feb 27, 2013 1:29 am

i see people trying to reuse their old thermals to save expense

but adafuit now sells a GPIO thermal printer that would work much easier

http://www.adafruit.com/products/597

http://www.adafruit.com/products/600

manpaz
Posts: 4
Joined: Mon Mar 11, 2013 7:23 am

Re: Printing to Epson Thermal Reciept Printer

Mon Mar 11, 2013 7:30 am

Hello everyone,

I'd like to share some heads up as I made some progress with python-escpos on Raspberry PI. I'm the current maintainer and I'll appreciate any feedback, bugs, improvements all of you might have.

http://code.google.com/p/python-escpos/

Hope this piece of code can help someone in the community.

Thank you all.

xavierhb
Posts: 2
Joined: Tue Apr 09, 2013 1:33 pm

Re: Printing to Epson Thermal Reciept Printer

Thu Apr 11, 2013 11:03 am

Hello manpaz,

I followed your instructions to print with an Espon TM-T20 with python-escpos but I am gettint this error when I run this test:

Code: Select all

from escpos import *
Epson = printer.Usb(0x04b8,0x0202)
Epson.text('Hello World')
Epson.cut()
from: can't read /var/mail/escpos
./test.py: línea 2: error sintáctico cerca del elemento inesperado `('
./test.py: línea 2: `Epson = printer.Usb(0x04b8,0x0202)'

manpaz
Posts: 4
Joined: Mon Mar 11, 2013 7:23 am

Re: Printing to Epson Thermal Reciept Printer

Thu Apr 11, 2013 5:14 pm

Hi xabierhb,

Do you mind to open a ticket on python-escpos project page please?
Also describe as much as you can about your environment,
OS, distro, python, python-imaging, pyserial, pyusb, etc.

Thank you,

fashionxu
Posts: 3
Joined: Thu May 23, 2013 8:18 am

Re: Printing to Epson Thermal Reciept Printer

Thu May 30, 2013 8:18 am

Hi manpaz,
I followed your instructions to print with python-escpos but I am gettint this error when I run this test:

Code: Select all

from escpos import *


Epson = printer.Usb(0x04b8,0x0202)
Epson.text("Hello World")

Epson.barcode
Epson.barcode('1324354657687','EAN13',64,2,'','')
Epson.cut()
The error is:
AttributeError: 'NoneType' object has no attribute 'is_kernel_driver_active'

Thank you!

fashionxu
Posts: 3
Joined: Thu May 23, 2013 8:18 am

Re: Printing to Epson Thermal Reciept Printer

Fri May 31, 2013 2:06 am

fashionxu wrote:Hi manpaz,
I followed your instructions to print with python-escpos but I am gettint this error when I run this test:

Code: Select all

from escpos import *


Epson = printer.Usb(0x04b8,0x0202)
Epson.text("Hello World")

Epson.barcode
Epson.barcode('1324354657687','EAN13',64,2,'','')
Epson.cut()
The error is:
AttributeError: 'NoneType' object has no attribute 'is_kernel_driver_active'

Thank you!
I have corrected the error. I wrote the wrong "Vendor ID" and "Product ID".
Another question, how can I print the Chinese character by using this method?
Thank you.

manpaz
Posts: 4
Joined: Mon Mar 11, 2013 7:23 am

Re: Printing to Epson Thermal Reciept Printer

Fri May 31, 2013 3:20 pm

Good to hear it is working now.
About the character encoding, I have no idea how to deal with, but feel free to place a ticket at escpos project page on google code and I'll try to do my best this weekend in order to help you in this matter.

Thank you!

fashionxu
Posts: 3
Joined: Thu May 23, 2013 8:18 am

Re: Printing to Epson Thermal Reciept Printer

Thu Jun 06, 2013 2:32 pm

The chinese characters are shown correctly. I used the wrong encoding before. Thanks a lot.

manpaz
Posts: 4
Joined: Mon Mar 11, 2013 7:23 am

Re: Printing to Epson Thermal Reciept Printer

Thu Jun 06, 2013 6:36 pm

Awsome! I'm glad it works well for you :)

tweakboy
Posts: 1
Joined: Sun Jun 09, 2013 6:53 pm

Re: Printing to Epson Thermal Reciept Printer

Sun Jun 09, 2013 6:55 pm

@fashionxu

I'm also interested in printing chinese character using the python escpos library. How did you managed to do this?

Could you share some code on this?

ThomasMoser
Posts: 2
Joined: Wed Jul 10, 2013 10:07 am

Re: Printing to Epson Thermal Reciept Printer

Wed Jul 10, 2013 11:00 am

Hey guys,

I'm new here and I'm, like you, experimenting with a raspberry pi and a
thermal usb printer, the TM-T20 produced by Epson.

I did the installation, and everything went fine till... the test

I wanted to print the following:

Code: Select all

from escpos import *

Epson = printer.Usb(0x04b8,0x0e03)

Epson.control('LF')
Epson.control('LF')
Epson.control('LF')
Epson.control('LF')
Epson.text('Hello World')
Epson.control('LF')
Epson.control('LF')
Epson.control('LF')
Epson.control('LF')

Epson.cut()
It prints the linefeeds but doesn't do the text.
Could it be that the escape sequences of the TM88 are different to the ones of the T20?
I worked quite long for that because I was
experimenting and failing with the cups variant before.

I hope you can help me, thank you,
Thomas

ThomasMoser
Posts: 2
Joined: Wed Jul 10, 2013 10:07 am

Re: Printing to Epson Thermal Reciept Printer

Thu Jul 11, 2013 8:41 am

Ok, i got it!

My teacher told me to install python-unidecode and it now works!

Wessix
Posts: 18
Joined: Wed Jul 11, 2012 9:12 am

Re: Printing to Epson Thermal Reciept Printer

Thu Aug 15, 2013 5:59 pm

Hi i use a USb to Serial adapter,
and a epson TM T88II
lsusb shows:

Code: Select all

Bus 001 Device 006: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
the both other commands bring:

Code: Select all

0

Code: Select all

 0x02
how should i modify the python file?

i get always:

TypeError: this constructor takes no arguments


thx in advance

Wessix
Posts: 18
Joined: Wed Jul 11, 2012 9:12 am

Re: Printing to Epson Thermal Reciept Printer

Thu Aug 15, 2013 7:54 pm

ok i got further with this setup;

Code: Select all

from escpos import *

""" Seiko Epson Corp. Receipt Printer M129 Definitions (EPSON TM-T88IV) """
Epson = printer.Usb( 0x067b,0x2303,0,0x81,0x02)
Epson.text("Hello World")
Epson.text("Hello World")
Epson.text("Hello World")
Epson.text("Hello World")
Epson.text("Hello World")
Epson.text("Hello World")

#Epson.image("logo.gif")
#Epson.fullimage("a.really.large.image.png")
Epson.barcode
Epson.barcode('1324354657687','EAN13',64,2,'','')
Epson.cut()
now i get an :
File "drucktest3.py", line 6, in <module>
Epson.text("Hello World")
File "/usr/local/lib/python2.7/dist-packages/escpos/escpos.py", line 159, in text
self._raw(txt)
File "/usr/local/lib/python2.7/dist-packages/escpos/printer.py", line 58, in _raw
self.device.write(self.out_ep, msg, self.interface)
File "/usr/local/lib/python2.7/dist-packages/usb/core.py", line 626, in write
self.__get_timeout(timeout)
File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 532, in bulk_write
timeout)
File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 631, in __write
_check(retval)
File "/usr/local/lib/python2.7/dist-packages/usb/backend/libusb1.py", line 403, in _check
raise USBError(_str_error[ret], ret, _libusb_errno[ret])
usb.core.USBError: [Errno 110] Operation timed out
Error. the printer made one little sound. just to let my hope not die probably :(

Wessix
Posts: 18
Joined: Wed Jul 11, 2012 9:12 am

Re: Printing to Epson Thermal Reciept Printer

Thu Aug 15, 2013 8:17 pm

ok i finally got it, and the printer cuts that paper!! yes. Thank you so much for that programm!.

i had to use serial although it goes over the usb adabter, heres my config:

Code: Select all

""" Seiko Epson Corp. Receipt Printer M129 Definitions (EPSON TM-T88II) over US$
#Epson = printer.Serial( 0x067b,0x2303,0,0x81,0x02)
Epson = printer.Serial("/dev/ttyUSB0",9600,8,2)  #thats the dev the adapter gets regognized
Epson.text("Hello World")

Return to “General discussion”