Opening cash drawer by Epson receipt printer

1,867 views
Skip to first unread message

Marco Premoselli

unread,
Feb 1, 2015, 1:33:21 AM2/1/15
to inc...@googlegroups.com
I can successfully print receipt using my Epson TM-T82II printer I recently purchased (had trouble finding any of the supported brands in Australia).
I can open the cash drawer by issuing the following Linux command in terminal window:
echo -e -n "\x1b\x70\x00\x19\xfa" | lpr -o raw -P EPSON-TM-T82II-3
(EPSON-TM-T82II-3 is the exact name as listed by the command: lpstat -p).
The escape sequence is used above is:
ASCII:    ESC + p + 0 + 25 + 250
Decimal: Chr(27) + Chr(112) + Chr(0) + Chr(25) + Chr(250)
Hex:    Chr(&H1B) + Chr(&H70) + Chr(&H0) + Chr$(&H19) + Chr$(&HFA)
Octal:    <033><160><000><031><372>
I would appreciate if anyone could provide any information how to set up incoPOS to open the cash drawer.  For example, is it possible to send the above escape codes by 'embedding' them in the Cash Receipt document template so that they are issued to the printer (the last 5 lines print the 'Source itself').
Operating System: Ubuntu 12.04 / 14.04 /14.10
incoPOS version: 1.14.12.18 (database version: 3.07 connected to incoCloud)
Thanks in advance
Marco
 

Vladimir Dimitrov

unread,
Feb 1, 2015, 3:18:18 AM2/1/15
to inc...@googlegroups.com
Hello Marco,

The way to use the cash drawer is to add a new device of type Generic EscPOS Ethernet Printer (Text Mode) (or serial depending on the connection you use). This driver supports drawer commands and has this function which can be enabled. The drawer codes can be specified, but by default the used code is your code.

Let us know if your printer works fine with this driver.

- Vlad
--
--
You received this message because you are subscribed to the Google
Groups "IncoPOS" group.
To post to this group, send email to inc...@googlegroups.com
To unsubscribe from this group, send email to
incopos+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/forum/#!forum/incopos
To get more information about IncoPOS visit
http://vladster.net/en/products/incopos.aspx

---
You received this message because you are subscribed to the Google Groups "IncoPOS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to incopos+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Marco Premoselli

unread,
Feb 1, 2015, 6:57:47 AM2/1/15
to inc...@googlegroups.com
thanks Vlad, however, the cash drawer only has one cable with an RJ12 plug (similar to ethernet but smaller) that fits in the printer - do I leave it plugged into the printer?  Should there be another connection?  Also, when setting up the new generic EscPOS device, it's asking for an IP address, what do I use?  Sorry, but I am confused.

Prior to your response, I installed xpp (X Printing Panel) and in the Options it has a 'Cash Drawer Control' tab, I have changed the Cash Drawer #1 from 'Does not Open' to 'Open After Printing'.  I subsequently checked the printer settings using the following command:
lpoptions -p Epson-TM-T82II-2 -l
(I used 'lpq' and 'lpstat -p' to get the correct printer's name and queue)
The output is:
PageSize/Media Size: *RP80x297 RP58x297 Custom.WIDTHxHEIGHT
Resolution/Resolution: *203x203dpi
TmtSpeed/Printing Speed: *Auto 1 2 3 4
TmtPaperReduction/Paper Reduction: Off Top Bottom *Both
TmtPaperSource/Paper Source: *DocFeedCut DocFeedNoCut DocNoFeedCut DocNoFeedNoCut PageFeedCut PageFeedNoCut PageNoFeedCut
TmtBuzzerControl/Buzzer: *Off Before After
TmtSoundPattern/Sound Pattern: *Internal A B C D E
TmtBuzzerRepeat/Buzzer Repeat: *1 2 3 5
TmtDrawer1/Cash Drawer #1: Off Before *After
TmtDrawer2/Cash Drawer #2: *Off Before After

From the second last line of the output, it appears to have been set correctly, however, it does not work!

Vladimir Dimitrov

unread,
Feb 1, 2015, 7:59:56 AM2/1/15
to inc...@googlegroups.com
You have a few ways to communicate with the printer/cash drawer attached to it.

1. Printer is connected with the computer via serial cable. Then you can use the Generic EscPOS serial driver. It sends commands directly trough the serial port and one of them is the special command that signals the drawer to open.
2. Printer is connected via ethernet cable. The same but using a LAN/WiFi connection. In this case the IP of the printer is needed.
3. Via a printer driver. In this case you have some software that makes the receipt printer look like a regular printer in the OS. In this case you can use the Generic Document Printer driver and select the system printer. But in this case the software cannot send a drawer command directly. This command is sent by this software depending on the settings you may have in it.

Looks like you are using option 3 and in this case you have to configure xpp to do the drawer opening which is something I can't help you with...

Marco Premoselli

unread,
Feb 1, 2015, 5:26:22 PM2/1/15
to inc...@googlegroups.com
thanks Vlad, the picture is clear now, it sounds like I have to get the printer driver working, thanks for your help, I will let you know when I get it working.

Regards
Marco
You received this message because you are subscribed to a topic in the Google Groups "IncoPOS" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/incopos/3WDBF0OgDe4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to incopos+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages