Home
        ePOS-Device SDK for Android User`s Manual
         Contents
1.                                                                                        Constant Code Constant Code Constant Code  Keyboard VK_BACK 0x08 Keyboard VK_7 0x37 Keyboard VK_Z Ox5A  Keyboard VK_TAB 0x09 Keyboard VK_8 0x38 Keyboard VK_MULTIPLY Ox6A  Keyboard VK_RETURN OxO0D Keyboard VK_9 0x39 Keyboard VK_ADD Ox6B  Keyboard VK_SHIFT 0x10 Keyboard VK_A 0x41 Keyboard VK_SUBTRACT Ox6D  Keyboard  VK_CONTROL 0x11 Keyboard VK_B 0x42 Keyboard VK_F1 0x70  Keyboard VK_MENU 0x12 Keyboard VK_C 0x43 Keyboard VK_F2 0x71  Keyboard VK_CAPITAL 0x14 Keyboard VK_D 0x44 Keyboard VK_F3 0x72  Keyboard VK_ESCAPE Ox1B Keyboard VK_E 0x45 Keyboard VK_F4 0x73  Keyboard VK_CONVERT 0x1C    Keyboard VK_F 0x46 Keyboard VK_F5 0x74  Keyboard VK_NONCONVERT   0x1D Keyboard VK_G 0x47 Keyboard VK_F6 0x75  Keyboard VK_SPACE 0x20 Keyboard VK_H 0x48 Keyboard VK_F7 0x76  Keyboard VK_PRIOR 0x21 Keyboard VK_l 0x49 Keyboard VK_F8 0x77  Keyboard VK_NEXT 0x22 Keyboard VK_J Ox4A Keyboard VK_F9 0x78  Keyboard VK_END 0x23 Keyboard VK_K Ox4B Keyboard VK_F10 0x79  Keyboard VK_HOME 0x24 Keyboard VK_L Ox4C Keyboard VK_F11 Ox7A  Keyboard VK_LEFT 0x25 Keyboard VK_M 0x4D Keyboard VK_F12 Ox7B  Keyboard VK_UP 0x26 Keyboard VK_N Ox4E Keyboard VK_OEM_1 OxBA  Keyboard VK_RIGHT 0x27 Keyboard VK_O Ox4F Keyboard VK_OEM_PLUS OxBB  Keyboard VK_DOWN 0x28 Keyboard VK_P 0x50 Keyboard VK_OEM_COMMA   OxBC  Keyboard  VK_INSERT 0x2D Keyboard VK_Q 0x51 Keyboard VK_OEM_MINUS OxBD  Keyboard VK_DELETE Ox2E Keyboard VK_R 0x52 Keyboard VK_OEM_PE
2.                                     sf width  sa height  sb margin_top  se margin_bottom  sc offset_cut  sd offset_label   lt without Black Mark gt   sf   O  Receipt  Top position  Label  se sa  Bottom oo  of print area y  Cut    ETA t al      lo    Top position  pp ae    Cut     lt with Black Mark gt   sf          A    sa                                                                   sf  Ct  dE OO a  Top position    Bottom edge    se sa  of print area sd  Standard ejects SHE y_ 1                 F f  Bottom edge 1 sc  of label          Chapter 4 API Reference    addCommand    Adds commands to the command buffer  Sends ESC POS commands        For information about ESC POS commands  see the ESC POS Command Reference   Q You can view the ESC POS Command Reference from https   reference epson biz com               Syntax  public void addCommand  byte   data  throws EposException  Parameter  e data  Specifies ESC POS command as a binary data     Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156      EposException ERR_PARAM Invalid parameter was passed        EposException ERR_MEMORY Could not allocate memory                 EposException ERR_FAILURE An unspecified error occurred     addRecovery    Adds the recovery from errors to the command buffer   This API is executed when a error that can be automatically recovered from occurs              are not executed     e If this API is included in a
3.                         Parameter  e data  Specifies an instance of the android graphics Bitmap class   e x  Specifies the horizontal start position in the print area   Specifies an integer from O to 65535   e y  Specifies the vertical start position in the print area   Specifies an integer from O to 65 535   e width  Specifies the width of the print area  Specifies an integer from 1 to 65 535   e height  Specifies the height of the print area  Specifies an integer from 1 to 65 535   e color  Specifies the color   Printer  COLOR_NONE Characters are not printed   Printer  COLOR_1  default  First color  Printer  COLOR_2 Second color  Printer  COLOR_3 Third color  Printer  COLOR_4 Fourth color  Printer  PARAM_DEFAULT First color  e mode  Specifies the color mode           Printer MODE_MONO Monochrome  two tone   Printer MODE_GRAY16 Gray scale  16 tone   Printer PARAM_DEFAULT Monochrome  two tone                 89    90    Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156      EposException ERR_PARAM    Invalid parameter was passed        EposException ERR_MEMORY    Could not allocate memory           EposException ERR_FAILURE          An unspecified error occurred           When the range specified with x y and width height does not fit the image size specified with data   NH EposException ERR_PARAM is returned as a return value        Chapter 4 API Reference    feo lo   iole o     Adds NV logo 
4.          addFeed    Adds a line feed to the command buffer     Syntax  Public void addFeed   throws EposException    Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156      EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred                    Chapter 4 API Reference    addlmage    Adds raster image printing to the command buffer  Prints the graphic rendered by the  android graphics Bitmap class    In the android graphics Bitmap class graphic  changes the specified range to binary value with dither  processing  and converts it to raster image data  One pixel in an image equals to one printer dot  When an  image contains any transparent color  the background color of the image is assumed to be white        and specify a multiple of 8 not exceeding the printer s paper width for the width parameter of  this API      In page mode  a raster image is laid out in the current print position with the reference point  being its bottom left dot  The print position will not move     2   To print a raster image at high speed  specify Printer ALIGN_LEFT for the addTextAlign  p 76         Page mode does not support printing in multiple tones  Multiple tone graphics can only be printed    NM in standard mode     Syntax             public void addImage  Bitmap data  int x  int y   int width  int height  int color   int mode  throws EposException          
5.         187       188       Buzzer    58 mm 60 mm    Supported via Drawer Kick Out    80 mm          Paper Layout Settings       Not supported          Appendix    TM U220             76mm 58 mm  Interface Ethernet  Wireless LAN  Resolution 80 dpi x 72 dpi  W x H   Print Width 200 dots 180 dots 150 dots       Characters in a Font A  Line    ANK  33 characters  ANK  30 characters    ANK  25 characters                            Font B ANK  40 characters ANK  36 characters ANK  30 characters  Character Size Font A ANK  4 5 dots x 9 dots  W x H   Font B ANK  3 5 dots x 9 dots  W x H   Character Font A Bottom of the characters  Baseline  Font B Bottom of the characters  Default Line Feed Space 12 dots  Color Specification First color    First color  Second color  When using a two color ribbon cassette         Page Mode Default Area    Not supported       Page Mode Maximum Area    Not supported       Raster Image    Monochrome image                                  Logo Not supported  Barcode Not supported  2D Code Not supported  Ruled Line Not supported  Paper Cut Cut  Feed cut  Drawer Kick Out Supported   Buzzer Not supported  Paper Layout Settings Not supported          189       Open Source License    This product contains the following open source libraries     lipxml2   Except where otherwise noted in the source code  e g  the files hash c  list c and the trio files  which are  covered by a similar licence but with different Copyright notices  all the files are    Copyright 
6.         This API can be executed following execution of createDevice  p 51    Q e When this API is executed on multiple occasions  the notification destination method that is  specified afterwards is overwritten              Syntax    public void setDrawerClosedEventCallback   DrawerClosedListener target           Parameter  e target  This specifies the object  listener interface  that has the notification destination method   If NULL is specified for either the method or target  the notification destination registration is  Q nullified   Listener Interface    public interface DrawerClosedListener  extends EventListener    Listener Registration Method    void onPtrDrawerClosed String ipAddress   String deviceld     Parameter  e ipAddress  Sets IP address of TM i   e deviceld  Sets Device ID     138    Chapter 4 API Reference    setDrawerOpenEventCallback    This registers a callback method that receives DrawerOpenEvent        e When this API is executed on multiple occasions  the notification destination method that is      This API can be executed following execution of createDevice  p 51    Q specified afterwards is overwritten              Syntax    public void setDrawerOpenEventCallback   DrawerOpenListener target                 Parameter  e target  This specifies the object  listener interface  that has the notification destination method   If NULL is specified for either the method or target  the notification destination registration is  Q nullified   Listener Interfac
7.       169       TM T83ll i  TM T83ll       Interface    80 mm    Ethernet  Wireless LAN       Resolution    180 dpi x 180 dpi  W x H        Print Width    512 dots       Characters in a Line Font A    ANK  42 characters  Kanji  21 characters       Font B    ANK  56 characters  Kanji  32 characters       Character Size Font A    ANK  12 dots x 24 dots  W x H   Kanji  24 dots x 24 dots  W x H        Font B    ANK  9 dots x 17 dots  W x H   Kanji  16 dots x 16 dots  W x H        Character Baseline Font A    Font B    ANK  At the 21st dot from the top of the character  Kanji  At the 21st dot from the top of the character    ANK  At the 16th dot from the top of the character  Kanji  At the 15th dot from the top of the character          Default Line Feed Space    30 dots       Color Specification    First color       Page Mode Default Area    512 dots x 1662 dots  W x H        Page Mode Maximum Area    512 dots x 1662 dots  W x H        Raster image    Monochrome image                      Logo Monochrome image   Barcode UPC A  UPC E  EAN13  JAN13  EAN8  JAN8  CODE39  ITF   CODABAR  CODE93  CODE128  GS1 128   GS1 DataBar Omnidirectional  6S1 DataBar Truncated   GS1 DataBar Limited  6S1 DataBar Expanded   2D Code PDF417  QR Code  MaxiCode  6S1 DataBar Stacked   GS1 DataBar Stacked Omnidirectional   GS1 DataBar Expanded Stacked   Ruled Line Not supported   Page Mode Line Not supported    Rectangle          Appendix                   80 mm  Paper Cut Cut  Feed cut  Drawer Kick Out Su
8.       3   getPrintJobStatus printjobid        3 3  callback SUCCESS   M 7777 T TT TTT       37    Even if the output printer cannot complete the printing task  ePOS Device Service I F does not return an  error to the application  Enabling forward printing will allow for the printing task to be completed on a  substitute printer  with the application acquiring the printing results afterward  Refer to the sequence  diagram below                                               Application ePOS Device Spooler Printer Forwarding printer    1   sendData printjobid        1 1   send         1 2   Execution result    1 3   callback SUCCESS           2  Cmd     2 1   Print                     Printing results  Failure           3 1  Print                     4  getPrintJobStatus printjobid        4 1   getPrintJobStatus               4 2   Printing results  4 3  calback SUCCESS                                         Chapter 3 Programming Guide    Event Notification Method    The ePOS Device SDK for Android uses a listener to notify events to application     List of Listener Interface    x    Device Object       For details of listener interface  refer to API Reference  p 43                                       Package  com epson eposdevice    Function  com epson eposdevice ReconnectingListener   Reconnection process started     Svent onReconnecting  setReconnectingEventCalloack  p 55   com epson eposdevice ReconnectListener   Reconnection ended event onReconnect  setReconnectEventCall
9.    1 2                 Client A ePOS Device Client B                            1  Device          a l l    Initialize Device class              1  Device    Initialize Device class a      2  connect 1                                Establishes communication path  with ePOS Device Service I F    2 1   callback SUCCESS              2  connect             a  l Establishes communication path    with ePOS Device Service I F     gt        2 1  callback SUCCESS     3   setReconnectingEventCallback                   Register callback for reconnection      process started event          4   setReconnectEventCallback       Register callback for reconnection   process ended event             5   setDisconnectEventCallback    Register callback for network  disconnected event    6   getCommBoxManager    qe Acquires  CommboxManager object                                 6   getCommBoxManager       7   openCommBox          Acquires         Opens the Communication Box   Comma Mange  be                            callback SUCCESS        35    36          Client A                   ePOS Device                8   setReceiveEventCallback       Network is disconnected       Client B          7   openCommBox                   Opens the Communication Box       callback SUCCESS           4 1   Reconnection process started event             Notification for starting  the reconnection                         Network successfully reconnects       9   sendData         8   setReceiveEventCallback       
10.    Listener Interface    public interface DeleteDeviceListener  extends EventListener       Listener Registration Method    void onDeleteDevice  String ipAddress  String deviceld   int code     Parameter  e   pAdaress  Sets IP address of TM i   e deviceld  Sets Device ID   e code  Sets error status of processing results                 EposCallbackCode SUCCESS Device close succeeded   EposException ERR_CONNECT Could not communicate   EposCallbackCode ERR_NOT_FOUND Device not open   EposCallbackCode ERR_CLOSE Failed to close the device   EposCallbackCode ERR_FAILURE Other error occurred                 53    54    getAdmin    Obtains the administrator name set in TM i     NQ    Syntax       The string of the administrator name can be set with EPSON TMNet WebConfig              public String getAdmin      Return value    Returns character string of administrator name     getLocation    Obtains the installation location information set in TM i     Q    Syntax       The string of the installation location can be set with EPSON TMNet WebConfig              public String getLocation       Return value    Returns the installation location information     getCommBoxManager    Obtains the CommBoxManager object that performs communication between applications     Syntax  public CommBoxManager getCommBoxManager        Return value    Returns the Constructor of class CommBoxManager     Chapter 4 API Reference    setReconnectingEventCallback    This registers a callback method that receiv
11.    Sends a message to the  Communication Box                    4 1   Reconnection process ended event          Notify reconnection  process end                                 9 1   Message received event       Forwards data received while the network   was disconnected    10   closeCommBox       l  Closes the Communication Box          callback SUCCESS                 10   closeCommBox                Closes the Communication 3          callback ESUCCESS         2 2     Chapter 3 Programming Guide    Using the Spooler Function    A printing job will be executed immediately and a response will be returned to the application after printing  is complete when sending a printing request to ePOS Device Service l F from the application when the  spooler function is disabled                             Application ePOS Device Printer                1  sendData            1 1 1  Print                     1 2   Printing results       1 3   callback SUCCESS     The print data job will be added to the queue and a response will be returned to the application without  waiting for printing to complete when sending a printing request to ePOS Device Service I F from the  application when the spooler function is enabled                                         Application ePOS Device Spooler Printer                1  sendData printjobid             1 1  send                gt     1 2   Execution result    1 3  callback SUCCESS  SS ee       2  Cmd      2 1   Print                  Print result 
12.    This chapter describes how to write programs in the application development using ePOS Device SDK for  Android     How to Incorporate the ePOS Device SDK for Android    This section explains how to incorporate the ePOS Device SDK for Android        This explanation uses Eclipse  If you are using another development environment  please make    3 the appropriate changes     Incorporate the SDK using following procedures              A Create a new project in Eclipse     2 Copy provided JAR file  ePOS Device  jar  into following path        Libs    ePOS Device jar       3 In Libraries tab of the target project s properties  confirm that the JAR file you  added  ePOS Device jan is registered in  Java Build Path    If it has not been added  add the JAR file into build path using  Add Jars         4 Copy the library file  libeposdevice so  into following path        Libs  Larmeabi    libeposdevice so             Select the project in Eclipse s Package Explorer  right click on it  and press  Refresh      al    In   java source file of application to use  enter package import definitions per  class  Refer to the following     Device class             Log class    z import com epson eposdevice   EposException class          EposCallbackCode class                      Display class import com epson eposdevice display   Keyboard class import com epson eposdevice keyboard   Printer class import com epson eposdevice printer   Scanner class import com epson eposdevice scanner   SimpleSe
13.    addFeedLine    Adds paper feeding in lines to the command buffer        Syntax  public void addFeedLine int line  throws EposException  Parameter  e line  Specifies the paper feed space  in lines   Specifies an integer from O to 255   Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156         EposException ERR_PARAM Invalid parameter was passed   EposException ERR_MEMORY Could not allocate memory     EposException ERR_FAILURE An unspecified error occurred             87    addFeedPosition    Adds label   black mark paper feeding to the command buffer           Control of label paper black mark paper must be done in the standard mode   NM    Inthe page mode  this API specification cannot be used              Syntax    public void addFeedPosition int position   throws EposException                         Parameter  e position  Specifies the feed position   Printer FEED_PEELING Feeds to the peeling position   Printer FEED_CUTTING Feeds to the cutting position   Printer FEED_CURRENT_TOF Feeds to the top of the current label   Printer FEED_NEXT_TOF Feeds to the top of the next label   Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156            EposException ERR_PARAM Invalid parameter was passed   EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred        
14.   1 to 6 pieces of data convertible by Code Set A   GS   x1d  ISO country code  1  to 3 digit number  GS   x1d   Service class code  1  to 3 digit number        GS1 DataBar Stacked Convert the character string to the string in UTF 8  apply the    escape sequence  and then encode the string   6S1 DataBar Stacked    mona  Specify a 13 digit global trade item number  GTIN  not    including an application identifier  AD or a check digit        Convert the character string to the string in UTF 8  apply the  escape sequence  and then encode the string    You can enclose an application identifier  Al  in parentheses   The parentheses are used as HRI print characters and are not  encoded as data        GS1 DataBar Expanded Stacked To encode each of the following characters  specify two    characters starting with the character        FNC1   1   C  K      D   After converting the character string to UTF 8  conduct the  escape sequence and encode     After converting the character string to UTF 8  conduct the  escape sequence and encode        Aztec Code       DataMatrix                To specify binary data that cannot be represented by character strings  use the  following escape sequences     PA ee e      xnn Control code     Back slash                   97    98    Specifies the 2D Code type     Printer  SYMBOL_PDF417_STANDARD    2D Code type  Standard PDF417       Printer  SYMBOL_PDF417_TRUNCATED    Truncated PDF417       T    rinter SYMBOL_QRCODE_MODEL_1    QR Code Model 1       
15.   Display BRIGHTNESS_20 Set the customer display brightness to  20     Display BRIGHTNESS_40 Set the customer display brightness to  40     Display BRIGHTNESS_60 Set the customer display brightness to  60     Display BRIGHTNESS_100 Set the customer display brightness to  100                   Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156         EposException ERR_PARAM Invalid parameter was passed   EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred                 Chapter 4 API Reference    showClock    Adds time display to the command buffer   Enabling time display clears all the displayed strings  Sending another command during time display finishes    time display   Syntax  public void showClock   throws EposException    Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156      EposException ERR_MEMORY Could not allocate memory        EposException ERR_FAILURE An unspecified error occurred     addCommand    Adds commands to the command buffer                      For information about ESC POS commands  see the ESC POS Command Reference   3 You can view the ESC POS Command Reference from https   reference epson biz com               Syntax       public void addCommand byte   data  throws EposException  Parameter  e data  Specifies ESC POS command wit
16.   Specify a string that follows the barcode standard specified by the type parameter  If the  Q specified string does not conform to the standard  a barcode will not be printed              Barcode type    When an 11 digit number is specified  a check digit is  automatically added    UPC A When a 12 digit number is specified  the 12th digit is  processed as a check digit but the check digit is not  validated    Specify 0 as the first digit    Specify the manufacturer code in the digits 2 to 6   Specify  right align  the item code in the digits 7 to 11   The number of item code digits varies depending on the  manufacturer code  Specify Os in empty digits                    UPC E  When an 11 digit number is specified  a check digit is  automatically added    When a 12 digit number is specified  the 12th digit is  processed as a check digit but the check digit is not  validated    EAN13 When an 12 digit number is specified  a check digit is  automatically added    JAN13 When a 13 digit number is specified  the 12th digit is  processed as a check digit but the check digit is not  validated    EAN8 When a 7 digit number is specified  a check digit is  automatically added    JANS When an 8 digit number is specified  the 8th digit is    processed as a check digit but the check digit is not  validated                    Chapter 4 API Reference    Barcode type    When the first character is    the character is processed as  CODE39 the start character  In other cases  a start character
17.   destroyWindow    Adds the destroy settings for the defined window to the command buffer     Syntax    public void destroyWindow int number   throw EposException    Parameter  e number  Specifies the window number to be destroyed  Specify a number between 1 and 4   Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156      EposException ERR_PARAM Invalid parameter was passed        EposException ERR_MEMORY Could not allocate memory        EposException ERR_FAILURE An unspecified error occurred     setCurrentWindow    Adds the change settings of the current window to the command buffer                 Sets the specified window as the current window and moves the cursor to the origin of the current window     Syntax 4    public void setCurrentWindow int number   throw EposException       Parameter  e number  Specifies the destination window number  Specify a number between 1 and 4   Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156      EposException ERR_PARAM Invalid parameter was passed        EposException ERR_MEMORY Could not allocate memory              EposException ERR_FAILURE An unspecified error occurred        61    62    clearWindow    Adds the current window display clear to the command buffer     Syntax  public void clearWindow   throw EposException    Exceptions    When processing failed  EposException
18.   e hri     Barcode type    GS1 DataBar  Omnidirectional       Description    Specify a 13 digit global trade item number  GTIN  not  including an application identifier  AI  or a check digit     GS1 DataBar Truncated  GS1 DataBar Limited          GS1 Databar          You can enclose an application identifier  Al  in  parentheses  The parentheses are used as HRI print  characters and are not encoded as data     To encode each of the following characters  specify two    Expanded characters starting with the character       FNC1      C        D       To specify binary data that cannot be represented by character strings  use the    following escape sequences     E A       xnn Control code          Back slash             Specifies the barcode type     Barcode type                                           Printer BARCODE_UPC_A UPC A  Printer BARCODE_UPC_E UPC E   Printer BARCODE_EAN13 EANT3   Printer BARCODE_JANT3 JANT3   Printer BARCODE_EAN8 FANS   Printer BARCODE_JAN8 JANS   Printer BARCODE_CODE39 CODE39   Printer BARCODE ITF ITF   Printer BARCODE_CODABAR CODABAR   Printer BARCODE_CODE93 CODE93   Printer BARCODE_CODE128 CODE128   Printer BARCODE_GS1_128 GS1 128   Printer  BARCODE_GS 1_DATABAR_OMNIDIRECTIONAL aes cane   Printer BARCODE_GS1_DATABAR_TRUNCATED GS1 DataBar Truncated  Printer BARCODE_GS1_DATABAR LIMITED GS1 DataBar Limited  Printer BARCODE_GS1_DATABAR EXPANDED GS1 Databar Expanded       Specifies the HRI position     Printer HRILNONE  default  HRI not printed       
19.  512 dots 360 dots  Characters in a Line Font A ANK  42 characters ANK  30 characters  Font B ANK  56 characters ANK  40 characters  Character Size Font A ANK  12 dots x 24 dots  W x H   Font B ANK  9 dots x 17 dots  W x H   Character Baseline Font A At the 21st dot from the top of the character  Font B At the 16th dot from the top of the character  Default Line Feed Space 30 dots  Color Specification First color    First color  Second color  when two color printing is set        Page Mode Default Area    when two   color  printing is set    512 dots x 831 dots  W x H   512 dots x 415 dots  W x H     360 dots x 831 dots  W x H   360 dots x 415 dots  W x H        Page Mode Maximum Area    512 dots x 1662 dots  W x H     360 dots x 1662 dots  W x H        when two   color  printing is set    512 dots x 831 dots  W x H        360 dots x 831 dots  W x H        Raster image    Monochrome image  two color image                Logo Monochrome image  two color image   To perform two color printing  change the settings of the printer  using the memory switch setting utility     Bar Code UPC A  UPC E  EAN13  JAN13  EAN8  JAN8  CODESO  ITF   CODABAR  CODE93  CODE128  GS1 128   2D Code PDF417  QR Code   Ruled Line Not supported   Paper Cut Cut  Feed cut       Drawer Kick Out  Buzzer    Paper Layout Settings          Supported  Not supported  Not supported       186       App    endix    TM T90                                        58 mm 60 mm 80 mm   Interface Ethernet  Wireless LAN  Re
20.  Auto  Specifies the number of  code words for each row  QR Code    Ignored  MaxiCode  Specifies the maximum  2D GS1 Databar O  Auto  width for the barcode   106 or above   Aztec Code    Ignored  DataMatrix   Others  Ignored  Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156      100    EposException ERR_PARAM    Invalid parameter was passed        EposException ERR_MEMORY    Could not allocate memory           EposException ERR_FAILURE       An unspecified error occurred           Chapter 4 API Reference    addHLine    Adds horizontal line printing to the command buffer   Draws horizontal lines       Not available in page mode     Syntax          public void addHLine int xl  int x2  int style   throws EposException                               Parameter  e xl  Specifies the start position of the horizontal line  in dots    Specifies an integer from 0 to 65 535   e x2  Specifies the end position of the horizontal line  in dots    Specifies an integer from O to 65 535   e style  Specifies the line type   Printer LINE_THIN Solid line  Thin  Printer LINE_MEDIUM Solid line  Medium  Printer LINE_THICK Solid line  Thick  Printer LINE_THIN_DOUBLE Double line  Thin  Printer  LINE_MEDIUM_DOUBLE Double line  Medium  Printer LINE_THICK_DOUBLE Double line  Thick  Printer PARAM_DEFAULT Solid line  Thin  Exceptions    When processing failed  EposException of the following error status is generated   Acquir
21.  C  1998 2003 Daniel Veillard  All Rights Reserved    Permission is hereby granted  free of charge  to any person obtaining a copy of this software and  associated documentation files  the  Software    to deal in the Software without restriction  including  without limitation the rights to use  copy  modify  merge  publish  distribute  sublicense  and or sell copies of  the Software  and to permit persons to whom the Software is furnished to do so  subject to the following  conditions    The above copyright notice and this permission notice shall be included in all copies or substantial portions  of the Software     THE SOFTWARE IS PROVIDED  AS IS   WITHOUT WARRANTY OF ANY KIND  EXPRESS OR IMPLIED  INCLUDING BUT  NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY  FITNESS FOR A PARTICULAR PURPOSE AND NONIN   FRINGEMENT  IN NO EVENT SHALL THE DANIEL VEILLARD BE LIABLE FOR ANY CLAIM  DAMAGES OR OTHER LIA   BILITY  WHETHER IN AN ACTION OF CONTRACT  TORT OR OTHERWISE  ARISING FROM  OUT OF OR IN  CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE     Except as contained in this notice  the name of Daniel Veillard shall not be used in advertising or otherwise  to promote the sale  use or other dealings in this Software without prior written authorization from him     icu4c   Copyright  C  2008 The Android Open Source Project   Licensed under the Apache License  Version 2 0  the  License     you may not use this file except in compliance with the License    You 
22.  H        Raster image    Monochrome image                            Logo Monochrome image   Barcode UPC A  UPC E  EAN13  JAN13  EAN8  JAN8  CODESOS  ITF   CODABAR  CODE93  CODE128   2D Code PDF417  QR Code   Ruled Line Not supported   Paper Cut Cut  Feed cut   Drawer Kick Out Supported   Buzzer Not supported   Paper Layout Settings Not supported          183       TM T7Oll                                                                      80 mm  Interface Ethernet  Wireless LAN  Resolution 203 dpi x 203 dpi  W x H   Print Width 576 dots  Characters in a Line Font A ANK  48 characters  Font B ANK  72 characters  Character Size Font A ANK  12 dots x 24 dots  W x H   Font B ANK  9 dots x 17 dots  W x H   Character Baseline Font A At the 21st dot from the top of the character  Font B At the 15th dot from the top of the character  Default Line Feed Space 30 dots  Color Specification First color  Page Mode Default Area 576 dots x 1662 dots  W x H   Page Mode Maximum Area 576 dots x 1662 dots  W x H   Raster Image Monochrome image  Logo Monochrome image  Barcode UPC A  UPC E  EAN13  JAN13  EAN8  JAN8  CODE39  ITF   CODABAR  CODE93  CODE128  GS1 128 GS1 DataBar  Omnidirectional  6S1 DataBar Truncated  6S1 DataBar Limited   GS1 Databar Expanded  2D Code PDF417  QR Code  MaxiCode  GS1 DataBar Stacked   GS1 DataBar Stacked Omnidirectional  GS1 DataBar Expanded  Stacked  Ruled Line Not supported  Paper Cut Cut  Feed cut  Drawer Kick Out Supported  Buzzer Supported  Paper Layout Setti
23.  Retains the current underlining setting   e em  Specifies the bold style   a  Printer  TRUE Specifies emphasized printing of characters   Printer FALSE  default  Cancels emphasized printing of characters   Printer  PARAM_UNSPECIFIED RAINS the current setting for emphasized  printing   e color  Specifies the color                       Printer  COLOR_NONE Characters are not printed   Printer  COLOR_1  default  First color   Printer  COLOR_2 Second color   Printer  COLOR_3 Third color   Printer  COLOR_4 Fourth color   Printer  PARAM_UNSPECIFIED Retains the current color setting                   If Printer  PARAM_UNSPECIFIED is specified for all parameters  this returns  Q EposException ERR_PARAM as the return value              Chapter 4 API Reference    Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156      EposException ERR_PARAM Invalid parameter was passed        EposException ERR_MEMORY Could not allocate memory                 EposException ERR_FAILURE An unspecified error occurred           85    86    addTextPosition    Adds the horizontal print start position of text to the command buffer     Syntax    public void addTextPosition int x  throws EposException    Parameter  e x  Specifies the horizontal print start position  in dots    Specifies an integer from O to 65 535   Exceptions    When processing failed  EposException of the following error status is generated     Acquire with ge
24.  an ee a 118  OPM ORO Rca ia ated dia 118   CONV A A aid 119   Sandalias 119  halftone POPE Via A Aaa 120  brightness  properly ita daa A hinl aleeire aiken 121  TOC O it AA a est 122  MEU POP ba 123  interval PTOS Vian A E A AAA a 123  SeTRECEIVEEVENTCOIIDOCK cta ida 124  setstatusChangeEventCalback ita 128    setBatteryStatusChangeEventCaMIbDUCK wo Hee rra rr 129    SETONIINEEVENTEGIIDAGK aci iaa oa da calada li dida 130    setof    lineEv  ntCallbaCk iii Ai e a Aide 131  SETPOWELOFFEVENTCAIID ACK 00  nono ro rro rre rr 132  setCoverOkEVentCalllOOck jain  coi a AA E E CCE CRD reer 133  SETCOVEFOPENEVENTCAIIDACK woo EE rre rr 134  setPaperOkEventCadllbacGk acia A ieee ith hala 135  setPaperNearEndEventCallbUCKk oo EE Eee erties teen cies 136  setPaperEndEventEdllbaSKk tica ai a cadre ia 137  SeTDrawerClOseCEVeENtCllOA CK    EE rr rr 138  setDrawerOpenEventCAIIDOCK     occcccncccccconononccononnnonnnoconnn nn no nono or nrr nono rr rr rrrnn nr USES SO nr rrrrrannn rr rr ninia 139  SETBATErYOKEVENTCAIIDOCK oo nono nororo nora no rar ron rr rr rro rr rr rre 140  setBatteryLowEvenTEdlIbaSk    icairia a e a a A a aaa 141  Scanner Class  veia idas dai 142  SseiIDotaEVeniGallbacCk a2  Ada 142  Bi SimpleSerial  Class AAA A O Se A 143  SENACOMMON O ina aid id 143  setCommandReplyEventCallbdck acciona a ad oi 144  E CommBoxManager ClOSS i  iii ica dilaciones 145  ODEN SOMM BOK 27 cctv nies nota cada asada Aa a E ERSA MEP faites ERTEN 145  ClOSCECOMMBOX  ici re micas AAE ela tein E A o
25.  aon nonin anlar ite  47  EDOSEXCEDTION CIGSS a E E E AO A aaa eee 47  EposCallbackCode  Clas vacia ined ek dn ian lt Aiea AG A AA Aner  47   E Device Class cuina ico 48  DOI A A A A teal do aie a 48  CONS aan ad ti lean lar dado tiara sind 49  MT ed dad Ed de 50  Connected anere na a a ae a a a aa a E E EG a 50  ClEGTEDEVIC Ca uta A Ad Heidi a 51  ACIETEDSVICE montanna ideada 53  JA e gers 54  ISOC ia A iO da ito tos 54  GeICOMMBOXMGNGGE mio A TON 54  setReconnectingEventCallbacEk incitar iii a 55  setRecomnectEventCallbacEKk  ocio A E AA A E CE 56  SeTDISCONNECTEVENICAIIDAGCK ata A A A ES 57   E Display Class eiconig eiai ein ci catan NEEE AENA AEE EA NETA 58  SEMODGTO o A ea 58  clearcommanaBUircioio ici dai ind ideo EEEE AAR 58  TO A A taa 59  create WindO Witt aia 60  DSSTOY WIN O Wisin a AAA daa ii 61  SEICUMSATWINCOWs lt  ttm lit rs id tostado ade 61  COCA WIN O Wii AAA AA A NAS 62  SeTGUSO ROS MON caricia a dario 62  MOVES UI PM e tea 63  AS A UN 64  a a OO 65  addReversel diam pi ba 66  AAA MEUS id o odia 67  Sl e al dol a bo 68  setBig Messina 68  SNOWCIOCK mara tardas paid a a a a a 69  AGACOMMGNG nane a ha a N N a ha tit ies Mia ee race an 69  setRecelveEventCalback icon idad endure ad 70   Ml Keyboard CIGS ietie iii Doa 71  Puri A A A AS A AA ia 71  setKeyPressEventCaOlIDACK   cccococcccconoconccononnnnnnonononononononnnonnnronon ono ro nono rr rr rr rnnn nn r rr roo nr rn rr nana nr nn rnrrcannrnnnnnos 72    setstringEventCdllbaEk arieni shh Aa E s Maa eee di Aa
26.  applications     1 Able to use in any environment that network connection is available     1 No need to prepare any device  such as a PC  to act as a controller to control the peripheral devices        Li Accessing a device using ePOS Device SDK automatically locks the device exclusively   Even if accessed from multiple terminals simultaneously  the device is not under multiple controls  When  the terminal that has controlled the device releases the device  the device becomes controllable from  another terminal     T Data can be sent and received between applications    For details  refer to How to Use the Communication Box p 13     A Printing requests can be made to the printer by specifying the printing job ID  i   For details  refer to Specifying the Print Job ID from the Application p 16     1 Printing data can be sent to the printer without waiting for a printing complete response from the printer    Spooler    For details  refer to Spooler Function p 17         A Print data can be sent to another printer if the printer sends an error response  PAPER END  COVER OPEN   etc   or does not return a response   Print forwarding     For details  refer to Forwarding p 19        TM  firmware Ver 4 1 or later versions supported    11    E        12    System Configuration Example    ao ARON         Place an Android application in the Android device     The Android application sends a request message to TM i   TM i sends data to devices that can be controlled   The devices and net
27.  device control script file developed for the device  An  API for the device control script is also provided  For details  refer to Sample Program p 157      Peripheral Device  1 Customer display   e DM D110 USB Interface  1 Standard HID device   e Keyboard device   e Barcode scanner    1 Serial communication device       When controlling a serial communication device with this SDK  API to send receive    Q commands is used to control              22    Development Environment    The following are necessary to develop an Android application   e Android SDK r15 or later    e Java Development Kit 6 or later    Chapter 1 Overview    Contents in the Package    SU ia AAA    Compiled Java class file  archived into a jar format file to    ePOS Device jar    allow APIs to be used from Java programs                 libeposdevice so Library for function execution   ARMvSTE supported   ePOS Device_Sample_Android zip A sample program file    README en txt A readme file    EULA en txt Contains the SOFTWARE LICENSE AGREEMENT           This manual  Describes the ePOS Device SDK for Android  programming methods and APIs     For customers in North America  go to the following web site     ePOS Device_SDK_Anaroid_en_revx paf             htto   www epsonexpert com   For customers in other countries  go to the following web site   https    download epson biz com  service pos     23    Restrictions    24    1 The ruled line command is available only when the printer supports the  ruled line comma
28.  following execution of createDevice  p 51    Q e When this API is executed on multiple occasions  the notification destination method that is  specified afterwards is overwritten              Syntax    public void setCoverOkEventCallback   CoverOkListener target           Parameter  e target  This specifies the object  listener interface  that has the notification destination method   If NULL is specified for either the method or target  the notification destination registration is  Q nullified   Listener Interface    public interface CoverOkListener extends EventListener    Listener Registration Method    void onPtrCoverOk String ipAddress  String deviceld     Parameter  e ipAddress  Sets IP address of TM i     e deviceld  Sets Device ID        133    134    setCoverOpenEventCallback    This registers a callback method that receives CoverOpenEvent          This API can be executed following execution of createDevice  p 51    Q e When this API is executed on multiple occasions  the notification destination method that is  specified afterwards is overwritten              Syntax    public void setCoverOpenEventCallback   CoverOpenListener target           Parameter  e target  This specifies the object  listener interface  that has the notification destination method   If NULL is specified for either the method or target  the notification destination registration is  Q nullified   Listener Interface    public interface CoverOpenListener extends EventListener    Listener Registr
29.  is  automatically added        ire Start and stop codes are automatically added   Check digits are not added or validated        Specify a start character  A to D  a to d    CODABAR Specify a stop character  A to D  a to d    Check digits are not added or validated        Start and stop characters are automatically added        CODE93  A check digit is automatically calculated and added   Specify a start character  CODE A  CODE B  CODE C    A stop character is automatically added   A check digit is automatically calculated and added   To encode each of the following characters  specify two  characters starting with the character       FNC1   1  FNC2   2   CODE128 ENC3  3  FNC4   4  CODE A   A  CODE B   B  CODE C   C  SHIFT   S          A start character  FNC1  a check digit  and a stop  character are automatically added           To automatically calculate and add a check digit for an  application identifier  Al  and the subsequent data   specify the character     in the position of the check digit   You can enclose an application identifier  Al  in  parentheses  The parentheses are used as HRI print  characters and are not encoded as data    You can insert soaces between an application identifier  GS1 128  Al  and data  The spaces are used as HRI print  characters and are not encoded as data    To encode each of the following characters  specify two  characters starting with the character         FNC1  q  FNC3  3            D                            93    94    e type   
30.  object  listener interface  that has the notification destination method   Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156               EposException ERR_PARAM Invalid parameter was passed   EposException ERR_CONNECT Could not communicate     EposException ERR_MEMORY   Could not allocate memory                  lt C   s SSY  EposException ERR_FAILURE An unspecified error occurred   EposException ERR_PROCESSING Could not execute a process                 Listener Interface    public interface SendDataListener extends EventListener    Listener Registration Method    void onCommBoxSendData String ipAddress  int code   int count  int sequence     Parameter  e ipAddress  Sets IP address of TM i     151    e code  Sets error status of processing results     Description  EposCallbackCode SUCCESS   Successfully sent the message   EposCallbackCode   ERR_NOT_OPENED  EposCallbackCode   ERR_NOT_FOUND  EposCallbackCode   ERR_FAILURE       A Communication Box is not open        The specified member is not found        Other error occurred                 e count  The number of clients the message was sent to is returned as the second parameter     e sequence  Sets the same sequence number with a returned value to 3rd parameter when this API is  executed     152    Chapter 4 API Reference    setReceiveEventCallback    This registers a callback method that notifies a receipt of message of Communication Bo
31.  of the following error status is generated   Acquire with getErrorStatus  p 156      Description    EposException ERR_MEMORY   Could not allocate memory       EposException ERR_FAILURE An unspecified error occurred     setCursorPosition    Adds the cursor position settings to the command buffer        Syntax    public void setCursorPosition int x  int y   throw EposException    Parameter  e x  Specifies the x coordinate of the destination  Specify a number between 1 and 20   e y  Specifies the y coordinate of the destination  Specify  1  or  2     Exceptions    When processing failed  EposException of the following error status is generated   Acquire with getErrorStatus  p 156    Description  EposException ERR_PARAM Invalid parameter was passed   EposException ERR_MEMORY Could not allocate memory     EposException ERR_FAILURE An unspecified error occurred        Chapter 4 API Reference    moveCursorPosition    Adds the cursor position settings in the current window to the command buffer     Syntax    public void moveCurrentPosition   int position  throw EposException                         Parameter  e position  Specifies the cursor destination in the current window by selecting from the following   Display  MOVE_TOP_LEFT Sets the destination at the top left   Display  MOVE_TOP_RIGHT Sets the destination at the top right   Display  MOVE_BOTTOM_LEFT Sets the destination at the bottom left   Display  MOVE_BOTTOM_RIGHT Sets the destination at the bottom right   Exceptions    W
32.  print command  other print commands included in the print document  Q   We recommend using the recover  p 119  for this function              Syntax  public void addRecovery   throws EposException    Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156        EposException ERR_MEMORY   Could not allocate memory       EposException ERR_FAILURE An unspecified error occurred        117    118    addReset    Adds the printer reset to the command buffer          Other printing commands in the print document are ignored   Q    We recommend using the reset  p 119  for this function              Syntax  public void addReset   throws EposException    Exceptions    When processing failed  EposException of the following error status is generated   Acquire with getErrorStatus  p 156         Description    EposException ERR_MEMORY Could not allocate memory       EposException ERR_FAILURE An unspecified error occurred             startMonitor    Starts a status event notification of the printer     Syntax  public void startMonitor  throws EposException    Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156      EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred     stopMonitor    Ends a status event notification of the printer                    Syntax  public void stopMo
33.  public interface ReceiveListener    extends EventListener    LJ For acquiring the job ID    public interface JobReceiveListener  extends Receivelistener         Supported in TM i firmware Ver 4 1 or later when use the JobReceiveListener        Chapter 4 API Reference    Listener Registration Method    Y void onPtrReceive  String ipAddress  String deviceld   int success  int code int status     int battery      1 For acquiring the job ID  void onPtrReceive  String ipAddress  String deviceld   int success  int code int status   int battery  String printJobId        Supported in TM i firmware Ver 4 1 or later when use the method with a printJobld    AN parameter     Parameter  e ipAddress  Sets IP address of TM i              e deviceld  Sets Device ID     e success  Sets printing execution results     E O AA    e Printing succeeded  Printer TRUE e Processing succeeded  When the spooler function is  enabled        e Printing Failed  Printer FALSE e Processing Failed  When the spooler function is  enabled                    125    126    e code     Sets execution results of process     EposCallbackCode SUCCESS    Processing was successful        EposCallbackCode PR    INTING      Print job now printing        EposCallbackCode ERR_AUTOMATICAL    An automatically recoverable error occurred       EposCallbackCode ERR_BATTERY_LOW    No remaining battery       EposCallbackCode ERR_COVER_OPEN    A cover open error occurred       EposCallbackCode ERR_CUTTER  EposCallbackCode ERR_MECHAN
34.  the character   Font C At the 15th dot from the top of the character  Default Line Feed Space 30 dots  Color Specification First color       Page Mode Default Area    420 dots x 1624 dots   WxH     432 dots x 1624 dots   WxH     400 dots x 1624 dots   WxH        Page Mode Maximum Area    Raster Image    420 dots x 1624 dots   WxH     432 dots x 1624 dots   WxH     400 dots x 1624 dots   WxH           Monochrome image             Logo Monochrome image   Barcode UPC A  UPC E  EAN13  JAN13  EAN8  JAN8  CODE39  ITF  CODABAR   CODE93  CODE128  GS1 128  GS1 DataBar Omnidirectional  GS1  DataBar Truncated  GS1 DataBar Limited  GS1 DataBar Exoanded   2D Code PDF417  QR Code  MaxiCode  CS1 DataBar Stacked  GS1 DataBar  Stacked Omnidirectional  6S1 DataBar Expanded Stacked  Aztec  Code  DataMatrix  Composit Symbology   Not supported    Ruled Line Not supported   Paper Cut Feed cut  Feeds paper to cutting position        Drawer Kick Out    Buzzer    Not supported    Support  Pattern 1   Pattern 10  Stop        Paper Layout Settings          Supported       179          TM P80                                                                      80 mm  Interface Wireless LAN  Resolution 203 dpi x 203 dpi  W x H   Print Width 576 dots  Characters in a Line Font A ANK  48 characters  Font B ANK  64 characters  Character Size Font A ANK  12 dots x 24 dots  W x H   Font B ANK  9 dots x 17 dots  W x H   Character Baseline Font A At the 21st dot from the top of the character  Font B At the 16t
35.  top   Printer DIRECTION_BOTTOM_TO_TOP RC odie cloc Wyse rrien oy A  degrees  Data is printed from the bottom  left corner to the top    Right to left   Printer  DIRECTION_RIGHT_TO_LEFT  Rotation by 180 degrees Data is printed  from the bottom right corner to the left    Top to bottom   Printer  DIRECTION_TOP_TO_BOTTOM SS icien by O eke eek  Data is printed from the top right corner  to the bottom     Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156            EposException ERR_PARAM Invalid parameter was passed   EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred                 106    Chapter 4 API Reference    addPagePosition    Adds the page mode print position set area to the command buffer   Specifies the print start position  coordinates  in the area specified by the addPageArea  p 105      x    Syntax       Use this API function by inserting it between addPageBegin  p 104  and addPageEnd  p 104         public void addPagePosition int x  int y   throws EposException    Parameter  e x  Specifies the horizontal print position  in dots   Specifies an integer from O to 65 535   ey  Specifies the vertical print position  in dots   Specifies an integer from O to 65 535     following      To print a character string   Specify the left end of the baseline for the first character  This can be omitted for left aligned  printing of standar
36. 20     Specifies the y coordinate of the display position  Specify  1  or  2      When processing failed  EposException of the following error status is generated   Acquire with getErrorStatus  p 156               EposException ERR_PARAM Invalid parameter was passed   EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred              Chapter 4 API Reference    addMarquee    Adds marquee display to the command buffer   Marquee is displayed in the horizontal scroll mode in one line  regardless of the scroll mode set for the dis   play window     Syntax    public void addMarquee  String data  int format   int unitWait  int repeatWait   int repeatCount  int lang   throws EposException       Parameter  e data  Specifies the string to be displayed   e format  Specifies the string display method by selecting from the following   Description    Display  MARQUEE_WALK   Displays the string from the right end of the window     Display  MARQUEE_PLACE Displays the string from the left end of the window   e unitWait  Specifies the display interval  ms  for each character     A value between 0 and 2 000 can be specified     e repeatWait  Specifies the interval  ms  to repeat the string display   A value between 100 and 2 000 can be specified        e repeatCount  Specifies the number of times to repeat the string display   A value between 0 and 127 can be specified   When  0  is specified  display is repeated unlimitedly   e lang  Speci
37. ANEL_SWITCH    The paper feed switch is being pressed  ON        Printer ST_MECHANICAL_ERR  Printer ST_AUTOCUTTER_ERR    A mechanical error occurred  An autocutter error occurred       Printer ST_UNRECOVER_ERR    An unrecoverable error occurred       Printer ST_AUTORECOVER_ERR  Printer ST_RECEIPT_NEAR_END    An automatically recoverable error occurred  No paper in roll paper near end sensor       Printer ST_RECEIPT_END    No paper in roll paper end sensor       Printer ST_BUZZER       Printer ST_SPOOLER_IS_STOPPED         A buzzer is on  only for applicable devices   The spooler has stopped            IM i firmware Ver 4 1 or later versions supported    e battery  Sets battery status     Status of power    Ox30XX    The AC adapter is connected       Ox31XX       The AC adapter is connected             Remaining battery                         OxXX36 Battery amount 6  OxXX35 Battery amount 5  OxXX34 Battery amount 4  OxXX33 Battery amount 3  OxXX32 Battery amount 2  OxXX31 Battery amount 1  Near end   OxXX30 Battery amount 0  Real end                    NQ       0 is shown when the model doesn t have a battery installed           e printJobld  Sets the print job ID     127       setStatusChangeEventCallback    This registers a callback method that receives StatusChangeEvent          This API can be executed following execution of createDevice  p 51    Q e When this API is executed on multiple occasions  the notification destination method that is  specified afterwards is overw
38. Callback                      Register callback for network  disconnected event          6   createDevice   Device  TYPE_SCANNER            6 1  Cmd            Obtain a device object                7 1  callback desa Pee     EposPrinter  SUCCESS           Sets options parameters to resend data when reconnected to the network     Chapter 3 Programming Guide                                                                       2 2   Applications ePOS Device Barcode Scanner  1 1 i  I I I  i 8   Registration of callback according i i  I to the device I I  I  ai i  I I  kna I I  I Kt    1 Network is cut off E 9  Scan  I I  L I  3 1   Reconnection process started event 1 9 1   Snan data  l A         gt                                 Notify the starting of reconnection   Retains data inthe    ePOS Device Service I F                was done successfully       Network reconnection j       4 1   Reconnection ended event            sl  Notify the reconnection completion             4                  9 1 1   Barcode data detection event          in the ePOS Device Service I F       l l  Sends data that retained         SS       10  deleteDevice  EposScanner         10 1   Cmd    Notify the reconnection completion D il    11 1  callback SUCCESS                    1  I  i 12  disconnect    I   I   I   I   Sends data that retained     i in the ePOS Device Service I F i  I I                31    Programming flow for the Communication Box    The following indicates the basic programming seq
39. Code PDF417  QR Code  MaxiCode  GS1 DataBar Stacked   GS1 DataBar Stacked Omnidirectional  GS1 DataBar Expanded  Stacked  Composite Symbology not supported                             Ruled Line Not supported  Paper Cut Cut  Feed cut  Drawer Kick Out Supported  Buzzer Optional  Paper Layout Settings Not supported          173    TM L90       Receipt Die cut Label                Interface Ethernet  Wireless LAN  Resolution 203 dpi x 203 dpi  W x H   Print Width 256 dots  38 mm  to 224 dots  38 mm  to  576 dots  80 mm  560 dots  80 mm   Font For more information about what character codes can be printed     refer to the user s manual that came with the printer                                Characters in a Font A ANK  48 characters  ANK  46 characters  Line  Font B ANK  570 characters ANK  56 characters  Character Size Font A ANK  12 dots x 24 dots  W x H   Font B ANK  10 dots x 24 dots  W x H   Character Font A At the 21st dot from the top of the character  Baseline  Font B At the 21st dot from the top of the character  Default Line Feed Space 30 dots  Color Specification First color    Second color  Second color  when two color printing is set           Page Mode Default Area 576 dots x 738 dots  W x H  560 dots x 738 dots  W x H   when two  576 dots x 369 dots  W x H  560 dots x 369 dots  W x H   color printing  is set       Page Mode Maximum Area    576 dots x 1476 dots  W x H  560 dots x 1476 dots  W x H        when two   color printing  is set    576 dots x 738 dots  W x 
40. Contents in the PaCckage          wma naain eaaaiuira ekansan riiui 23  PACKAGES E EA A ees 23  EXOW IO Chins ad cora 23  E RESIMICTIONS eci a cecickcs eee ta 24  Building ENVIFONMEONT    c occiso cai ice 25  MWorkfOW  coiiianiaiai iii R ania 25  E Registration Of DeviC          ooooooconcccinncccccnonnccnonnccnnnnncnnnnncnnnnnnnnnnnnr cnn encarnar ener rca 26  Programming CU iaa deci 27  E How to Incorporate the ePOS Device SDK for Android        oooooooccccnonccccccccnonoccncncnnnnnnnnos 27  E PrOQrermmMinG FlOW 2 8 2 desde ce ccceveccend cedeceedead cocaina AE 29  If Automatically Reconnecting to the NetWork      i EEEE 30  Programming flow for the Communication BOX    re rra 32  E Using the Spooler  FUNCHON      ociociciiaici it a tnak aeaii aetna i adadawa 37  E Event Notification MethoOd         oooooccccononccccccononnnccnconocnnnnnnncnnnnnnnnnonnrnrnnnnnnn nor rrnnnnnnnnrrrnnnnnnnns 39    Usteof ListSNEr IRSA  matara aaa e a 39    API Reference uscar dacided  43    E List Of ePOS Device API         cocccccccncccconcocanaonnnnnnncnnoncnnncnnnnncnnnnnnnnnann nano nn nn nn nn nr nn nc nnnrnnennnnnnnn 43  DEVICE  ClOSS aiii ce E E A TERE AA AO EAEI A ea 43  BESAS O O A ATAT  44  Keyboard  Clas Simian tiie a A aT ee A a BA a ae 44  PRINTF CASS iccsrtatas E E A 44  Scanner CASS in a ata aw daniel Aantal tdi 46  SIMpleseriol CASS is dae de 47  CommBoxManager Class ia cites aie dd Da a Aci 47  COMMBOXCIOSS irradian Ae Das tomes canes ets 47  LOG  ClO Shaanan TAN O E O R N ana
41. Could not execute a process              clearCommandBuffer    Clears command buffers     Syntax    public void clearCommandBuffer       Chapter 4 API Reference    Adds the initialization settings of the customer display to the command buffer  Initialization changes the sta   tus as follows     e All the displayed characters are cleared and all the registered windows are deleted   e The cursor is restored to the default status and moves to the customer display origin     e The display blinking and brightness settings are restored to the default status     Syntax  public void reset   throws EposException    Exceptions    When processing failed  EposException of the following error status is generated   Acquire with getErrorStatus  p 156      EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred                       59    Adds the window settings to the command buffer        Define a window so that it does not overlap with a defined window   AN Specify the size to fit in the customer display size  20 digits x 2 rows               Syntax    public void createWindow int number  int x  int y   int width  int height  int scrallMode   throw EposException    Parameter   e number  Specifies the window number  Specify a number between 1 and 4    ex Specifies the x coordinate of the window origin on the customer display   Specify a number between 1 and 20    e y  Specifies the y coordinate of the window origin on the customer displ
42. EPSON    EXCEED YOUR VISION    ePOS Device SDK for Android  User   s Manual       Overview    Describes the features and development environment     Building Environment       Describes environment building for ePOS Device Service  I F     Programming Guide    Describes how to write programs in application  development     API Reference    Describes the APIs provided in ePOS Device SDK for  Android     Sample Program    Describes the sample program     Appendix    Describes the list of keycode and printer specifications     M00077701  Rev B    Cautions  No part of this document may be reproduced  stored in a retrieval system  or transmitted in any form or  by any means  electronic  mechanical  photocopying  recording  or otherwise  without the prior written  permission of Seiko Epson Corporation     e The contents of this document are subject to change without notice  Please contact us for the latest  information     While every precaution has taken in the preparation of this document  Seiko Epson Corporation assumes  no responsibility for errors or omissions     Neither is any liability assumed for damages resulting from the use of the information contained herein     Neither Seiko Epson Corporation nor its affiliates shall be liable to the purchaser of this product or third  parties for damages  losses  costs  or expenses incurred by the purchaser or third parties as a result of   accident  misuse  or abuse of this product or unauthorized modifications  repairs  or alterati
43. EposCallbackCode ERR_OPEN Failed to open the device        EposCallbackCode ERR_INVALID_WINDOW The specified window is not registered        An int   icati ith th i  EposCallbackCode ERR_PORT n internal communication error wi e device       occurred   A ti t i icati ith  EposCallbackCode ERR_TIMEOUT imecu error occurred in communication wi  the device   EposCallbackCode ERR_PARAM An invalid parameter is detected                 70    Chapter 4 API Reference    Keyboard Class    Sets the keycode to identify the beginning of a string when receiving keyboard input collectively as a series  of strings     N    Syntax       Settings are cancelled if NULL or      empty space  is input              public void setPrefix byte   data  throws EposException    Parameter  e data  Specifies the array of keycodes  For the keycodes  refer to List of KeyCode  p 165      Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156      EposException ERR_PARAM Invalid parameter was passed   EposException ERR_CONNECT Failed to communicate with a device   EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred                             71    72    setKeyPressEventCallback    Registers a callback method that receives the key pushed event        When this API is executed on multiple occasions  the notification destination method that is  3 specified afterwards is overwrit
44. ErrorStatus  p 156      EposException ERR_PARAM Invalid parameter was passed     EposException ERR_MEMORY  EposException ERR_FAILURE       Could not allocate memory           An unspecified error occurred           Chapter 4 API Reference    addTextLang    Adds the language setting to the command buffer   Encodes character string specified with addText  p 78  according to the specified language setting in this  API   Syntax  public void addTextLang int lang  throws EposException    Parameter  e lang  Specifies the target language                                   Printer  LANG_EN default  English  ANK   Printer  LANG_JA Japanese    International character set changes to Japan    Printer LANG_KO Korean    International character set changes to Korean    Printer LANG_ZH_CN Simplified Chinese    International character set changes to China    Printer LANG_ZH_TW Traditional Chinese  Printer LANG_TH Thai  Only for South Asia model    For printable character code  refer to the Technical Reference Guide of your   3 printer                 Depending on language specification  a part of characters is printed as follows     Characters   U 0024    Characters   U 005C           Japanese       Korean   wW  Simplified Chinese       Traditional Chinese                       Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156            EposException ERR_PARAM Invalid parameter was passed   EposException ERR_ME
45. F  CODABAR  CODE93  CODE128  GS1 128    GS1 DataBar Omnidirectional  GS1 DataBar Truncated   GS1 DataBar Limited  GS1 Databar Expanded       2D Code    PDF417  QR Code  MaxiCode  GS1 DataBar Stacked   GS1 DataBar Stacked Omnidirectional   GS1 DataBar Expanded Stacked  Composite Symbology       Ruled Line       166       Not supported       Appendix                   80 mm  Paper Cut Cut  Feed cut  Drawer Kick Out Supported  Buzzer Optional  Paper Layout Settings Not supported             167       TM T70 i                                        58 mm 80 mm   Interface Ethernet  Wireless LAN  Resolution 203 dpi x 203 dpi  W x H   Print Width 420 dots 576 dots  Characters in a Line Font A ANK  34 characters ANK  48 characters   Font B ANK  46 characters ANK  64 characters  Character Size Font A ANK  12 dots x 24 dots  W x H    Font B ANK  8 dots x 16 dots  W x H   Character Baseline Font A At the 21st dot from the top of the character   Font B At the 15th dot from the top of the character  Default Line Feed Space 30 dots  Color Specification First color       Page Mode Default Area    576 dots x 1662 dots  W x H        Page Mode Maximum Area    576 dots x 1662 dots  W x H        Raster image    Monochrome image                            Logo Monochrome image   Barcode UPC A  UPC E  EAN13  JAN13  EAN8  JAN8  CODE83  ITF   CODABAR  CODE93  CODE128   2D Code PDF417  QR Code   Ruled Line Not supported   Paper Cut Cut  Feed cut   Drawer Kick Out Supported   Buzzer Not supported   P
46. H  560 dots x 738 dots  W x H           Raster Image    Monochrome image  Two color image                   174       Logo Monochrome image  Two color image   To perform two color printing  change the settings of the printer  using the memory switch setting utility     Barcode UPC A  UPC E  EAN13  JAN13  EAN8  JAN8  CODE89  ITF  CODABAR   CODE93  CODE128   2D Code PDF417  QR Code  MaxiCode   Ruled Line Not supported   Paper Cut Cut  Feed cut       Appendix       Receipt Die cut Label                Drawer Kick Out Supported  Buzzer Not supported  Paper Layout Settings Not supported  With automatic setup mode           175       TM P20                                                                            58 mm  Interface Ethernet  Wi Fi  Resolution 203 dpi x 203 dpi  W x H   Print Width 384 dots  Characters in a Line Font A ANK  32 characters  Font B ANK  42 characters  Font C ANK  42 characters  Font D ANK  38 characters  Font E ANK  48 characters  Character Size Font A ANK  12 dots x 24 dots  W x H   Font B ANK  9 dots x 24 dots  W x H   Font C ANK  9 dots x 17 dots  W x H   Font D ANK  10 dots x 24 dots  W x H   Font E ANK  8 dots x 16 dots  W x H   Character Baseline Font A At the 21st dot from the top of the character  Font B At the 16th dot from the top of the character  Font C At the 16th dot from the top of the character  Font D At the 21st dot from the top of the character  Font E At the 15th dot from the top of the character  Default Line Feed Space 30 dots  Col
47. ICAL    An autocutter error occurred  A mechanical error occurred       EposCallbackCode ERR_EMPTY    No paper in roll paper end sensor          EposCallbackCode ERR_UNRECOVERABLE    An unrecoverable error occurred       EposCallbackCode ERR_FAILURE    The request document contains a syntax  error       EposCallbackCode ERR_NOT_FOUND    The printer with the specified device ID does  not exist       EposCallbackCode ERR_SYSTEM    An error occurred on the printing system       EposCallbackCode ERR_PORT    An error was detected on the  communication port       EposCallbackCode ER    R_TIMEOUT    A print timeout occurred       EposCallbackCode ER       R_JOB_NOT_FOUND      The specified job ID does not exist           EposCallbackCode ER    R_SPOOLER      There is not enough space available in the  printing queue           TM i firmware Ver 4 1 or later versions supported       e status  Sets printer status     Printer status    Printer ST_NO_RESPONSE    Chapter 4 API Reference    Description  No response from the TM printer       Printer ST_PRINT_SUCCESS    Printing complete Spooling complete       Printer ST_DRAWER_KICK    Status of the 3rd pin of the drawer kick out connector     H        Printer ST_BATTERY_OFFLINE  Printer ST_OFF_LINE    Battery offline status  Offline       Printer ST_COVER_OPEN    The cover is open       Printer ST_PAPER_FEED  Printer ST_WAIT_ON_LINE    Paper is being fed by a paper feed switch operation  Waiting to be brought back online       Printer ST_P
48. Inthe page mode  this API specification cannot be used   In the page mode  use the addTextPosition  p 86  to designate the horizontal print position                                Syntax  public void addTextAlign int align  throws EposException  Parameter  e align  Specifies the text alignment    Printer  ALIGN_LEFT  default  Alignment to the left  Printer  ALIGN_CENTER Alignment to the center  Printer  ALIGN_RIGHT Alignment to the right   Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156      EposException ERR_PARAM Invalid parameter was passed        EposException ERR_MEMORY Could not allocate memory        EposException ERR_FAILURE An unspecified error occurred     addTextLineSpace    Adas the line feed space setting to the command buffer                 Syntax  public void addTextLineSpace int linespc   throws EposException  Parameter  e linespc  Specifies the line feed space  in dots   Specifies an integer from O to 255     Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156      EposException ERR_PARAM Invalid parameter was passed        EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred                 Chapter 4 API Reference    addTextRotate    Adds the text rotation setting to the command buffer        When the page mode is selected for the print 
49. Level   Specifies the level of log data to be output     Log LOG_LOW   Low level    Exceptions    When processing failed  EposException of the following error status is generated   Acquire with getErrorStatus  p 156      EposException ERR_PARAM Invalid parameter was passed   EposException ERR_FAILURE An unspecified error occurred                       155    EposException class    getErrorStatus    Acquires error status when an exception of API provided by the ePOS Device SDK is thrown     Syntax    public int getErrorStatus    Return value    Returns error status set with API where an exception is generated     156    Chapter5 Sample Program       sample Program    This chapter describes how to use the sample program        including the Java source files     For an Android application for TM printers developed using ePOS Device SDK  the  following program is available     2   The sample program is provided as an Android application project for use with Eclipse              Functionality       T shirt  bag  T shirt  Jacket  Jeans  Pullover                         T shirt Bag       Subtotal   208 60    Total Change       Total   0    Out of   0       Change   0    The Sample Program has the following functionality   1 Connecting  Disconnecting with the TM i   1 Creation of the device object   d Reading barcode   A Displaying customer display   1 Printing of receipt   1 Acquiring printer status       1 Error processing    157    Usage Environment    Development Environment    
50. MORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred                 79    80    addTextFont    Adds the text font setting to the command buffer     Syntax    public void addTextFont int font  throws EposException                      Parameter  e font  Specifies the font    Printer FONT_A  default  Font A  Printer  FONT_B Font B  Printer  FONT_C Font C  Printer  FONT_D Font D  Printer  FONT_E Font E   Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156      EposException ERR_PARAM    Invalid parameter was passed        EposException ERR_MEMORY    Could not allocate memory        EposException ERR_FAILURE       An unspecified error occurred              Chapter 4 API Reference    addTextSmooth    Adds the smoothing setting to the command buffer     Syntax    public void addTextSmooth int smooth   throws EposException       Parameter  e smooth  Specifies whether to enable smoothing   Description    Printer  TRUE   Specifies smoothing     Printer FALSE  default  Cancels smoothing  Exceptions    When processing failed  EposException of the following error status is generated   Acquire with getErrorStatus  p 156            EposException ERR_PARAM Invalid parameter was passed   EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred                 81       82    addTextDouble    Adds the double sized text settin
51. Printer  HRI_ABOVE    Above the barcode       Printer  HRI_BELOW    Below the barcode             Printer  HRI_BOTH    Both above and below the barcode                   Chapter 4 API Reference                            e font  Specifies the HRI font    Printer  FONT_A default  Font A   Printer FONT_B Font B   Printer FONT_C Font C   Printer  FONT_D Font D   Printer  FONT_E Font E  e width  Specifies the width of each module in dots  Specifies an integer from 2 to 6   e height  Specifies the barcode height in dots  Specifies an integer from 1 to 255    Exceptions    When processing failed  EposException of the following error status is generated   Acquire with getErrorStatus  p 156            EposException ERR_PARAM Invalid parameter was passed   EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred                    95    96    addSymbol    Adds 2D Code printing to the command buffer        In page mode  a 2D Code is laid out in the current print position with the reference point being its  Q bottom left dot              Syntax    public void addSymbol  String data  int type  int level   int width  int height  int size   throws EposException    Parameter  e data  Specifies 2D Code data as a character string        Specify a string that follows the 2D Code standard specified by the type parameter  If the  Q specified string does not conform to the standard  a 2D Code will not be printed           2D Code type Descriptio
52. Printer SYMBOL_QRCODE_MODEL_2    QR Code Model 2       Printer  SYMBOL_QRCODE_MICRO      Micro AR Code       Printer  SYMBOL_MAXICODE_MODE_2    MaxiCode Mode 2       Printer  SYMBOL_MAXICODE_MODE_3    MaxiCode Mode 3       U    rinter  SYMBOL_MAXICODE_MODE_4    MaxiCode Mode 4       Printer  SYMBOL_MAXICODE_MODE_5    MaxiCode Mode 5       Printer SYMBOL_MAXICODE_MODE_6    MaxiCode Mode 6       U    rinter SYMBOL_GS1_DATABAR_STACKED    GS1 DataBar Stacked       Printer  SYMBOL_GS1_DATABAR_STACKED    _OMNIDIRECTIONAL    GS1 DataBar Stacked  Omnidirectional       Printer SYMBOL_GS1_DATABAR_EXPANDED    _STACKED    Printer  SYMBOL_AZTECCODE_FULLRANGE    GS1 DataBar Expanded Stacked    Aztec Code Full Range mode       Printer SYMBOL_AZTECCODE_COMPACT  rinter SYMBOL_DATAMATRIX_SQUARE    AU     Aztec Code Compact mode  DataMatrix ECC200 square       Printer  SYMBOL_DATAMATRIX_RECTANGLE_8    Printer  SYMBOL_DATAMATRIX_RECTANGLE_12    DataMatrix ECC200 rectangle  8 lines    DataMatrix ECC200 rectangle   12 lines             W    rinter SYMBOL_DATAMATRIX_RECTANGLE_16       DataMatrix ECC200 rectangle   16 lines               TM i firmware Ver 4 1 or la    er versions supported       e level     Chapter 4 API Reference    Specifies the error correction level                                                                          Q          Description  Printer  LEVEL_O PDF417 error correction level O  Printer LEVEL_1 PDF417 error correction level 1  Printer  LEVEL_2 PDF417 error correct
53. RIOD OxBE  Keyboard VK_0 0x30 Keyboard VK_S 0x53 Keyboard VK_OEM_2 OxBF  Keyboard VK_1 0x31 Keyboard VK_T 0x54 Keyboard VK_OEM_3 OxCO  Keyboard VK_2 0x32 Keyboard VK_U 0x55 Keyboard VK_OEM_4 OxDB  Keyboard VK_3 0x33 Keyboard VK_V 0x56 Keyboard VK_OEM_5 OxDC  Keyboard VK_4 0x34 Keyboard VK_W 0x57 Keyboard VK_OEM_6 OxDD  Keyboard VK_5 0x35 Keyboard VK_X 0x58 Keyboard VK_OEM_7 OxDE  Keyboard VK_6 0x36 Keyboard VK_Y 0x59 Keyboard VK_OEM_ATTN OxFO          165       Printer Specifications    TM T20ll i             80 mm  Interface Ethernet  Wireless LAN  Resolution 203 dpi x 203 dpi  W x H   Print Width 576 dots   42 Column Mode   546 dots        Characters in a Line Font A     42 Column Mode     ANK  48 characters     ANK  42 characters        Font B     42 Column Mode     ANK  64 characters     ANK  60 characters        Character Size Font A     42 Column Mode     ANK  12 dots x 24 dots  W x H         ANK  13 dots x 24 dots        Font B     42 Column Mode     ANK  9 dots x 17 dots  W x H         ANK  9 dots x 17 dots                 Character Baseline Font A At the 21st dot from the top of the character  Font B At the 16th dot from the top of the character   Default Line Feed Space 30 dots   Color Specification First color       Page Mode Default Area    576 dots x 831 dots  W x H        Page Mode Maximum Area    576 dots x 1662 dots  W x H        Raster Image    Monochrome image       Logo    Monochrome image       Barcode    UPC A  UPC E  EAN13  JAN13  EAN8  JAN8  CODE39   IT
54. ROCESSING Could not execute a process                 119    120    halftone property    Halftone processing method    Applied to monochrome  2 tones  printing of addimage  p 89    Syntax   Setter    public void setHalftone int halftone   throws EposException          Getter  public int getHalftone    Set Value  Printer  HALFTONE_DITHER  default  Dithering  suitable for printing graphics only   Printer HALFTONE_ ERROR DIFFUSION Error diffusion  suitable for printing text and graphics  together   Printer  HALFTONE_THRESHOLD Threshold  suitable for printing text only                 Exceptions    When processing failed  EposException of the following error status is generated   Acquire with getErrorStatus  p 156      Description    EposException ERR_PARAM   Invalid parameter was passed          Chapter 4 API Reference    brightness property    Brightness correction value   Applied when executing addlmage  p 89      Syntax  Setter  public void setBrightness double brightness   throws EposException  Getter  public double getBrightness    Set Value    A gamma value in the range 0 1 10 0 is specified for the brightness correction value   The default value is 1 0        When any value except for 1 0 is specified for the brightness correction value  the printing  Q speed gets slower              Exceptions    When processing failed  EposException of the following error status is generated   Acquire with getErrorStatus  p 156      Oo Emoratohie A DN A  EposException ERR_PARAM Invalid 
55. R_PROCESSING Could not execute a process                 Listener Interface    public interface GetCommHistoryListener  extends EventListener    Listener Registration Method    void onGetCommHistory   String ipAddress  int code   ArrayList lt HashMap lt String  String gt  gt  historyList   int sequence     Parameter  e ipAddress  Sets IP address of TM i   e code  Sets error status of processing results     EposCallbackCode SUCCESS   Successfully closed the Communication Box   EposCallbackCode   ERR_NOT_OPENED    EposCallbackCode   ERR_FAILURE       A Communication Box is not open     Other error occurred                 149    e historyList  Sets a communication history of Communication Box           historyList index   senderld Sender s memberlD   receiverld Receiver s memberlD   message Received message                 e sequence  Sets the same sequence number with a returned value to 1st parameter when this API is  executed     150    Chapter 4 API Reference    Sends a message to the Communication Box     Syntax    public void sendData String message  String memberld   int   sequence   SendDataListener target   throws EposException  Parameter  e message  Specifies the data to send to the Communication Box     e memberld  Specifies the destination member ID   If NULL or     space  is specified  it will be sent to all members in the Communication Box  except for the sender     e sequence  Sets a process sequence number when this API is executed   e target  This specifies the
56. Specifies the horizontal end position of the line  in dots    Specifies an integer from O to 65535    e y2  Specifies the vertical end position of the line  in dots    Specifies an integer from O to 65535              e style  Specifies the line type     Printer  LINE_THIN Solid line  Thin  Printer  LINE_MEDIUM Solid line  Medium  Printer LINE_THICK Solid line  Thick  Printer LINE_THIN DOUBLE Double line  Thin  Printer  LINE_MEDIUM_DOUBLE Double line  Medium  Printer LINE_THICK_DOUBLE Double line  Thick  Printer  PARAM_DEFAULT Solid line  Thin                                        Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156            EposException ERR_PARAM Invalid parameter was passed   EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred                 109    addCut    Adds paper cut to the command buffer  Sets paper cut        Not available in page mode     A             Syntax    public void addCut int type  throws EposException                         Parameter  e type  Specifies the paper cut type   O IO    Cut without feeding  Printer  CUT_NO_FEED         The paper is cut without being fed    Feed cut  Printer  CUT_FEED i rm E   The paper is fed to the cut position and then is cut    Cut reservation  Printer  CUT_RESERVE  Printing continues until the cut position is reached   at which the paper is cut      Feed cut  Printe
57. Ta A Aa ai 147  Ms COMMBOX  ClOSS 25055 iii A ai 149  GETCOMIMBISTORY rue ccsueresds datas a e ad 149  o otk aah EA eh A ae AES Raat TEES TA Se DAN BRT a NS 151  SETRECEIVEEVENTCAIIDOACK oe EE rr 153  M EDOSDeVICECLOG CICS iii catsiyexdeedetancepezesatacesaauecss 154  SSTLOQSSMMINGS  vrai iran 154  E EposExcepti  n class  iniciaran 156  OCTENOTSIGIUS aa a cria 156  Sample Program ia 157  E Functionality     omisiones 157  El Usage Environ Met   occcccnnccccnoncncnoncncnnnnnnccnnnnnnnnnn cnn nn T TNT 158  Development Environmentsraiwe ian deiahn as 158  REQUEST ASUME Si Atay aimee atin ante aa aa hae TN 158  Android  Devices ass Whidden dable 158  E Environment Seting    cicioioiconaionon nico canina rindiera 159  Setting the DEVICES    iii e rn id A A AE CA E 160  Installing the Sample PrOYQAM     Er renee nner 161  E How to Use the Sample Program             ccccccceeeeeeeeeceeeeeeeeeeeseaeeeeeseeeeeseeeeeseeaeeeeeeeeeeeseeeees 162  o A 162    Opera lO raro acepta ordeno aye Sth tenet imei lali cano IAS Dean a E E 164                10    Chapter  Overview    Overview    This chapter describes the features of and the specifications for ePOS Device SDK for Android     ePOS Device SDK          The ePOS Device SDK for Android is SDK for developers to develop Android application that controls various  peripheral devices connected to TM i  Application can be developed with API provided by the ePOS   Device SDK     The ePOS Device SDK also has the  ePOS Device SDK for iOS  for iOS
58. The functionality and the user friendli   ness is valued around the world        Seiko Epson Corporation 2014  All rights reserved     For Safety    Key to Symbols    The symbols in this manual are identified by their level of importance  as defined below  Read the following  carefully before handling the product           Provides information that must be observed to avoid damage to your equipment or a  NM malfunction   Q Provides important information and useful tips              Restriction of Use    When this product is used for applications requiring high reliability safety such as transportation devices  related to aviation  rail  marine  automotive etc   disaster prevention devices  various safety devices etc  or  functional precision devices etc  you should use this product only after giving consideration to including  fail safes and redundancies into your design to maintain safety and total system reliability  Because this  product was not intended for use in applications requiring extremely high reliability safety such as  aerospace equipment  main communication equipment  nuclear power control equipment  or medical  equipment related to direct medical care etc  please make your own judgment on this product s suitability  after a full evaluation     About this Manual    Aim of the Manual    This manual is intended to provide development engineers with all the information necessary for building   designing an ePOS Device system or developing designing an ePOS Device 
59. a de 73    BB Printer ClGSS tai A iO 74          SEMOD OIG A NN NN 74  GETPHINTIODSTOPUS ii Eds cacas 75  Els ACOMMAN ABU iia IA e AA da A Sui ad 75  ada TAM iia O lalola 76  GOATEXTLINGS HACE iva iria dE E da A nile lena den 76  elelo EARO Si a a TO Ana oa 77  AA Ai A J SU ai ee 78  oC CELIE IAO o a aa dc eee 79  AUTE TEO iii a avian Abies A A AN EET A ana 80  AAN MN dde Ei A lorca 8   GOATEXIDOUBIE iris ain AA IE IAG a TRA el PE ee a 82  IA CTSXTSIZ o o iaa 83  GOCTSXISHY 6   ivi a A O a naan wi dd alee 84  A eretcerhes thes ae aa a a aaa A uses anne E Aa E A DA 86  GOCTEXIV POSITION  area A E A T AE A eA BO TAT ALATA 86  eelere N NN 87  adas a a 87  COGFESOPOSIION ica a a aa 88  COGKSCO ii A as 88  OQOAIMGGQ Css wiii e dnde and cal a dado a a ele 89  COGLOG Oi rra rro asa 91  adaBdICO Sii ai Ad 92  ATAN MODO A il eed er A ne aa ints 96  GOGHLINGS adonde aia 101  ada Vine GI nia  onran a a A ON A ETT N 102  aaAdVLNSENA ti des 103  GOAPAGSBSOIN ite Aare Ie 104  COGPAGESEN Gisvavsise ised os Serre Raat aa 104  add Page Adina do 105  COGPAGEDISCTON iaa A daa 106  CIAGDPAGSPOSIION sdara roana ea aes Seas at ed ar A eames 107  COGPAGSLING cuca it rani aati Ai ei toda dar 108  GEAPAGERECTANG Osim tdi ora 109  add UA ee a ae anes 110  add Pla t   da 111  adaSoUn diana aida ada 112  AOL Oi AA AS aie Aa 114  CAUGCOMMGNG in did 117  ARE Y Atanas at el ee Aa ee he aaa te 117  GCOORESCM iw adava winndvraniwinaia iow E win di wieder isa 118  STOMIMONITON ia weeded as han ae ee are av id
60. ails  refer to How to Incorporate the ePOS Device SDK for Android  p 27      NQ                Device Class                               API Description  Device Initializes an ePOSDevice class  48  connect Establishes a communication path  49  disconnect Disconnects a communication path  50  isConnected Obtains communication path status  50  createDevice Obtains a device object  51  deleteDevice Deletes a device object  53  getAdmin Obtains the administrator information  54  getLocation Obtains the installation location information  54  getCommBoxManager Acquires CommBoxManager object 54  EREET nani  Sein the reconnection started event callback 55  setReconnectEyentcalBack Dee the reconnection completed event callback 56  ae iDeconnoctEveniCallback E the network disconnection event callback 57                   43    44    Display Class                                                 sendData Sends a control instruction  58  ClearCommancBuffer Clears the command buffers  58  reset Reset 59  createWindow Define the display area  60  destroyWindow Destroys the display area  61  setCurrentWindow Switches the display area  61  clearWindow Clears the current display area  62  setCursorPosition Moves the cursor position  62  moveCursorPosition Moves the cursor position in the current display area  63  setCursorlype Changes the cursor display  64  addtText Displays text  65  addReverseText Displays reversed text  66  addMarquee Displays marquee  67  setBlink Display blinking  68  s
61. ange   String ipAddress  String deviceld   int battery     Parameter  e ipAddress  Sets IP address of TM i   e deviceld  Sets Device ID   e battery  Sets battery status     129       130    setOnlineEventCallback    This registers a callback method that receives OnlineEvent          This API can be executed following execution of createDevice  p 51    Q e When this API is executed on multiple occasions  the notification destination method that is  specified afterwards is overwritten              Syntax    public void setOnlineEventCallback   OnlineListener target           Parameter  e target  This specifies the object  listener interface  that has the notification destination method   If NULL is specified for either the method or target  the notification destination registration is  Q nullified   Listener Interface    public interface OnlineListener extends EventListener    Listener Registration Method    void onPtrOnline String ipAddress  String deviceld     Parameter  e ipAddress  Sets IP address of TM i   e deviceld  Sets Device ID     Chapter 4 API Reference    setOfflineEventCallback    This registers a callback method that receives OfflineEvent          This API can be executed following execution of createDevice  p 51    Q e When this API is executed on multiple occasions  the notification destination method that is  specified afterwards is overwritten              Syntax    public void setOfflineEventCallback   Offlinelistener target           Parameter  e target  Th
62. aper Layout Settings Not supported       168       Appendix    TM T82I1 i             80 mm  Interface Ethernet  Wireless LAN  Resolution 203 dpi x 203 dpi  W x H   Print Width 576 dots   42 Column Mode   546 dots        Characters in a Line Font A     42 Column Mode     ANK  48 characters     ANK  42 characters        Font B     42 Column Mode     ANK  64 characters     ANK  60 characters        Character Size Font A     42 Column Mode     ANK  12 dots x 24 dots  W x H         ANK  13 dots x 24 dots        Font B     42 Column Mode     ANK  9 dots x 17 dots  W x H         ANK  9 cots x 17 dots                 Character Baseline Font A At the 21st dot from the top of the character  Font B At the 16th dot from the top of the character   Default Line Feed Space 30 dots   Color Specification First color       Page Mode Default Area    576 dots x 831 dots  W x H        Page Mode Maximum Area    576 dots x 1662 dots  W x H        Raster image    Monochrome image                            Logo Monochrome image   Barcode UPC A  UPC E  EAN13  JAN13  EAN8  JAN8  CODE39   ITF  CODABAR  CODE93  CODE128  GS1 128   GS1 DataBar Omnidirectional  6S1 DataBar Truncated   GS1 DataBar Limited  6S1 Databar Expanded   2D Code PDF417  QR Code  MaxiCode  6S1 DataBar Stacked   GS1 DataBar Stacked Omnidirectional   GS1 DataBar Expanded Stacked  Composite Symbology   Ruled Line Not supported   Paper Cut Cut  Feed cut   Drawer Kick Out Supported   Buzzer Optional   Paper Layout Settings Not supported 
63. application  by using TM i     The TM i series in this manual is a generic term for the following printers   e TM T20ll i e TM T70 i e TM T82ll i e TM T83Il i e TM T88V i    Manual Content    The manual is made up of the following sections     Chapter 1 Overview   Chapter 2 Building Environment   Chapter 3 Programming Guide   Chapter 4 API Reference   Chapter 5 Sample Program   Appendix List of KeyCode  Printer Specifications    Open Source License    Contents    MEF te     h iii a E E A EEE E 3  CAS O A O 3  E Restriction  Of USO cuicos 3  DM   ADOUTTDIS MQNUA a di   4  Aim or the Manta lia aaa 4  Manu a COteda a a a a a aaa a Rana ned haan 4  E COMEN iia i   5  OVO AEAN E E EEE ATAT 11  E EPOS Device SDK enana iaraa AAA i PaKa ii 11  ES urraca id a a a e a ra 11  System  Configuration EXIM Plesna adi  s 12  How to  Use The COMMUNICATION  BOX mirta ido ia ed 13  Specifying the Print Job ID from the APpliCOtiOn     ee rra rr 16  Poder FUNCTION sara dada dada lealtad 17  E Operating ENVITON Me Mb scscciscccscccccesiececesteeedccteetenced cvesccevesssccesutesenseenedeecesscsnsnrewestcaedenttereess 20  Android  Version aia da ath ania tara on iia ai acetic sidan aur aia in 20  ARO DM a dudsdd sala autates sduex E Ca gheragaunendeonsle castes 20  MeL ten rien Caticlan AAA ah aes ala Ta ee 20  ME m E ceasc2s sas A fabian chaaves nlgdteahsansha sen ean aden iavsakanaetautmeaaaeeaagat ise 21  Supported Peripheral DEVES avion aii   s ae 21  Development   O Y      08 0    8  ee 22  E 
64. ation Method    void onPtrCoverOpen String ipAddress  String deviceld     Parameter  e ipAddress  Sets IP address of TM i   e deviceld  Sets Device ID     Chapter 4 API Reference    setPaperOkEventCallback    This registers a callback method that receives PaperOkEvent        e This API can be executed following execution of createDevice  p 51    Q e When this API is executed on multiple occasions  the notification destination method that is  specified afterwards is overwritten              Syntax    public void setPaperOkEventCallback   PaperOkListener target           Parameter  e target  This specifies the object  listener interface  that has the notification destination method   If NULL is specified for either the method or target  the notification destination registration is  Q nullified   Listener Interface    public interface PaperOkListener extends EventListener    Listener Registration Method    void onPtrPaperOk String ipAddress  String deviceld     Parameter  e ipAddress  Sets IP address of TM i     e deviceld  Sets Device ID        135    136    setPaperNearEndEventCallback    This registers a callback method that receives PaperNearEndEvent        e When this API is executed on multiple occasions  the notification destination method that is    e This API can be executed following execution of createDevice  p 51    Q specified afterwards is overwritten              Syntax    public void setPaperNearEndEventCallback   PaperNearEndListener target                 Param
65. ation is ended    Log LOG  PERMANENT The seinge ci iE API are enabled even after  the application is ended    To specify period for the Log LOG_PERMANENT  set the permissions for the application  Q to access the storage    e enabled  Specifies whether to enable the log output function and the log output destination   Log LOG_DISABLE Disables the log output function   Log LOG_STORAGE Outputs log data to the device s storage   Log LOG_TCP Outputs log data over TCP     To specify enabled for the Log LOG_STORAGE  set the permissions for the application  Q to access the storage     To specify enabled for the Log LOG_TCP  set the permissions for the application to  access the network   e ipAddress   Specifies the IPv4 IP address for TCP communication   If either of the following values is specified for enabled  NULL can be specified for this  Q parameter     Log LOG_DISABLE    Log LOG_STORAGE             154    Chapter 4 API Reference    e port  Specifies the port number for TCP communication  Specifies an integer from O to 65 535        range     Log LOG_DISABLE    Log LOG_STORAGE    Even if either of the following values is specified for enabled  specify an integer within the          e logsize   Specifies the maximum size of log data that is saved on the device s storage  Specifies  an integer from 1 to 50  Unit MB         range     Log LOG_DISABLE    Log LOG_TCP    2 Even if either of the following values is specified for enabled  specify an integer within the             e log
66. ax    public void setBatteryLowEventCallback   BatteryLowListener target                 Parameter  e target  This specifies the object  listener interface  that has the notification destination method   If NULL is specified for either the method or target  the notification destination registration is  Q nullified   Listener Interface    public interface BatteryLowListener  extends EventListener    Listener Registration Method    void onPtrBatteryLow String ipAddress  String deviceld     Parameter  e ipAddress  Sets IP address of TM i   e deviceld  Sets Device ID     141       Scanner Class    setDataEventCallback    This registers a callback method that receives DataEvent        When this API is executed on multiple occasions  the notification destination method that is  Q specified afterwards is overwritten              Syntax  public void setDataEventCallback DataListener target                 Parameter  e target  This specifies the object  listener interface  that has the notification destination method   If NULL is specified for either the method or target  the notification destination registration is  Q nullified   Listener Interface    public interface DataListener extends EventListener    Listener Registration Method    void onScanData String ipAddress  String deviceld   String input     Parameter  e ipAddress  Sets IP address of TM i   e deviceld  Sets Device ID   e input  Sets detected character string     142    Chapter 4 API Reference    SimpleSerial Class    Sen
67. ay   Specify  1  or  2     e width  Specifies the window width    e height  Specifies the window height        e scrollMode  Specifies the window scroll mode from the following     C AL 10  BA    When characters are displayed while the display  position is at the Upper right end  the display  position moves to the lower left end  When  characters are displayed while the display position is  at the lower right end  the position moves to the  upper left end     Display  SCROLL_OVERWRITE    When characters are displayed while the display  position is at the upper right end  the display  position moves to the lower left end  When  Display SCROLL_VERTICAL characters are displayed while the display position is  at the lower right end  the characters already  displayed in the lower row are scrolled to the upper  row and the lower row is cleared        When characters are displayed while the display  position is at the right end  all the characters  Display SCROLL_HORIZONTAL   already displayed in the row where the cursor exists  are scrolled one character to the left and a new  character is displayed at the right end                 Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156            EposException ERR_PARAM Invalid parameter was passed   EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred                 60    Chapter 4 API Reference  
68. back  p 56   com epson eposdevice DisconnectListener   Network disconnected event onDisconnect  setDisconnectEventCallback  p 57    Display Object  Package  com epson eposdevice display     Event listener    Notification destination method       Notification destination registration API    com epson eposdevice display ReceiveListener       Control result received event onDspReceive  setReceiveEventCallback  p 70                 39    40    Keyboard Object    Package     Function    Key press detection event    com epson eposdevice keyboard   Event listener    Notification destination method  Notification destination registration API       com epson eposdevice keyboard KeyPressListener       onKbaKeyPress       setKeyPressEventCallback  p 72        Character string detection event       com epson eposdevice keyboard StringListener       onKbasString          setStringEventCallback  p 73                 Printer Object  The response document received event for acquiring the job ID is only compatible with TM i  AN firmware Ver 4 1 or later   Package  com epson eposdevice printer     Function       Response document received  event    Event listener    Notification destination method  Notification destination registration API    com epson eposdevice printer ReceiveListener       onPtrReceive       setReceiveEventCallback  p 124        Response document received  event  For acquiring the job ID     com epson eposdevice printer JobReceiveListener       onPtrReceive       setReceiveE
69. buzzer does not stop   l to 255 Number of repeats  Printer PARAM_DEFAULT One time                After    0    is specified for repeat  if you want to stop the buzzer  execute this API function and  Q specify Printer  PATTERN_NONE for pattern              112    Chapter 4 API Reference    e cycle  Specifies the buzzer sounding cycle  in units of milliseconds   Specifies an integer from 1 000 to 25 500     Exceptions       A sound of the buzzer is valid in Printer  PATTERN_1 to Printer  PATTERN_10              When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156      EposException ERR_PARAM Invalid parameter was passed        EposException ERR_MEMORY Could not allocate memory                 EposException ERR_FAILURE An unspecified error occurred           113    addLayout    Adds paper layout information to the command buffer        Setting of page layout must be done in the standard mode  In the page mode  addLayout cannot  NM be specified              Syntax    public void addLayout int type  int width  int height   int marginTop  int marginBottom   int offsetCut  int offsetLabel   throws EposException                         Parameter  e type  Specifies the paper type   Description  Printer  LAYOUT_RECEIPT Receipt  without black mark   Printer  LAYOUT_RECEIPT_BM Receipt  with black mark   Printer  LAYOUT_LABEL Die cut label  without black mark   Printer  LAYOUT_LABEL_BM Die cut label  with black mark   e wi
70. ce             public interface StringListener extends Eventlistener    Listener Registration Method       void onKbdString String ipAddress  String deviceld   String input  int prefix   Parameter  e ipAddress  Sets IP address of TM i   e deviceld  Sets Device ID   e input  Sets detected character string   e prefix  Sets a keycode determined as the beginning of character string     73    Printer Class    Sends an command buffer  The job ID can be specified before sending the command buffer          The results of executing this API will be returned to a setReceiveEventCallback  p 124    NH   Execution of this API results in the value of the force property  p 122  as Printer FALSE              Syntax    _l public void sendData   throws EposException        L     For acquiring the job ID    public void sendData String printJobld   throws EposException       The syntax used to specify job IDs is only compatible with TM i firmware Ver 4 1 or later   AN For details  refer to Specifying the Print Job ID from the Application  p 16         Parameter    e printJobld   Specify the print job ID   TM i firmware Ver 4 1 or later versions   1 to 30 alphanumeric characters  including underscores  hyphens and periods  may be  used     Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156                  EposException ERR_CONNECT Failed to communicate with a device   EposException ERR_PARAM Invalid parameter was 
71. ce printer PaperEndListener       onPtrPaperEnd       setPaperEndEventCallback  p 137        Drawer closed event    com epson eposdevice  printer  DrawerClosedListener          onPtrDrawerClosed          setDrawerClosedEventCallback  p 138        Drawer open event    com epson eposdevice printer  DrawerOpenListener       onPtrDrawerOpen       setDrawerOpenEventCallback  p 139        Battery low event    com epson eposdevice printer BatteryLowListener       onPtrBatteryLow       setBatteryLowEventCallback  p 141        Battery ok event       com epson eposdevice printer BatteryOkListener       onPtrBatteryOk          setBatteryOkEventCallback  p 140           Scanner Object    Package        Barcode data detection event    com epson eposdevice scanner   Event listener    Notification destination method  Notification destination registration API    com epson eposdevice scanner DataListener          onscanData          setDataEventCallback  p 142           41    42    SimpleSerial Object    Package  com epson eposdevice simpleserial     Event listener    Notification destination method    Notification destination registration API  com epson eposdevice simpleserial CommandReplyListener       Sent results of optional command  notification event       onSimpleSerialCommandReply          setCommandReplyEventCallback  p 144           CommboxManager Object    Package  com epson eposdevice commbox     Event listener  Function Notification destination method    Notification destination 
72. ch TM i     e Settings to enable the spooler       e Print process retry settings    Forwarding can be used to send a printing job to a different printer if the printer does not respond to retry  processing  For details  refer to Forwarding p 19      Example     lt Print Data gt     B           lt Printer A gt      lt Android device    A Send print data A to a TM i  ePOS Device Service I F  from the Android device     2 The TM i will save the print data A to the spooler and will return response data to  the Android device     3 The TM i will retrieve the print data and issue a print command to another TM i     17    18    OONO ao A    Print data B will be sent to the TM i from the input terminal     The TM i will save the print data B to the spooler and will return response data to  the Android device     The TM i will retrieve the print data B and issue a print command to printer A   Print data A is complete   A query on print data A results will be sent to the TM i from the Android device     The TM i will return response data back to the Android device signifying that print  data A completed without error     Chapter 1    Forwarding    Overview          EPSON TMNet WebConfig is used to configure forwarding settings  For details  refer to the  Q Technical Reference Guide for each TM i           AWN      al        lt Android device gt         lt Printer A gt   lt Printer B gt     Send print data to ePOS Device Service   F from the Android device    The TM i issues a print co
73. d sized characters  To print double sized height characters  specify a value  equal to or greater than 42 for y      To print a barcode   Specify the bottom left of the symbol  And specify the barcode height for y      To print a graphic logo   Specify the bottom left of the graphic data  And specify the graphic data height for y      To print a 2D Code   Specify the top left of the symbol  This can be omitted when printing from the top left     Q Specify the print start position  coordinates  according to the content to be printed  Refer to the                Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156      EposException ERR_PARAM Invalid parameter was passed        EposException ERR_MEMORY Could not allocate memory        EposException ERR_FAILURE An unspecified error occurred                 107    addPageLine    Adas line drawing in page mode to the command buffer  Draws a line in page mode     A      Use this API function by inserting it between addPageBegin  p 104  and addPageEnd  p 104         Diagonal lines cannot be drawn                 Syntax    public void addPageLine int x1  int yl  int x2  int y2   int style  throws EposException  Parameter  e xl  Specifies the horizontal start position of the line  in dots    Specifies an integer from O to 65 535   e yl  Specifies the vertical start position of the line  in dots    Specifies an integer from O to 65 535   e x2  Specifies th
74. dds drawing a rectangle in the page mode to A  addPageRectangle ihecommand buffer 09  addCut Adds paper cut to the command buffer  110   addPulse Adds drawer kick out to the command buffer  mW  addSound Adds turning on the buzzer to the command buffer  112  addLayout Adds the paper layout setup to command buffer 114  addCommand Adds a command to the command buffer  117  addRecovery Adds a tag for recovering from an error  117  addReset Adds a tag for resetting the printer  118                45       46                                                                         startMonitor Enables a status event  118  stopMonitor Disables a status event  118  aor Recovers from an error that can be recovered 119  from   reset Resets the printer  119  halftone property Raster image halftone processing method  120  brightness property Raster image brightness correction value  121  force property Forced transmission mode  122  timeout property Sending timeout time  123  interval property Printer status update interval  123  e Registers the receive response document event  setReceiveEventCallback ou mene 124  e Registers the job ID response document received  event callback method    setStatuschangeEventCallback Registers the status change event  128  co Seas Aenceen Olle    Registers the battery status change event callback 129  method   setOnlineEventCallback Registers the online event callback method  130  setOfflineEventCallback Registers the offline event callback method  131  s
75. ds a desired command     Syntax  public void sendCommand byte   data   throws EposException  Parameter  e data  Specifies a command in byte array   Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156      EposException ERR_PARAM Invalid parameter was passed   EposException ERR_CONNECT Could not communicate   EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred                          143       setCommandReplyEventCallback    This registers a callback method that receives CommandReplyEvent        When this API is executed on multiple occasions  the notification destination method that is  Q specified afterwards is overwritten              Syntax    public void setCommandReplyEventCallback   CommandRerplayListener target           Parameter  e target  This specifies the object  listener interface  that has the notification destination method   If NULL is specified for either the method or target  the notification destination registration is  Q nullified   Listener Interface    public interface CommandReplyListener  extends EventListener    Listener Registration Method    void onSimpleSerialCommandReply   String ipAddress   String deviceId  byte   data     Parameter  e ipAddress  Sets IP address of TM i   e deviceld  Sets Device ID   e data  Sets binary data of response data     144    Chapter 4 API Reference    CommBoxManager Class    openCo
76. dth  Specifies paper width  in units of 0 1 mm   Specifies an integer from 290 to 600   e height  Specifies paper height  in units of 0 1 mm    E EE  R   pt  RAR 0 Setup not necessary     without black mark        Distance from the top of                Receipt  with black mark  black mark to the top of  next black mark  Die cut label O  Auto  Distance from the top of   without black mark  284 to 1550  Manual    label to the top of next label  i Distance from the bottom of  Die cut label    black mark to the bottom of    IP mado next black mark                    e margin_top  Specifies top margin  in units of 0 1 mm      Paper Type Valid value range                   Receipt   without black mark  9 apor AR Pal  Dist f the t f  Receipt  with black mark     150 to 1500 dd  black mark  Die cut label Distance from the top of  to 1   without black mark  i label  Die euii label  15 to 1500 Distance from the bottom of   with black mark  black mark          Chapter 4 API Reference    e margin_bottom    Specifies bottom margin  in units of 0 1 mm      Paper Type Valid value range    R ipt  eceip 0     without black mark  Setup not necessary       Receipt  with black mark  0       Die cut label Distance from the bottom of        15t0 0 label feed directi   without black mark  i   label  paper feed direction  is a positive number   Distance from the top of  Die cut label e black mark  paper feed     with black mark  direction is a positive    number                    e offset_cut   Sp
77. e    public interface DrawerOpenListener  extends EventListener    Listener Registration Method    void onPtrDrawerOpen String ipAddress  String deviceld     Parameter  e ipAddress  Sets IP address of TM i   e deviceld  Sets Device ID     139       140    setBatteryOkEventCallback    This registers a callback method that receives BatteryOkEvent        e When this API is executed on multiple occasions  the notification destination method that is    e This API can be executed following execution of createDevice  p 51    Q specified afterwards is overwritten              Syntax    public void setBatteryOkEventCallback   BatteryOkListener target                 Parameter  e target  This specifies the object  listener interface  that has the notification destination method   If NULL is specified for either the method or target  the notification destination registration is  Q nullified   Listener Interface    public interface BatteryOkListener extends EventListener    Listener Registration Method    void onPtrBatteryOk String ipAddress  String deviceld     Parameter  e ipAddress  Sets IP address of TM i   e deviceld  Sets Device ID     Chapter 4 API Reference    setBatteryLowEventCallback    This registers a callback method that receives BatteryLowEvent        e When this API is executed on multiple occasions  the notification destination method that is      This API can be executed following execution of createDevice  p 51    Q specified afterwards is overwritten              Synt
78. e Android SDK r22  e Java Development Kit 7  e Eclipse    e ADT Plugin for Eclipse    Required device    e TM i  e Customer display    e Barcode scanner    Android Device    T Device that supports ARMv5TE    158    Chapter5 Sample Program    Environment Setting    The workflow of setting an environment for the sample program is shown as follows       Connecting a LAN cable    Connect a LAN cable to TM i     2  Connecting the device  Connect the device to use to TM i     3  setting the Devices  p  160   Configure the settings using EPSON TMNet WebConfig     4  Installing the Sample Program  p 161     Install the sample program to Android device        159       Setting the Devices    EPSON TMNet WebConfig can be launched from your web browser        For details on settings used  refer to the Technical Reference Guide for each TM i     NQ          The following devices must be configured for the operating environment using the sample program        11 Customer display    Setting   Setting Value  Customer Display Use          The device ID of the customer display is fixed to  local_display      NQ             1 POS keyboard       Device ID local_keyboard  Device name Select the relevant device from the list   Control Script Keyboard_Generic js                1 Barcode scanner          Device ID local_scanner  Device name Select the relevant device from the list   Control Script Scanner_Generic js                160    Chapter5 Sample Program    Installing the Sample Program    I
79. e Communication Box                  4 2   Adds Client B to members                      4 2   Adds Client C to members                6 1   Designates client to             Pi  forward the data to  Sends data               6 2   Message received event                                  Client C       45   setReceiveEventCallback    a    4  openCommBox          Opens the Communication Box               Forwards data                   4 3   callback SUCCESS      gt  dl    6 2   Message received event    25  setReceiveEventCallback                                  Forwards data       33                Client A             34       ePOS Device Client B             a A a a A E NS    7  closeCommBox                   7 1   Deletes Client C from members                 4    7   closeCommBox            l  Closes the Communication Box            7 1   Deletes Client B from members             7 2   callback SUCCESS                 Closes the Communication Box          7 1   Deletes Client A from members                      7 2   callback SUCCESS                        4    8   Ends the Communication Box                      Client C          7   closeCommBox          Closes the Communication Box       7 2   callback SUCCESS                  3 3     Chapter 3 Programming Guide    If automatically reconnecting the network    If network communication with the TM i was reconnected  the Communication Box sequence is as follows   A  Client  in the sequence figure refers to an application   
80. e Connected  false Not connected       Chapter 4 API Reference    createDevice    Obtains a device object to act as the interface with the device        A       When this API is successfully executed  the specified device is exclusively locked and  calling  createDevice  from a different browser returns  EposException ERR_IN_USE   The  printer is not locked exclusively and can obtain device objects with  createDevice  from  multiple browsers    If  createDevice  is executed immediately during a return process after an ondisconnect  event   EposException ERR_IN_USE  occurs  In this case  retry until a value other than   EposException ERR_IN_USE  is obtained           Syntax  public    Parameter    e deviceld     void createDevice   String deviceld  int deviceType   int crypto int buffer   CreateDeviceListener target   throws EposException    Specifies the device ID        x       e When specifying  Device  TYPE_DISPLAY  to the second parameter  deviceType    specify  local_display      When specifying  Device  TYPE_SIMPLE_SERIAL  to the second parameter          e devicelype     e crypto     e buffer     e target         deviceType   specify  local_serial    Specifies any of the following device types   Device TYPE_PRINTER Specifies the printer for the device type        ifies th t isplay for th  Device  TYPE DISPLAY Specifies the customer display for the          device type   Device TYPE_KEYBOARD Specifies the keyboard for the device type   Device TYPE_SCANNER Specifies the 
81. e horizontal end position of the line  in dots    Specifies an integer from O to 65 535   e y2  Specifies the vertical end position of the line  in dots    Specifies an integer from O to 65 535           e style  Specifies the line type     Printer  LINE_THIN Solid line  Thin  Printer LINE_MEDIUM Solid line  Medium  Printer LINE_THICK Solid line  Thick  Printer LINE_THIN_DOUBLE Double line  Thin  Printer  LINE_MEDIUM_DOUBLE Double line  Medium  Printer LINE_THICK_DOUBLE Double line  Thick  Printer  PARAM_DEFAULT Solid line  Thin                                     Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156            EposException ERR_PARAM Invalid parameter was passed   EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred                 108    Chapter 4 API Reference    addPageRectangle    Adds rectangle drawing in page mode to the command buffer  Draws a rectangle in page mode     Q    Syntax       Use this API function by inserting it between addPageBegin  p 104  and addPageEnd  p 104               public void addPageRectangle   int x1  int yl  int x2  int y2  int style   throws EposException    Parameter   e xl  Specifies the horizontal start position of the line  in dots    Specifies an integer from O to 65535    e yl  Specifies the vertical start position of the line  in dots    Specifies an integer from O to 65535    e x2  
82. e timeout within the range of O to 600 000   The default value is 10 000     Exceptions    When processing failed  EposException of the following error status is generated   Acquire with getErrorStatus  p 156      Description    EposException ERR_PARAM   Invalid parameter was passed       interval property    Specifies the interval of upgrading the status           Syntax  Setter    public void setInterval int interval   throws EposException    Getter  public int getInterval    Set Value    Specifies the interval to update the status within the range of 1 000 to 6 000   The default value is 3 000     Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156        EposException ERR_PARAM   Invalid parameter was passed          123    124    setReceiveEventCallback    Registers a callback method that receives the response document received event        e When this API is executed on multiple occasions  the notification destination method that is      This API can be executed following execution of createDevice  p 51    NS specified afterwards is overwritten              Syntax    public void setReceiveEventCallback   Receivelistener target     Parameter    e target  This specifies the object  listener interface  that has the notification destination method           If NULL is specified for either the method or target  the notification destination registration is  Q nullified   Listener Interface    Ll
83. e with getErrorStatus  p 156         EposException ERR_PARAM Invalid parameter was passed   EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred                 101    102    addVLineBegin    Adds the beginning of vertical line to the command buffer  Starts to draw vertical lines       Not available in page mode     2 Vertical lines are drawn until their end is specified by addVLineEnd  p 103   Use this API function          with addVLineEnd              Syntax    public void addVLineBegin int x  int style   throws EposException                         Parameter  e x  Specifies the start position of the vertical line  in dots    Specifies an integer from O to 65535   e style  Specifies the line type   Printer  LINE_THIN Solid line  Thin  Printer LINE_MEDIUM Solid line  Medium  Printer LINE_THICK Solid line  Thick  Printer LINE_THIN_DOUBLE Double line  Thin  Printer  LINE_MEDIUM_DOUBLE Double line  Medium  Printer LINE_THICK_DOUBLE Double line  Thick  Printer PARAM_DEFAULT Solid line  Thin  Exceptions    When processing failed  EposException of the following error status is generated   Acquire with getErrorStatus  p 156            EposException ERR_PARAM Invalid parameter was passed   EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred                 Chapter 4 API Reference    addVLineEnd    Adds the end of vertical line to the command buffer  Finishes drawing vert
84. ecifies cut position  in units of 0 1 mm    In case of die cut label paper  it is a distance from the bottom of label     When a paper has black mark  it is a distance from the beginning of black mark     Paper Type Valid value range    Receipt    0 Setup not necessar   without black mark  P y                Distance from the top of  Receipt  with black mark   290 to 50 black mark to the cutting   position  Die cut label Oto 50 Distance from the bottom of   without black mark  label to the cutting position  Die cut abel 0 40 50 la   with black mark  a   position                      e offset_label  Specifies label bottom position  sd  per 0 1 mm unit     Paper Type Valid value range    Receipt 0   without black mark        Receipt  with black mark  0 Setup not necessary       Die cut label    0   without black mark        Distance from the top of  black mark to the bottom of  label    Die cut label     with black mark  ls                   Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156      EposException ERR_PARAM    Invalid parameter was passed        EposException ERR_MEMORY    Could not allocate memory           EposException ERR_FAILURE       An unspecified error occurred        115       116    Detailed description    See below for the parameters that can be specified for each type of paper  and the positions for those    parameters       Mark   Parameter                               
85. eption of the following error status is generated     Acquire with getErrorStatus  p 156      EposException ERR_MEMORY Could not allocate memory        EposException ERR_FAILURE An unspecified error occurred     addPageEnd    Adds the end of page mode to the command buffer  The page mode process ends     x    Syntax                   Use this API function with addPageBegin  p 104         public void addPageEnd   throws EposException  Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156      EposException ERR_MEMORY Could not allocate memory                 EposException ERR_FAILURE An unspecified error occurred        104    Chapter 4 API Reference    addPageArea    Adds the print area in page mode to the command buffer   Specifies the print area in page mode  coordinates   After this API function  specify a print data API function  such as the adaText  p 78         Specify a print area to cover the content to be printed  If the print data extends beyond the print  area  the print result will be such that the print data has been printed incompletely        Q Use this API function by inserting it between addPageBegin  p 104  and addPageEnd  p 104               Syntax    public void addPageArea int x  int y  int width   int height  throws EposException    Parameter   e x  Specifies the origin of the horizontal axis  in dots    Specifies an integer from O to 65 535  O is the left end of the printer 
86. es the information that a reconnection process has started        When this API is executed on multiple occasions  the notification destination method that is  Q specified afterwards is overwritten              Syntax    public void setReconnectingEventCallback   ReconnectingListener target           Parameter  e target  This specifies the object  listener interface  that has the notification destination method   If NULL is specified for either the method or target  the notification destination registration is  Q nullified   Listener Interface    public interface ReconnectingListener  extends EventListener    Listener Registration Method    void onReconnecting String ipAddress     Parameter  e ipAddress  Sets IP address of TM i     55       56    setReconnectEventCallback    This registers a callback method that receives the information that a reconnection process has ended        When this API is executed on multiple occasions  the notification destination method that is  Q specified afterwards is overwritten              Syntax    public void setReconnectEventCallback   ReconnectListener target           Parameter  e target  This specifies the object  listener interface  that has the notification destination method   If NULL is specified for either the method or target  the notification destination registration is  Q nullified   Listener Interface    public interface ReconnectListener extends EventListener    Listener Registration Method    void onReconnect  String ipAddres
87. etBrightness Changes the display brightness  68  showClock Displays the clock  69  addCommand Executes a command  69  setReceiveEventCallback   Registers the control result receive event callback method  70                Keyboard Class    API                   setPrefix Specifies the conditions for handling input as a series of strings  Ed  setKeypressEventCallback Registers the key press detection event callback method  72  setStringEventCallback Registers the string detection event callback method  1a       Printer Class                   API   e Sends a print document    sendData e Specifies the job ID and sends the print 74   document      getPrintJobStatus   Acquires print job status  75   clearCommandBuffer Clears the command buffers  73   addTextAlign Adds the text alignment settings to the command 76  buffer   A the line f tti to th   addTextLineSpace dds the line feed space settings to the command 76  buffer    Guaiodeoiate Adds the text rotation print settings to the 77  command buffer    adalText Adds text printing to the command buffer  78                         Chapter 4 API Reference                                                                                                       API  PIETE Adds the target language settings to the 79  command buffer   addTextFont Adds the text font settings to the command buffer  80  oema Adds the text smoothing settings to the command 81   buffer   addTextDouble Adds the double sized text settings to the 82  command buffe
88. etPowerOffEventCallback dol the non response event callback 132  setCoverOkEventCallback Registers the cover close event callback method  iso  setCoverOpenEventCallback Registers the cover open event callback method  134  ERIE e Calle  See the paper remaining event callback 135  setPaperNearEndEventCallback cae ine PODS Rec  E 136  setPaperEndEventCallback Registers the paper end event callback method  137  setDrawerClosedEventCallback Registers the drawer close event callback method  138  setDrawerOpenEventCallback Registers the drawer open event callback method  139  setBatteryOkEventCallback Registers the battery ok event callback method  140  setBatteryLowEventCallback Registers the battery low event callback method  141                      TM i firmware Ver 4 1 or later versions supported    Scanner Class    API    setDataEventCallback    Description      Registers the barcode data detection event callback method       142         Chapter 4 API Reference    SimpleSerial Class    sendCommand Sends a command  143  Registers the command sending result notification event  callback method     CommBoxManager Class    openCommBox Opens the Communication Box  145  closeCommBox Closes the Communication Box  147    CommBox Class    getCommhistory Acquires the message transfer history  149  sendData Sends a message to the Communication Box  151       setCommandreplyEventCallback 144                                           Registers the notifies that the message in the Communicat
89. eter  e target  This specifies the object  listener interface  that has the notification destination method   If NULL is specified for either the method or target  the notification destination registration is  Q nullified   Listener Interface    public interface PaperNearEndListener  extends EventListener    Listener Registration Method    void onPtrPaperNearEnd String ipAddress   String deviceld     Parameter  e ipAddress  Sets IP address of TM i   e deviceld  Sets Device ID     Chapter 4 API Reference    setPaperEndEventCallback    This registers a callback method that receives PaperEndEvent          This API can be executed following execution of createDevice  p 51    Q e When this API is executed on multiple occasions  the notification destination method that is  specified afterwards is overwritten              Syntax    public void setPaperEndEventCallback   PaperEndListener target           Parameter  e target  This specifies the object  listener interface  that has the notification destination method   If NULL is specified for either the method or target  the notification destination registration is  Q nullified   Listener Interface    public interface PaperEndListener extends EventListener    Listener Registration Method    void onPtrPaperEnd String ipAddress  String deviceld     Parameter  e ipAddress  Sets IP address of TM i     e deviceld  Sets Device ID        137    setDrawerClosedEventCallback    This registers a callback method that receives DrawerClosedEvent  
90. fies the language to display the string from the following   Description    Display LANG_EN Default    Specifies English for the display language          Display LANG_JA Specifies Japanese for the display language     When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156      Exceptions          EposException ERR_PARAM Invalid parameter was passed   EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred                 67    68    Adds the screen blinking settings to the command buffer     Syntax  public void setBlink int interval  throws EposException  Parameter  e interval  Specifies the blinking time  ms   Specify a number between 0 and 12700   The specified values are rounded in units of 50ms  When  0  is specified  the display lights  on   Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156            EposException ERR_PARAM Invalid parameter was passed   EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred                 setBrightness    Adds the customer display brightness settings to the command buffer     Syntax    publice void setBrightness int brightness   throws EposException     Parameter    e brightness  Specifies the customer display brightness level by selecting from the following              Description
91. from 1 to 8 Horizontal scale  default   1   Printer  PARAM_UNSPECIFIED Retains the current setting for the horizontal  scale   e height  Specifies the vertical scale of text   Description    Integer from 1 to 8   Vertical scale  default   1     Printer PARAM_UNSPECIFIED Retains the current setting for the vertical scale   If Printer  PARAM_UNSPECIFIED is specified for all parameters  this returns  Q EposException ERR_PARAM as the return value   Exceptions 4  When processing failed  EposException of the following error status is generated        Acquire with getErrorStatus  p 156            EposException ERR_PARAM Invalid parameter was passed   EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred                 83    addTextStyle    Adds the text style setting to the command buffer     Syntax    public void addTextStyle int reverse  int ul  int em   int color  throws EposException                                                          Parameter  e reverse   Specifies inversion of black and white for text   II CI  Printer TRUE Specifies the inversion of black and white parts  of characters   Printer FALSE  default  Cancels the inversion of black and white parts  of characters   Printer  PARAM_UNSPECIFIED Retains ha current setting for inversion of black  and white   e ul  Specifies the underline style   INS E CS  Printer TRUE Specifies underlining   Printer FALSE  default  Cancels underlining   Printer PARAM_UNSPECIFIED
92. g to the command buffer     Syntax    public void addTextDouble int dw  int dh   throws EposException                         Parameter  e dw  Specifies the double sized width   Description  Printer TRUE Specifies the double sized width   Printer FALSE  default  Cancels the double sized width  Printer  PARAM_UNSPECIFIED Retains the current setting for double sized width   e dh  Specifies the double sized height   Description  Printer  TRUE 1 Specifies the double sized height  Printer  FALSE O  default  Cancels the double sized height  Printer  PARAM_UNSPECIFIED Retains the current setting for double sized height                characters are printed      IfPrinter PARAM_UNSPECIFIED is specified for all parameters  this returns  EposException ERR_PARAM as the return value     2   When Printer  TRUE is set for both the dw and dh parameters  double width and height             Exceptions    When processing failed  EposException of the following error status is generated   Acquire with getErrorStatus  p 156            EposException ERR_PARAM Invalid parameter was passed   EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred                 Chapter 4 API Reference    addTextSize    Adds the text scale setting to the command buffer     Syntax    public void addTextSize int width  int height   throws EposException                                  Parameter  e width  Specifies the horizontal scale of text   Description  Integer 
93. h binary data   Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156      EposException ERR_PARAM Invalid parameter was passed        EposException ERR_MEMORY Could not allocate memory        EposException ERR_FAILURE An unspecified error occurred                 69    setReceiveEventCallback    This registers a callback method that receives the information that the resoonse document received event        When this API is executed on multiple occasions  the notification destination method that is    Q specified afterwards is overwritten     Syntax             public void setReceiveEventCallback   ReceiveListener target     Parameter  e target  This specifies the object  listener interface  that has the notification destination method        If NULL is specified for either the method or target  the notification destination registration is    Q nullified        Listener Interface    public interface ReceiveListener extends EventListener    Listener Registration Method    void onDspReceive String ipAddress  String deviceld   int success int code              Parameter  e ipAddress  Sets IP address of TM i   e deviceld  Sets Device ID   e success  Sets execution results of display     Display  TRUE   Process succeeded     Display FALSE Process failed   e code  Sets execution results of process   EposCallbackCode SUCCESS Processing was successful   EposCallbackCode ERR_NOT_FOUND Device is not found   
94. h dot from the top of the character   Default Line Feed Space 30 dots   Color Specification First color       Page Mode Default Area    420 dots x 831 dots  W x H     576 dots x 831 dots  W x H        Page Mode Maximum Area    Raster Image    420 dots x 1662 dots  W x H     Monochrome image       576 dots x 1662 dots  W x H                                Logo Monochrome image   Barcode UPC A  UPC E  EAN13  JAN13  EAN8  JAN8  CODE39   ITF  CODABAR  CODE93  CODE128  GS1 128   GS1 DataBar Omnidirectional  GS1 DataBar Truncated   GS1 DataBar Limited  GS1 Databar Expanded   2D Code PDF417  QR Code  MaxiCode  6S1 DataBar Stacked   GS1 DataBar Stacked Omnidirectional   GS1 DataBar Expanded Stacked  Composite Symbology   Ruled Line Not supported   Paper Cut Cut  Feed cut   Drawer Kick Out Supported   Buzzer Optional   Paper Layout Settings Not supported          Appendix    TM T70                                     80 mm  Interface Ethernet  Wireless LAN  Resolution 180 dpi x 180 dpi  W x H   Print Width 512 dots  Characters in a Line Font A ANK  42 characters  Font B ANK  56 characters  Character Size Font A ANK  12 dots x 24 dots  W x H   Font B ANK  9 dots x 17 dots  W x H   Character Baseline Font A At the 21st dot from the top of the character  Font B At the 15th dot from the top of the character  Default Line Feed Space 30 dots  Color Specification First color       Page Mode Default Area    512 dots x 1662 dots  W x H        Page Mode Maximum Area    512 dots x 1662 dots  W x
95. h dot from the top of the character  Default Line Feed Space 30 dots  Color Specification First color  Page Mode Default Area 576 dots x 1662 dots  W x H   Page Mode Maximum Area 576 dots x 1662 dots  W x H   Raster Image Monochrome image  Logo Monochrome image  Barcode UPC A  UPC E  EAN13  JAN13  EAN8  JAN8  CODE39   ITF  CODABAR  CODE93  CODE128  GS1 128   GS1 DataBar Omnidirectional  6S1 DataBar Truncated   GS1 DataBar Limited  6S1 Databar Expanded  2D Code PDF417  QR Code  MaxiCode  Data Matrix  Aztec Code   GS1 DataBar Stacked   6S1 DataBar Stacked Omnidirectional   GS1 DataBar Expanded Stacked  Composite Symbology  Ruled Line Not supported  Paper Cut Feed  Drawer Kick Out Not supported  Buzzer Optional  Paper Layout Settings Supported                180    Appendix    TM T20       58 mm 80 mm                                  Interface Ethernet  Resolution 203 dpi x 203 dpi  W x H   Print Width 420 dots 576 dots  Characters in a Font A ANK  35 characters  ANK  48 characters  Line  Font B ANK  46 characters ANK  64 characters  Character Size Font A ANK  12 dots x 24 dots  W x H   Font B ANK  9 dots x 17 dots  W x H   Character Font A At the 21st dot from the top of the character  Baseline  Font B At the 16th dot from the top of the character  Default Line Feed Space 30 dots  Color Specification First color       Page Mode Default Area    420 dots x 831 dots  W x H  576 dots x 831 dots  W x H        Page Mode Maximum Area    420 dots x 1662 dots  W x H  576 dots x 1662 dot
96. hen processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156            EposException ERR_PARAM Invalid parameter was passed   EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred                    63    64    setCursorType    Adds the cursor display settings to the command buffer                    Syntax  public void setCursorType int type  throw EposException  Parameter  e type  Specifies the cursor display method by selecting from the following   Display  CURSOR_NONE No cursor display  Display  CURSOR_UNDERLINE Underline  Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156      EposException ERR_PARAM    Invalid parameter was passed        EposException ERR_MEMORY    Could not allocate memory           EposException ERR_FAILURE       An unspecified error occurred           Chapter 4 API Reference    addText    Adds string display to the command buffer     Syntax    LI public void addText String data  throws EposException           public void addText  String data  int lang   throws EposException    Y public void addText  String data  int x  int y   throws EposException    l public void addText  String data  int x  int y   int lang  throws EposException                      Parameter  e data  Specifies the string to be displayed   e lang  Specifies the language to display the str
97. hirt Bag       3 The screen shown below appears  Enter IP address of TM i and click  Connect    IP Address    192 168 192 168    Connect       162    Chapter5 Sample Program    4 Create a device object following the next steps     1  Enter  local_printer  in  Printer ID  and click  Connect    2  Enter  local_display  in  Display ID  and click  Connect    3  Enter  local_scanner  in  Scanner ID  and click  Connect      Printer ID    local_printer    Display ID    local_display    Scanner ID    local_scanner    5 Click  Back         163    164    T shirt  bag  T shirt  Jacket  Jeans  Pullover                         T shirt Bag    Subtotal   208 60    Total Change       Total   0    Out of   0    Change   0    Print a receipt following the next steps        al    Start the sample program  For details  refer to Environment Setting  p 159    Set the sample program  For details  refer to Setting  p 162      Register a product following the next steps    Once registered  the product and price are displayed in the customer display   e Click  T shirt    e Click  Bag    e Read the barcode with a barcode scanner           Barcodes of products can be obtained in PDF of the sample program  Print and use it        N       Click  Total Change      The total price is displayed in the customer display     Enter deposits in  Out of       Click  Total Change      The change is displayed in the customer display and a receipt is printed     Appendix       Appendix    List of KeyCode             
98. ical lines       Not available in page mode       Use this API function with addVLineBegin  p 102                     Syntax    public void addVLineEnd int x  int style   throws EposException                            Parameter  e x  Specifies the end position of the vertical line  in dots   Specifies an integer from O to  65535   e style  Specifies the type of the line you want to finish drawing   Printer  LINE_THIN Solid line  Thin  Printer LINE_MEDIUM Solid line  Medium  Printer LINE_THICK Solid line  Thick  Printer LINE_THIN_DOUBLE Double line  Thin  Printer  LINE_MEDIUM_DOUBLE Double line  Medium  Printer LINE_THICK_DOUBLE Double line  Thick  Printer  PARAM_DEFAULT Solid line  Thin  Exceptions    When processing failed  EposException of the following error status is generated   Acquire with getErrorStatus  p 156            EposException ERR_PARAM Invalid parameter was passed   EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred                 103    addPageBegin    Adds the switching to page mode to the command buffer  The page mode process starts        If using addlmage  p 89  or addLogo  p 91  in page mode  printing in multiple tones is not    AN supported     Vertical lines are processed in page mode until their end is specified by addPageEnd  p 104      3 Use this API function with PageEnd     Syntax                public void addPageBegin   throws EposException  Exceptions    When processing failed  EposExc
99. ice object  Device TYPE_PRINTER EposPrinter  Device TYPE_DISPLAY EposDisplay       Device TYPE_KEYBOARD    EposKeyboard       Device  TYPE_SCANNER    EposScanner          Device TYPE_SIMPLE_SERIAL       EpossimpleSerial       e code     52    Sets error status of processing results     EposCallbackCode SUCCESS    Description  Obtained the device object successfully        EposException ERR_CONNECT    Could not communicate        EposCallbackCode ERR_NOT_FOUND    Device is not found        EposCallbackCode ERR_IN_USE    Device is in use        EposCallbackCode ERR_OPEN    Failed to open the device        EposCallbackCode ERR_TYPE_INVALID    Invalid device type           EposCallbackCode ERR_FAILURE       Other error occurred           Chapter 4 API Reference    deleteDevice    Releases a device to be available from other clients     Syntax    public void deleteDevice  Object deviceObject   DeleteDeviceListener target   throws EposException    Parameter  e deviceObject Specifies the device object   e target  This specifies the object  listener interface  that has the notification destination method     Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156               EposException ERR_PARAM Invalid parameter was passed   EposException ERR_CONNECT Could not communicate    EposException ERR_FAILURE An unspecified error occurred   EposException ERR_PROCESSING Could not execute a process              
100. ing from the following   Description  Display LANG_EN Default  Specifies English for the display language   Display  LANG_JA Specifies Japanese for the display language   e x  Specifies the x coordinate of the display position  Specify a number between 1 and 20   e y  Specifies the y coordinate of the display position  Specify  1  or  2    Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156            EposException ERR_PARAM Invalid parameter was passed   EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred                 65    66    addReverseText    Adds reversed string display to the command buffer     Syntax    L  public    LJ public    L  public    L  public    Parameter  e data     e lang     ex  e y   Exceptions    void addReverseText  String data   throws EposException    void addReverseText  String data  int lang   throws EposException    void addReverseText  String data  int x  int y     throws EposException    void addReverseText  String data  int x  int y   int lang  throws EposException    Specifies the string to be displayed   Specifies the language to display the string from the following     Display _LANG_EN Default  Specifies English for the display language              Display _LANG_JA Specifies Japanese for the display language           Specifies the x coordinate of the display position  Specify a number between 1 and 
101. ion  Box was received event callback method     Log Class      setLogSettings   Sets the log output function    154      EposException Class    getErrorStatus Acquires error status when an exception is thrown  156    EposCallbackCode Class    Class that has a constant of error status passed to the notification destination method of callback     setReceiveEventCallback 183                         47    Device Class    Device    Initialize a Device class instance     Syntax  public Device Context context  throws EposException  Parameter  e context  Specifies the context of the application   This parameter is not designated if the log output function is not used   Exceptions    When processing failed  EposException of the following error status is generated   Acquire with getErrorStatus  p 156        EposException ERR_MEMORY   Could not allocate memory          48    Chapter 4 API Reference    Establishes a communication path to ePOS Device Service l F of TM i     Syntax    public void connect String ipAddress   ConnectListener target  throws EposException    Parameter   e ipAddress  Specifies the IP address of TM i    e target  This specifies the object  listener interface  that has the notification destination method   Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156      EposException ERR_PARAM Invalid parameter was passed        Attempted to restart communication for a device that    EposE t
102. ion ERR_ILLEGAL  poses pan ear LE already started communication     EposException ERR_MEMORY Could not allocate memory        EposException ERR_FAILURE An unspecified error occurred   EposException ERR_PROCESSING   Could not execute a process                 Listener Interface  public interface ConnectListener extends EventListener       Listener Registration Method    void onConnect  String ipAddress  int code     Parameter  e ipAddress  Sets IP address of TM i   e code  Sets error status of processing results     EposCallbackCode SUCCESS Connected successfully   EposCallbackCode ERR_TIMEOUT   A timeout occurred                    49    50    Disconnects the communication path connected with  connect      Syntax  public void disconnect   throws EposException    Exceptions    When processing failed  EposException of the following error status is generated   Acquire with getErrorStatus  p 156      This API I h ication hasn t b  EposException ERR_ILLEGAL is was called when communication hasn t been          started   EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred        EposException ERR_PROCESSING Could not execute a process     Obtains status of the communication path connected with connect  p 49                     If the terminal goes to sleep  the returned value may not be the correct value              Syntax  public boolean isConnected      Return value    The connection status of the communication path    tru
103. ion level 2  Printer  LEVEL_3 PDF417 error correction level 3  Printer  LEVEL_4 PDF417 error correction level 4  Printer LEVEL_5 PDF417 error correction level 5  Printer LEVEL_6 PDF417 error correction level 6  Printer LEVEL_7 PDF417 error correction level 7  Printer LEVEL_8 PDF417 error correction level 8  Printer  LEVEL_L QR Code error correction level L  Printer LEVEL_M QR Code error correction level M  Printer  LEVEL_0 QR Code error correction level Q  Printer LEVEL_H QR Code error correction level H  Integer from 5 to 95 Aztec Code error correction level  Default  23   Printer LEVEL_DEFAULT Default level    Select the level according to the 2D Code type   e For MaxiCode and two dimensional GS1 DataBar  select Printer  LEVEL DEFAULT   e Micro QR Code does not support Printer  LEVEL_H        e width     e height     Specifies the module width  Specifies an integer from O to 255     2D Code type Valid value range Default value                      PDF417 2to8 3  QR Code 3to 16 3  MaxiCode Ignored   2D 6S1 Databar 2to 8 2  Aztec Code 2to16 3  DataMatrix 210 16 3                   Specifies the module height  Specifies an integer from O to 255     2D Code type Valid value range Default value             2to 8  dd  Magnification for width   QR Code  MaxiCode  2D EST Databar   Ignored  Aztec Code  DataMatrix                99                                  e size  Specifies the 2D Code maximum size  Specifies an integer from O to 65 535   2D Code type Default value  PDFA17 0 
104. is specifies the object  listener interface  that has the notification destination method   If NULL is specified for either the method or target  the notification destination registration is  Q nullified   Listener Interface    public interface OfflineListener extends EventListener    Listener Registration Method    void onPtrOffline String ipAddress  String deviceld     Parameter  e ipAddress  Sets IP address of TM i     e deviceld  Sets Device ID        131    132    setPowerOffEventCallback    This registers a callback method that receives PowerOffEvent        e This API can be executed following execution of createDevice  p 51    Q e When this API is executed on multiple occasions  the notification destination method that is  specified afterwards is overwritten              Syntax    public void setPowerOffEventCallback   PowerOffListener target           Parameter  e target  This specifies the object  listener interface  that has the notification destination method   If NULL is specified for either the method or target  the notification destination registration is  Q nullified   Listener Interface    public interface PowerOffListener extends EventListener    Listener Registration Method    void onPtrPowerOff  String ipAddress  String deviceld     Parameter  e ipAddress  Sets IP address of TM i   e deviceld  Sets Device ID     Chapter 4 API Reference    setCoverOkEventCallback    This registers a callback method that receives CoverOkEvent          This API can be executed
105. may obtain a copy of the License at  http   www apache org licenses LICENSE 2 0    Unless required by applicable law or agreed to in writing  software distributed under the License is distrib   uted on an  AS IS  BASIS  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND  either express or implied     See the License for the specific language governing permissions and limitations under the License     190    
106. mmBox    Opens the Communication Box     Syntax    public void openCommBox String boxId  String memberld   int   sequence   OpenCommBoxListener target   throws EposException  Parameter   e boxld  Specifies the ID of the box to open    e memberld  Specify the member ID for identifying oneself in the Communication Box     e sequence  Sets a process sequence number when this API is executed    e target  This specifies the object  listener interface  that has the notification destination method     Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156            EposException ERR_PARAM Invalid parameter was passed   EposException ERR_CONNECT Could not communicate   EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred   EposException ERR_PROCESSING Could not execute a process              Listener Interface    public interface OpenCommBoxListener  extends EventListener    Listener Registration Method    void onOpenCommBox  String ipAddress   CommBox commBoxObject  int code  int sequence     Parameter  e ipAddress  Sets IP address of TM i     e commBoxObject   The EposCommbBox object is returned for the first parameter   If this API fails  NULL is returned     145       e code  Sets error status of processing results     PS A ee                                  EposCollbackCode SUCCESS ere opened the Communication  EposException ERR_CONNECT Could n
107. mmand to printer A    Printer A does not respond    The TM i reissues a print command to printer A    If printer A still does not respond to the reissued print command  the print com     mand will be issued to printer B     Print data sent from the Android device will be printed using printer B     19       Operating Environment    Android Version    1 Android Version 2 3 3 to 2 3 7  J Android Version 3 1 to 3 2 2    1 Android Version 4 0 or later    NQ    Android Device       For the latest version  refer to the README file                 1 Device that supports ARMv5TE    TM i       O TM T20I1      4 TM T70 i  TM i Firmware Ver 4 0 or later   O TM T82I1 i   A TM T83I1      1 TM T88V i  TM i Firmware Ver 4 0 or later        20    Chapter  Overview    TM Printer    In addition to the TM i local printer  the following TM printers can be controlled         TM Printer                                                 TM L90  Vv Vv  TM P20   Vv  TM P60Il Vv Vv  TM P60II Peeler Vv Vv  TM P80 Vv Vv  TM T20  Vv Vv  TM T20II  Vv Vv  TM T70  Vv Vv  TM T7OIl  Vv Vv  TM T8211  Vv Vv  TM T8311    Y  TM T88IV  Vv Vv  TM T88V  Vv Vv  TM T90  Vv Vv  TM U220  Vv Vv                      Ethernet model  UB E02  UB E03   or wireless LAN model  UB RO3  UB RO4    Other interface models are not supported     Interface   Use a TM printer with the following interface   O Wired LAN   O Wireless LAN  UB RO3  UB RO4        Supported Peripheral Device    To use a peripheral device  the user must prepare a
108. mode  to set text rotation  use the    e This API setting also applies to barcodes 2D Codes   Q addPageDirection  p 106  instead of this API function              Syntax    public void addTextRotate int rotate   throws EposException                   Parameter  e rotate  Specifies whether to rotate text   Description  Printer  TRUE Specifies rotated printing of text   Printer FALSE  default  Cancels rotated printing of text   Exceptions    When processing failed  EposException of the following error status is generated   Acquire with getErrorStatus  p 156            EposException ERR_PARAM Invalid parameter was passed   EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred                    77    78    addText    Adds the printing of text to the command buffer     2 After printing text  to print content other than text  execute line feed or paper feed           In page mode  characters are laid out in the current print position with the reference point being  NM the character baseline dot  Printer Specifications  p 166                Syntax    public void addText  String data  throws EposException                Parameter  e data  Specify a character string to be printed   For the horizontal tab line feed  use the following escape sequences    t Horizontal tab HT    n Line feed  LF      Carriage return  Exceptions          When processing failed  EposException of the following error status is generated   Acquire with get
109. n    Standard PDF417 Convert the character string to the string in UTF 8  apply the  escape sequence  and then encode the string        The data area can contain up to 928 code words in a    Ti ted PDF417  ocala maximum of 90 rows  each of which can contain up to 30             code words   QR Code Model 1 Convert the character string to the string in Shift JIS  apply the  QR Code Model 2 escape sequence  and then encode the string based on the  data type as shown below   Number  0to9    Alphanumeric character   Oto9  AtoZ  space               n 4     Kanji character  Shift JIS value  8 bit  byte data  0x00 to Oxff    Micro QR Code                Chapter 4 API Reference    2D Code type Description             MaxiCode Mode 2 Convert the character string to the string in UTF 8  apply the  MaxiCode Mode 3 escape sequence  and then encode the string    MaxiCode Mode 4 In Modes 2 and 3  when the first piece of data is 0 gt    MaxiCode Mode 5 x1e01 xldyy  where yy is a two digit number   this is processed       as the message header  and the subsequent data is  processed as the primary message  In other cases  from the  first piece of data  data is processed as the primary message   In Mode 2  specify the primary message in the following  format    Postal code  1  to 9 digit number  GS   x1d  ISO country code  MaxiCode Mode 6  1  to 3 digit number  GS   x1d  Service class code  1  to 3   digit number    In Mode 3  specify the primary message in the following  format    Postal code
110. n Box     In the figure above  applications Appl and App2 can send and receive data with one another using the  BoxID 1 Communication Box     Specifications of the Communication Box                Maximum number of Communication Boxes that can be created 20  Maximum number of applications that can belong to one Communication Box 20   Space of transfer history that one Communication Box can maintain 10240 Byte  Size of data that can be sent at one time 1024 Byte                15       16    Specifying the Print Job ID from the Application       A response containing the specified print job ID will be returned when sending a request from the  application by specifying the print job ID   TM i firmware Ver 4 1 or later versions        Chapter  Overview       Spooler Function    The spooler function is a function used to temporarily store printing data received from the application in  the TM i series printer to carry out background printings sequentially   TM i firmware Ver 4 1 or later versions     TM i series printers return response data to the application the moment the printing data enters the spooler  to make it possible for applications to proceed to the next process without waiting for a printing complete  response     The application can use the job ID included in the response data to send an inquiry on the printing status   EPSON TMNet WebConfig is used to configure the spooler   Perform the following settings  For details  refer to the Technical Reference Guide for ea
111. na     1 The drawer and the buzzer cannot be used together    1 The buzzer function cannot be used if the printer is not provided with the buzzer    1 When a 2D code scanner is used  multibyte characters such as Japanese cannot be obtained properly   1 When 2D code data contains an ASCII control code  0x00 to 0x1F   control codes cannot be obtained     T Keycodes that can be obtained from the keyboard are restricted  For the key codes that can be  obtained  refer to List of KeyCode p 165         Chapter 2 Building Environment       Building Environment    This chapter describes environment building for ePOS Device Service I F     Workflow    1  Network Settings    Configure the system and TM i network settings   Perform TM i network settings using the following procedure   For details  refer to the Technical Reference Guide of each TM i     e EPSON TMNet WebConfig  e EpsonNet Config  e Easy Kitting       2 Connection of Device to TM i    Connect a device to TM i  For the devices that can be connected  refer to Operating  Environment  p 20      3 Registration of Device  p 26     Register the device to be connected into TM i  Make registration using an Epson TMNet  WebConfig  For details  refer to the Technical Reference Guide for each TMi        25    Registration of Device    Register the device to be controlled by ePOS Device SDK for Android into TM i  Configure the settings using  EPSON TMNet WebConfig     EPSON TMNet WebConfig can be launched from your web browser   For de
112. ngs Not supported                184    Appendix    TM T82ll  58 mm 80 mm                                                          Interface Ethernet  Resolution 203 dpi x 203 dpi  W x H   Print Width 420 dots 576 dots  Characters in a Line Font A ANK  35 characters ANK  48 characters  Font B ANK  46 characters ANK  64 characters  Character Size Font A ANK  12 dots x 24 dots  W x H   Font B ANK  9 dots x 17 dots  W x H   Character Baseline Font A At the 21st dot from the top of the character  Font B At the 16th dot from the top of the character  Default Line Feed Space 30 dots  Color Specification First color  Page Mode Default Area 420 dots x 831 dots  W x H  576 dots x 831 dots  W x H   Page Mode Maximum Area 420 dots x 1662 dots  W x H  576 dots x 1662 dots  W x H   Raster Image Monochrome image  Logo Monochrome image  Barcode UPC A  UPC E  EAN13  JAN13  EAN8  JAN8  CODE39     ITF  CODABAR  CODE93  CODE128  GS1 128   GS1 DataBar Omnidirectional  GS1 DataBar Truncated   GS1 DataBar Limited  GS1 Databar Expanded       2D Code PDF417  QR Code  MaxiCode  6S1 DataBar Stacked   GS1 DataBar Stacked Omnidirectional   GS1 DataBar Expanded Stacked  Composite Symbology                      Ruled Line Not supported  Paper Cut Cut  Feed cut  Drawer Kick Out Supported  Buzzer Optional  Paper Layout Settings Not supported                185    TM T88IV       80 mm 58 mm                                     Interface Ethernet  Wireless LAN  Resolution 180 dpi x 180 dpi  W x H   Print Width
113. nitor  throws EposException    Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156    EE MAS  lt  lt  E  EposException ERR_FAILURE An unspecified error occurred     Chapter 4 API Reference    recover    The printer recovers from the error status   This API is executed when a error that can be automatically recovered from occurs        2 This API restores from error condition regardless of the setting of force property  p 122               Syntax  Public void recover   throws EposException    Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156         EposException ERR_CONNECT Failed to communicate with a device   EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred   EposException ERR_PROCESSING Could not execute a process                 Resets the printer  A  Execution of this API results in the value of the force property  p 122  as Printer FALSE     x    Syntax                   Public void reset   throws EposException  Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156               EposException ERR_CONNECT Failed to communicate with a device   EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred   EposException ERR_P
114. nstall the sample program to Android device following the next steps   A Extract the sample program zip file to a directory of your choosing     2 In Eclipse  go to  File   Import   select  General   Existing Project into Workspace    and then click  Next      3 The Import Projects window will be displayed  Make the settings shown below and  click  Finish      ify the direct h tracted th    AA Specify the directory where you extracted the sample program    zip file   Copy projects into workspace   Check this option                    In Package Explorer view  right click on the  Composite_sample  project and select   Properties      A    The Properties for Composite_sample window will be disolayed  Make the settings  shown below and click  OK      al       Anaroid Select the Android OS version of the target device   In Libraries  confirm that the path to ePOS Device jar  which is  Java Build Path located in the Composite_sample project that was copied into  the project workspace  is set                 In Package Explorer view  right click on the  Composite_sample  project and select   Run As  Android Application               The sample program will be installed to the target Android device  and then the  program will start up          161    How to Use the Sample Program    Use the sample program as follows   A Start the sample program  For details  refer to Environment Setting  p 159      2  ePOS Device Sample Program for Android  screen appears  Click  Setting         T s
115. ons to this  product  or  excluding the U S   failure to strictly comply with Seiko Epson Corporation   s operating and  maintenance instructions    e Seiko Epson Corporation shall not be liable against any damages or problems arising from the use of any  options or any consumable products other than those designated as Original EPSON Products or EPSON  Approved Products by Seiko Epson Corporation     Trademarks    EPSON is a registered trademark of Seiko Epson Corporation    Exceed Your Vision and ESC POS are registered trademarks or trademarks of Seiko Epson Corporation   Android    is either registered trademarks or trademarks of Google Inc  in the United States and other coun   tries    Java    is a registered trademark of Oracle Corporation  its subsidiaries  and affiliates in the U S  and other  countries    Eclipse  is a trademark or registered trademark of Eclipse Foundation  Inc    Wi Fi   is a registered trademark of the Wi Fi Alliance      All other trademarks are the property of their respective owners and used for identification purpose only     ESC POS   Command System    EPSON has been taking industry   s initiatives with its own POS printer command system  ESC POS   ESC POS  has a large number of commands including patented ones  Its high scalability enables users to build versa   tile POS systems  The system is compatible with all types of EPSON POS printers  excluding the TM C100  and  displays  Moreover  its flexibility makes it easy to upgrade the future  
116. or Specification First color  Page Mode Default Area 384 dots x 2400 dots  W x H   Page Mode Maximum Area 384 dots x 2400 cots  W x H   Raster Image Monochrome image  Logo Monochrome image  Barcode UPC A  UPC E  EAN13  JAN13  EAN8  JAN8  CODE39   ITF  CODABAR  CODE93  CODE128  GS1 128   GS1 DataBar Omnidirectional  GS1 DataBar Truncated   GS1 DataBar Limited  GS1 DataBar Expanded             176    Appendix                         58 mm  2D Code PDF417  QR Code  MaxiCode  6S1 DataBar Stacked   GS1 DataBar Stacked Omnidirectional   GS1 DataBar Expanded Stacked  Composite Symbology  Ruled Line Not supported  Paper Cut Feeds paper to cutting position  Drawer Kick Out Not supported  Buzzer Optional  Paper Layout Settings Supported             177       TM P60Il                                                                                  Receipt 58 mm Receipt 60 mm  Interface Wireless LAN  Resolution 203 dpi x 203 dpi  W x H   Print Width 420 dots 432 dots  Characters in a Font A ANK  35 characters  ANK  36 characters  Line  Font B ANK  42 characters ANK  43 characters  Font C ANK  52 characters ANK  54 characters  Character Size Font A ANK  12 dots x 24 dots  W x H   Font B ANK  10 dots x 24 dots  W x H   Font C ANK  8 dots x 16 dots  W x H   Character Font A At the 21st dot from the top of the character  Baseline  Font B At the 21st dot from the top of the character  Font C At the 15th dot from the top of the character  Default Line Feed Space 30 dots  Color Specification Fi
117. ot communicate   EposCallbackCode  The Communication Box is already opened   ERR_ALREADY_OPENED   EposCallbackCode  The specified member ID is already in use   ERR_ALREADY_USED   EposCallbackCode  The maximum number of Communication  ERR_BOX_COUNT_OVER Boxes that can be made is exceeded   EposCallbackCode  The maximum number that can belong to a  ERR_BOX_CLIENT_OVER Communication Box is exceeded   EposCallbackCode ERR_PARAM Parameter error   EposCallbackCode ERR_FAILURE Other error occurred           e sequence  Sets the same sequence number with a returned value to 3rd parameter when this API is  executed     146    Chapter 4 API Reference    closeCcommBox    Closes the Communication Box     Syntax    public void closeCommBox CommBox commBoxObject   int    sequence   CloseCommBoxListener target   throws EposException  Parameter    e commBoxObject    Specifies the commBox object to be closed     e sequence  Sets a process sequence number when this API is executed   e target  This specifies the object  listener interface  that has the notification destination method   Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156            EposException ERR_PARAM Invalid parameter was passed   EposException ERR_CONNECT Could not communicate   EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred   EposException ERR_PROCESSING Could not execute a proces
118. parameter was passed     121       force property    This is the forced transmission mode   If you enable forced transmission mode  print commands are forcibly sent to the printer        printer is online  When the printer is used online   EposCallbackCode ERR_PORT  is  returned as the code for the response document received event  p 124      The following functions are enabled in forced transmission mode     Drawer kick out  addPulse  p 111      Stopping the buzzer  addSound  p 112      Recovery from errors that can be recovered from  addRecovery  p 117      Reset  addReset  p 118      Sending commands in real time  addCommand  p 117          Use forced transmission mode when the printer is offline  It will result in an error if the             Syntax  Setter   public void setForce boolean force  throws EposException  Getter    public boolean getForce                     Set Value  p Setting Description  true Sets the forced transmission mode to valid   false Sets the forced transmission mode to invalid   Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156        EposException ERR_PARAM   Invalid parameter was passed          122    Chapter 4 API Reference    timeout property    Specifies the timeout time  ms  of the message sent with the sendData  p 74      Syntax  Setter   public void setTimeout  int timeout  throws EposException  Getter   public int getTimeout       Set Value    Specifies th
119. passed   EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred   EposException ERR_PROCESSING Could not execute a process                 74    Chapter 4 API Reference    getPrintJobStatus    Acquires print job status   TM i firmware Ver 4 1 or later versions        The latest print job status will be obtained when executing multiple printing processes with the      The results of executing this API will be returned to a setReceiveEventCallback  p 124    Q same job ID              Syntax  public void getPrintJobStatus String printJobId   throws EposException  Parameter    e printJobld   Specifies the print job ID to be verified   1 to 30 alphanumeric characters  including underscores  hyphens and periods  may be  used   Exceptions    When processing failed  EposException of the following error status is generated   Acquire with getErrorStatus  p 156                  EposException ERR_CONNECT Failed to communicate with a device   EposException ERR_PARAM Invalid parameter was passed   EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred   EposException ERR_PROCESSING   Could not execute a process                    clearCommandBuffer    Clears command buffers     Syntax    public void clearCommandBuf fer         75    addTextAlign    Adas the text alignment setting to the command buffer          This API setting is applied to raster image NV logo barcode 2D Code   Q e 
120. pecified error occurred                 111    addSound    Adds the turning on of the buzzer to the command buffer  Sets the buzzer          Not available in page mode   AN   The buzzer function and the drawer cannot be used together     This API function cannot be used if the printer is not provided with the buzzer              Syntax    public void addSound int pattern  int repeat  int cycle   throws EposException                                                                            Parameter  e pattern  Specifies the buzzer pattern   Printer PATTERN_NONE Stop  Printer PATTERN_A Pattern A  Optional Buzzer   Printer PATTERN_B Pattern B  Optional Buzzer   Printer PATTERN_C Pattern C  Optional Buzzer   Printer PATTERN_D Pattern D  Optional Buzzer   Printer PATTERN_E Pattern E  Optional Buzzer   Printer PATTERN_ERROR Error sound pattern  Optional Buzzer   Printer  PATTERN  PAPER END Sel when there is no paper   Optional Buzzer   Printer PATERN_1 Pattern 1  Internal Buzzer   Printer PATERN_2 Pattern 2  Internal Buzzer   Printer PATERN_3 Pattern 3  Internal Buzzer   Printer PATERN_4 Pattern 4  Internal Buzzer   Printer PATERN_5 Pattern 5  Internal Buzzer   Printer PATERN_6 Pattern 6  Internal Buzzer   Printer PATERN_7 Pattern 7  Internal Buzzer   Printer PATERN_8 Pattern 8  Internal Buzzer   Printer PATERN_9 Pattern 9  Internal Buzzer   Printer PATERN_10 Pattern 10  Internal Buzzer   Printer  PARAM_DEFAULT Pattern A  e repeat  Specifies the number of repeats   Bes ee  0 The 
121. pported  Buzzer Optional  Paper Layout Settings Not supported             171       TM T88V i  TM T88V      Only for South Asia model    58 mm 80 mm                                                                   Interface Ethernet  Wireless LAN  Resolution 180 dpi x 180 dpi  W x H   Print Width 360 dots 512 dots  Characters in a Line Font A ANK  30 characters ANK  42 characters  Font B ANK  40 characters ANK  56 characters  patie 30 characters 42 characters  E 40 characters 56 characters  Character Size Font A ANK  12 dots x 24 dots  W x H   Font B ANK  9 dots x 17 dots  W x H   Special   12 dots x 24 dots  Wx H   font A   Special   9 dots x 24 dots  W x H   font B   Character Baseline Font A At the 21st dot from the top of the character  Font B At the 16th dot from the top of the character  se At the 20th dot from the top of the character  a At the 20th dot from the top of the character  Default Line Feed Space 30 dots  Color Specification First color  Page Mode Default Area 360 dots x 831 dots  W x H  512 dots x 831 dots  W x H   Page Mode Maximum Area 360 dots x 1662 dots  W x H  512 dots x 1662 dots  W x H   Raster Image Monochrome image  Gray scale image  Logo Monochrome image  Gray scale image  Barcode UPC A  UPC E  EAN13  JAN13  EAN8  JAN8  CODE39  ITF     CODABAR  CODE93  CODE128  GS1 128 GS1 DataBar  Omnidirectional  GS1 DataBar Truncated  6S1 DataBar Limited   GS1 Databar Expanded                172    Appendix      Only for South Asia model    58 mm 80 mm    2D 
122. printing to the command buffer   Prints a logo registered in the NV memory of the printer            Model dedicated Utility    logo registration utility  TMFLogo      In page mode  a logo is laid out in the current print position with the reference point being its  bottom left dot     2 e A logo is registered in the printer beforehand using the following utilities        Page mode does not support printing in multiple tones  Multiple tone graphics can only be printed  NM in standard mode              Syntax    public void addLogo int keyl  int key2   throws EposException    Parameter  e key   Specifies the key code 1 of an NV logo  Specifies an integer from O to 255   e key2  Specifies the key code 2 of an NV logo  Specifies an integer from O to 255   Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156               EposException ERR_PARAM Invalid parameter was passed   EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred                 91    addBarcode    Adds barcode printing to the command buffer        In page mode  a barcode is laid out in the current print position with the reference point being its  NH bottom left dot  except for HRI               Syntax    public void addBarcode String data  int type  int hri   int font  int width  int height   throws EposException    Parameter  e data  Specifies the barcode data as a string      
123. r   cddiextste Adds the text scale settings to the command 83  buffer   addtTextStyle Adds the text style settings to the command buffer  84  addTextPosition Adds the print position settings to the command 86  buffer   addTextVPosition Adds a tag for specifying the print vertical position 86  of text   addFeedunit Adds a tag for paper feeding  in dots   87  addFeedLine Adds a tag for paper feeding  in lines   87  addresdrositon Adds control of label paper black mark paper to 88  command buffer   addFeed Adds a line feed to the command buffer  88  addlmage Adds raster image printing to the command buffer  89  addLogo Adds NV logo printing to the command buffer  91  addBarcode Adds barcode printing to the command buffer  92  addSymbol Adds 2D Code printing to the command buffer  96  addulne Adds horizontal line printing to the command 101  buffer   addVLineBegin Adds vertical line start to the command buffer  102  addVLineEnd Adds vertical line end to the command buffer  103  addPageBegin Adds page mode start to the command buffer  104  addPageEnd Adds page mode end to the command buffer  104  addPageArea Adds the print area settings in the page mode to 105  the command buffer   A th int directi   i in th  PREE AE dds the print direction settings in the page mode 106  to the command buffer   addPagePosition Adas the print position settings in the page mode 107  to the command buffer   A i line in th to th  araoa dds drawing a line in the page mode to the 108  command buffer   A
124. r PARAM_DEFAULT y i     The paper is fed to the cut position and then is cut    Exceptions    When processing failed  EposException  Acquire with getErrorStatus  p 156      EposException ERR_PARAM    of the following error status is generated     Invalid parameter was passed        EposException ERR_MEMORY    Could not allocate memory           EposException ERR_FAILURE          An unspecified error occurred        110       Chapter 4 API Reference    addPulse    Adds the drawer kick to the command buffer  Sets the drawer kick          Not available in page mode   AN   The drawer and the buzzer cannot be used together              Syntax    public void addPulse int drawer  int time   throws EposException                                              Parameter  e drawer  Specifies the drawer kick connector   Printer  DRAWER_1 Pin 2 of the drawer kick out connector  Printer  DRAWER_2 Pin 5 of the drawer kick out connector  Printer  PARAM_DEFAULT Pin 2 of the drawer kick out connector  e time  Specifies the ON time of the drawer kick signal   Printer PULSE_100 100 ms  Printer PULSE_200 200 ms  Printer PULSE_300 300 ms  Printer PULSE_400 400 ms A  Printer PULSE_500 500 ms  Printer  PARAM_DEFAULT 100 ms  Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156         EposException ERR_PARAM Invalid parameter was passed   EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An uns
125. registration API  com epson eposdevice commbox OpenCommBoxListener       Open event of Communication Box   onOpenCommBox       openCommBox  p 145   com epson eposdevice commbox CloseCommBoxListener       Close event of Communication Box   onCloseCommBox             closeCommBox  p 147        Commbox Object    Package  com epson eposdevice commbox     Event listener    Function Notification destination method    Notification destination registration API  com epson eposdevice commbox GetCommHistoryListener          Acquired callback of sent history onGetCommmHistory  getCommuistory  p 149        com epson eposdevice commbox SendDataListener  Callback of message sent onCommboxsendData   sendData  p 151   com epson eposdevice commbox ReceiveListener             Callback of message received onCommboxReceive       setReceiveEventCallback  p 153                 Chapter 4 API Reference    API Reference       This chapter describes the APIs provided in the ePOS Device SDK for Android     List of ePOS Device API    ePOS Device SDK for Android provides the following classes   Device class  p  43    Display class  p  44    Keyboard class  p  44    Printer class  p  44    Scanner class  p  46   SimpleSerial class  p  47   CommBoxManager class  p  47   CommBox class  p  47    Log class  p  47    EposException class  p  47     buooduduoeeoeo ee O    EposCallbackCode class  p  47        When using API of each class  it is necessary to define import per class in the Java source  file  For det
126. rial class import com epson eposdevice simpleserial   CommBoxManager class import com epson eposdevice commbox              27    28    Y Confirm that the target project s   libs  folder is in the Source tab of the target  project s properties  If not  add  libs  to the build path using  Add Folder         8 With the target project selected from Eclipse s Package Explorer  select   Preferences  in the  Window  menu     E  The  Preferences  screen is displayed  From the list on the left  select  Java     Compiler      The  Compiler  screen is displayed  Set the  Compiler compliance level   to  1 6    and click  Apply   After that  click  Ok      A A Double click  AndroidManifest xml  from Eclipse s Package Explorer    A q Select the  Permissions  tab    A 3 The  Android Manifest Permissions  screen is displayed  Click the  Ada  button    A A select  Uses Permission   and click the  OK  button    A 5  Uses Permission  is added to  Permissions   Select the permissions of functionalities    attached to the added  Uses Permission  from the  Name  under  Attributes for  Uses Permission      Functionality  Name  setting      Wi Fi   android permission INTERNET       A GSove  AndroidManifest xml      Chapter 3 Programming Guide                                     Programming Flow  The basic programming sequence of ePOS Device SDK for Android is as follows   Applications ePOS Device   Device  1  Device       Initialize Device class  gt           2   connect            Establish a comm
127. ritten              Syntax    public void setStatusChangeEventCallback   StatusChangeListener target           Parameter  e target  This specifies the object  listener interface  that has the notification destination method   If NULL is specified for either the method or target  the notification destination registration is  Q nullified   Listener Interface    public interface StatusChangeListener  extends EventListener    Listener Registration Method    void onPtrStatusChange String ipAddress   String deviceld  int status     Parameter  e ipAddress  Sets IP address of TM i   e deviceld  Sets Device ID   e status  Sets printer status     128    Chapter 4 API Reference    setBatteryStatusChangeEventCallback    This registers a callback method that receives BatteryStatusChangeEvent          This API can be executed following execution of createDevice  p 51    Q e When this API is executed on multiple occasions  the notification destination method that is  specified afterwards is overwritten              Syntax    public void setBatteryStatusChangeEventCallback   BatteryStatusChangeListener target           Parameter  e target  This specifies the object  listener interface  that has the notification destination method   If NULL is specified for either the method or target  the notification destination registration is  Q nullified   Listener Interface    public interface BatteryStatusChangeListener  extends EventListener    Listener Registration Method    void onPtrBatteryStatusCh
128. rst color  Page Mode Default Area 420 dots x 1624 dots  W x H  432 dots x 1624 dots  W x H   Page Mode Maximum Area 420 dots x 1624 dots  W x H  432 dots x 1624 dots  W x H   Raster Image Monochrome image  Logo Monochrome image  Barcode UPC A  UPC E  EAN13  JAN13  EAN8  JAN8  CODE339  ITF  CODABAR   CODE93  CODE128  GS1 128  GS1 DataBar Omnidirectional  GS1  DataBar Truncated  6S1 DataBar Limited  GS1 DataBar Expanded  2D Code PDF417  QR Code  MaxiCode  GS1 DataBar Stacked  GS1 DataBar  Stacked Omnidirectional  6S1 DataBar Expanded Stacked  Aztec  Code  DataMatrix  Composit Symbology   Not supported   Ruled Line Not supported  Paper Cut Cut  Feed cut  Drawer Kick Out Not supported  Buzzer Support  Pattern 1   Pattern 10  Stop   Paper Layout Settings Not supported                178    Appendix    TM P60Il with Peeler                                                 Receipt 58 mm Receipt 60 mm Die cut label   Interface Wireless LAN  Resolution 203 dpi x 203 dpi  W x H   Print Width 420 dots 432 dots 160 dots   400 dots  Characters in a Font A ANK  35 characters  ANK  36 characters ANK  33 characters  Line   Font B ANK  42 characters ANK  43 characters ANK  40 characters   Font C ANK  52 characters ANK  54 characters ANK  50 characters  Character Size Font A ANK  12 dots x 24 dots  W x H    Font B ANK  10 dots x 24 dots  W x H    Font C ANK  8 dots x 16 dots  W x H   Character Font A At the 21st dot from the top of the character  Baseline   Font B At the 21st dot from the top of
129. s                    Listener Interface  public interface CloseCommBoxListener  extends EventListener  Listener Registration Method    void onCloseCommBox String ipAddress  int code   int sequence     Parameter  e ipAddress  Sets IP address of TM i   e code  Sets error status of processing results     EposCallbackCode SUCCESS   Successfully closed the Communication Box        EposException  Could not communicate   ERR_CONNECT  EposCallbackCode   ERR_NOT_OPENED  EposCallbackCode   ERR_FAILURE       A Communication Box is not open     Other error occurred                 147    e sequence  Sets the same sequence number with a returned value to 2nd parameter when this API  is executed     148    Chapter 4 API Reference    CommBox Class    getCommHistory    Acquires the transfer history of the Communication Box     Syntax    public void getCommHistory int   sequence   GetCommHistoryListener target   throws EposException    Parameter    e sequence  Sets a process sequence number when this API is executed   e target  This specifies the object  listener interface  that has the notification destination method     Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156            EposException ERR_PARAM Invalid parameter was passed   EposException ERR_CONNECT Could not communicate   EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred   EposException ER
130. s     Parameter  e ipAddress  Sets IP address of TM i     Chapter 4 API Reference    setDisconnectEventCallback    This registers a callback method that receives the information that a reconnection process has failed     If this event occurred  perform processing for taking measures against network disconnections  such as  establishing a side connection        When this API is executed on multiple occasions  the notification destination method that is  3 specified afterwards is overwritten              Syntax    public void setDisconnectEventCallback   DisconnectListener target                 Parameter  e target  This specifies the object  listener interface  that has the notification destination method   If NULL is specified for either the method or target  the notification destination registration is  Q nullified   Listener Interface    public interface DisconnectListener  extends EventListener    Listener Registration Method    void onDisconnect  String ipAddress     Parameter  e ipAddress  Sets IP address of TM i     57       Display Class    58    Sends commands in the command buffer     Syntax  public void sendData   throw EposException    Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156            EposException ERR_CONNECT Could not communicate   EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred   EposException ERR_PROCESSING 
131. s  W x H           Raster Image    Monochrome image                Logo Monochrome image   Barcode UPC A  UPC E  EAN13  JAN13  EAN8  JAN8  CODE339  ITF  CODABAR   CODE93  CODE128  GS1 128  GS1 DataBar Omnidirectional  GS1  DataBar Truncated  6S1 DataBar Limited  GS1 DataBar Expanded   2D Code PDF417  QR Code  MaxiCode  6S1 DataBar Stacked  6S1 DataBar  Stacked Omnidirectional  GS1 DataBar Expanded Stacked   Composit Symbology   Not supported    Ruled Line Not supported   Paper Cut Cut  Feed cut       Drawer Kick Out    Supported       Buzzer    Optional  Pattern A   Pattern E  Error  No paper  Stop           Paper Layout Settings       Not supported          181       182    TM T20ll       58 mm 80 mm          Interface Ethernet  Wireless LAN   Resolution 203 dpi x 203 dpi  W x H    Print Width 420 dots 576 dots   42 Column Mode   378 dots   546 dots        Characters in a Line Font A     42 Column Mode     ANK  35 characters     ANK  42 characters     ANK  48 characters     ANK  42 characters        Font B     42 Column Mode     ANK  46 characters     ANK  31 characters     ANK  64 characters     ANK  60 characters        Character Size Font A   42 Column Mode   Font B     42 Column Mode     ANK  12 dots x 24 dots  W x H         ANK  9 dots x 17 dots     ANK  9 dots x 17 dots  W x H      ANK  13 dots x 24 dots         ANK  12 dots x 24 dots         ANK  9 cots x 17 dots                 Character Baseline Font A At the 21st dot from the top of the character  Font B At the 16t
132. s printable area    e y  Specifies the origin of the vertical axis  in dots    Specifies an integer from O to 65 535  O is the position in which no paper feed has been  performed    e width  Specifies the width of the print area  in dots   Specifies an integer from O to 65 535    e height  Specifies the height of the print area  in dots   Specifies an integer from O to 65 535           Determine the width and height of the print area according to the print direction setting  Otherwise   MN the print data might not be printed completely              Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156            EposException ERR_PARAM Invalid parameter was passed   EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred                 105    addPageDirection    Adds the page mode print direction setting to the command buffer  Specifies the print direction in page  mode  This function can be omitted if rotation is not required     NQ    Syntax       Use this API function by inserting it between addPageBegin  p 104  and addPageEnd  p 104         public void addPageDirection int dir   throws EposException                      Parameter  e dir  Specifies the print direction in page mode   a E ee eee  Left to right   Printer  DIRECTION_LEFT_TO_RIGHT f ae   No rotation Data is printed from the top    default  f  left corner to the right    Bottom to
133. scanner for the device type        Device TYPE_SIMPLE_SERIAL Specifies the serial communication device       for the device type              Specifies whether encryption of the communication data is required     Device FALSE Disable              Specifies if it is necessary to buffer the data that occurred in the device during  reconnection and resend the data upon reconnection     AA CI A 7 ESA    Device TRUE Enable  Device FALSE Disable                      This specifies the object  listener interface  that has the notification destination method     51    Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156      EposException ERR_PARAM Invalid parameter was passed   EposException ERR_CONNECT  EposException ERR_IN_USE  EposException ERR_FAILURE    EposException ERR_PROCESSING       Could not communicate        Device in use exists        An unspecified error occurred        Could not execute a process                 Listener Interface  public interface CreateDeviceListener  extends EventListener  Listener Registration Method    void onCreateDevice  String ipAddress   int deviceType   Object deviceObject     String deviceld     int code     Parameter  e   pAdaress  Sets IP address of TM i   e deviceld  Sets Device ID     e devicelype  Sets a device deviceType specified in this API   e deviceObject     Sets a device object corresponding to deviceType specified in this API        deviceType Dev
134. solution 180 dpi x 180 dpi  W x H   Print Width 360 dots 384 dots 512 dots  Characters in a Font A ANK  30 characters  ANK  32 characters ANK  42 characters  Line   Font B ANK  40 characters ANK  42 characters ANK  56 characters  Character Size Font A ANK  12 dots x 24 dots  W x H    Font B ANK  9 dots x 17 dots  W x H   Character Font A At the 21st dot from the top of the character  Baseline   Font B At the 16th dot from the top of the character  Default Line Feed Space 30 dots  Color Specification First color    Second color  Second color  when two color printing is set        Page Mode Default Area    360 dots x 831 dots 384 dots x 831 dots 512 dots x 831 dots        W x H   W x H   WxH   when two  360 dots x 415 dots 384 dots x 415 dots 512 dots x 415 dots  color printing    W x H   WxH   WxH   is set       Page Mode Maximum Area    360 dots x 1662 dots   WxH     384 dots x 1662 dots   WxH     512 dots x 1662 dots   WxH        when two   color printing  is set    360 dots x 831 dots   WxH     384 dots x 831 dots   WxH     512 dots x 831 dots   WxH              Raster Image    Monochrome image  Two color image                   Logo Monochrome image  Two color image   To perform two color printing  change the settings of the printer  using the memory switch setting utility     Barcode UPC A  UPC E  EAN13  JAN13  EAN8  JAN8  CODE39  ITF  CODABAR   CODE93  CODE128   2D Code PDF417   Ruled Line Not supported   Paper Cut Cut  Feed cut       Drawer Kick Out          Supported  
135. tErrorStatus  p 156      EposException ERR_PARAM Invalid parameter was passed   EposException ERR_MEMORY Could not allocate memory              EposException ERR_FAILURE An unspecified error occurred              addTextVPosition    Adds the vertical print start position of text to the command buffer                    Use this API function by inserting it between addPageBegin  p 104  to addPageEnd  Q  p 104    Syntax  public void addTextVPosition int y  throws EposException  Parameter  ey  Specifies the vertical print start position  in dots    Specifies an integer from O to 65535    Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156      EposException ERR_PARAM Invalid parameter was passed   EposException ERR_MEMORY Could not allocate memory                 EposException ERR_FAILURE An unspecified error occurred           Chapter 4 API Reference    addFeedUnit    Adds paper feeding in dots to the command buffer     Syntax  public void addFeedUnit int unit  throws EposException  Parameter  e unit  Specifies the paper feed space  in dots   Specifies an integer from O to 255     Exceptions    When processing failed  EposException of the following error status is generated     Acquire with getErrorStatus  p 156            EposException ERR_PARAM Invalid parameter was passed   EposException ERR_MEMORY Could not allocate memory   EposException ERR_FAILURE An unspecified error occurred              
136. tails  refer to the Technical Reference Guide for each TM i   Configure the following settings for each device connected to the TM i                                                     Printer  Item Description  Device ID Enter the ID  any character string  of the printer to be controlled   Model Select the model of the printer to be controlled   IP Address Specify the IP address of the printer for each device ID   Retry interval ms  Specify the retry interval after timeout   Customer Display  Item Description  Customer Display Set whether or not this is used   Communications settings Set the communication speed  data bit and parity   Brightness settings Set the brightness of the customer display   2 The device ID of the customer display is fixed to  local_display    Key input device  Item Description  Device ID Enter the device ID  any character string    Device name Select the device name of the key input device   Control Script Select the device control script to be used for the key input device                 Serial communications    Item Description                   Serial communications et whether or not this is used   Communication speed  bps    Set the communication speed of the device   Data bit Set the data bit    Parity Set the parity    Stop bit Set the stop bit    Flow control Set the flow control                 The device ID of the serial communication device is fixed to  local_ serial      Q          26    Chapter 3 Programming Guide       Programming Guide 
137. ten              Syntax    public void setKeyPressEventCallback   KeyPressListener target           Parameter  e target  This specifies the object  listener interface  that has the notification destination method   If NULL is specified for either the method or target  the notification destination registration is  Q nullified   Listener Interface    public interface KeyPressListener extends EventListener    Listener Registration Method    void onKbdKeyPress String ipAddress  String deviceld   int keyCode  String ascii     Parameter  e ipAddress  Sets IP address of TM i   e deviceld  Sets Device ID   e keycode  Sets a keycode pressed   e ascii  Sets a character corresponding to a keycode     Sets    blank character  when there is no character corresponding to a keycode     Chapter 4 API Reference    setStringEventCallback    This registers a callback method that receives character input as character string detected before Enter key  is detected and starting with any of the characters specified in setPrefix  p 71         When this API is executed on multiple occasions  the notification destination method that is  Q specified afterwards is overwritten        Syntax    public void setStringEventCallback   StringListener target     Parameter  e target  This specifies the object  listener interface  that has the notification destination method        If NULL is specified for either the method or target  the notification destination registration is    3 nullified     Listener Interfa
138. uence using the Communication Box   A  Client  in the sequence figure refers to an application                                                                                                                                                                                                                                            1 3   Client A ePOS Device Client B Client C    1   Device     i  Initialize Device class Su F l  i 1  Device i      B Initialize Device class            i 1  Device i  i i l  i Lr Initialize Device class    i 2  connect a   7  l i i  Establishes communication path i    with ePOS Device Service I F      2 1  callback SUCCESS   A A A 2  connect     i    l i    Establishes communication path      with ePOS Device Service I F i  i 2 1  callback SUCCESS   i R a  gt  i  E   2   connect    i i l  i      Establishes communication path  f i   withePOS Device Service I F       2 1  callback SUCCESS   113  getCommBoxManager ie ge eee ee Me aN ee   s  Acquires        CommboxManager   A i    object   3  getCommBoxManager     i P i Acquires      eee a ae 3   getCommBoxManager    Opens the Communication Box   4 1  Creates the Communication Box pa Acquires  CommboxManager  object                      4 2   Adds Client A to members             ee ee      4 3   callback SUCCESS                    Client A          6   sendData      Chapter 3 Programming Guide             ePOS Device          Client B     2 3                    4   openCommBox                l  Opens th
139. unication path to   ePOS Device Service I F    2 1   callback SUCCESS           3  createDevice Device  TYPE_PRINTER     F         3 1  Cmd              Obtain a device object X    4 1   callback   EposPrinter  SUCCESS           4  Device open                      5  Registration of callback according  to the device         i 6   Method according to the device                F     4        6 1   Cmd    6 1 1   Execute          5 1   Execution result  5 2   callback  SUCCESS  SoS SSeS eS ees                   7 1  Cmd            Pare l    Release a device object   l  8  Device close                8 1   callback SUCCESS     9  disconnect    Disconnect the communication path to     ePOS Device Service I F             29    If Automatically Reconnecting to the Network    The following is a sequence for automatically reconnecting if network communication is cut off with the TM     Q       The following uses a case where the barcode scanner is used as an example                                                      1 2   Applications ePOS Device Barcode Scanner  1  Device  Initialize Device class  gt  i    2  connect                  ePOS Device Service I F  2 1   callback SUCCESS        Establish a communication path to           h        i 3   setReconnectingEventCallback             Register callback for reconnection  process started event             4   setReconnectEventCallback       Register callback for reconnection     process ended event             5   setDisconnectEvent
140. ventCallback  p 124        Status changed event    com epson eposdevice printer statusChangeListener       onPtrStatusChange       setStatusChangeEventCallback  p 128        Battery status changed event    com epson eposdevice printer BatteryStatusChangeListener       onPtrBatteryStatusChange       setBatteryStatusChangeEventCallback  p 129        Online event    com epson eposdevice printer OnlineListener       onPtrOnline       setOnlineEventCallback  p 130        Offline event    com epson eposdevice printer OfflineListener       onPtrOffline       setOfflineEventCallback  0 131        Power off event       com epson eposdevice  printer  PowerOffListener       onPtrPowerOff          setPowerOffEventCallback  p 132                    Package     Function    Cover ok event    Chapter 3 Programming Guide    com epson eposdevice printer   Event listener    Notification destination method  Notification destination registration API    com epson eposdevice printer CoverOkListener       onPtrCoverOk       setCoverOkEventCallback  p 133        Cover open event    com epson eposdevice  printer  CoverOpenListener       onPtrCoverOpen       setCoverOpenEventCallback  p 134        Paper ok event    com epson eposdevice printer PaperOkListener       onPtrPaperOk       setPaperOkEventCallback  p 135        Paper near end event    com epson eposdevice printer PaperNearEndListener       onPtrPaperNearEnd       setPaperNearEndEventCallback  0 136        Pater end event    com epson eposdevi
141. work printers connected to TM i are controlled     TM i returns a response to the application     Chapter  Overview    How to Use the Communication Box       The Communication Box is a virtual data space that is provided by the ePOS Device Service I F for sending  and receiving data between applications        The ePOS Device is providing a virtual space and structure for sending and receiving data  AN between applications  Create the data to be sent and received according to your application s  specifications                 Y            The Communication Box can be used in the following ways   e Using an Android device as a POS display terminal  e Displaying digital signage    e Using a tablet terminal as an entry terminal    13    14    Example of data processing using the Communication Box    O a hOoON         The TM i receives the barcode data scanned by the scanner    The ePOS Device Service I F notifies App2 of the barcode data    App2 acquires barcode data and converts to POS data    App2 sends the POS data to the ePOS Device Service   F s Communication Box     The ePOS Device Service I F notifies App1 that the POS data is stored in the  Communication Box     App  acquires the POS data stored in the Communication Box     Chapter 1 Overview    Structure of the Communication Box                The ePOS Device Service I F manages Communication Boxes with Box IDs  BoxID in the figure above    Data can be sent and received between applications belonging to the Communicatio
142. x        When this API is executed on multiple occasions  the notification destination method that is    Q specified afterwards is overwritten     Syntax             public void setReceiveEventCallback   ReceiveListener target           Parameter  e target  This specifies the object  listener interface  that has the notification destination method   If NULL is specified for either the method or target  the notification destination registration is  Q nullified   Listener Interface    public interface ReceiveListener extends EventListener    Listener Registration Method    void onCommBoxReceive String ipAddress  String senderld   String receiverld  String message        Parameter  e ipAddress  Sets IP address of TM i   e senderld  The sender s member ID is set     If there is no specified member ID when the openCommBox was executed       space   is set     e receiverld  The receiver s member ID is set   If the data was sent to all members in the Communication Box      space  is set     e message  The sent data is set     153    EposDeviceLog Class    setLogSettings    Sets the log output function     Syntax    public static void setLogSettings   Context context  int period   int enabled  String ipAddress  int port   int logSize  int logLevel   throws EposException                                                    Parameter  e period  Specifies the API of setting the log output function   INC Description   Log LOG_TEMPORARY The settings al this API are disabled when the  applic
    
Download Pdf Manuals
 
 
    
Related Search
    
Related Contents
warnung - Gartentechnik.com  Automatic analysis of eye tracker data  TDAS PRO Rack Hardware User`s Manual  Hoover PE235 Front Load Washer  Télécharger le document  よこはま笑顔プラン - 横浜市社会福祉協議会  Ver. 3.0-R01 New Features  Table of Contents  V849093-94 verisone C    Copyright © All rights reserved. 
   Failed to retrieve file