COMPAX POS Cash Drawer Kick

This is a programming manual for using the internal cash drawer port within the COMPAX POS terminal.

Introduction

COMPAX Android POS provide a general socket IO for connection of the internal cash drawer port.

Software developers only need to send the general ESC/POS commands to the specified socket

and port, the cash drawer will be kicked off.

Details

Calling Interface Sample

  1. Enable the internal cash drawer port control

public static void enableCashBox(){
    try {
        Class cls = Class.forName("android.os.SystemProperties");
        Method method = cls.getMethod("set",String.class,int.class);
        method.invoke(null,"persist.sys.onos.type",4);
    } catch (Exception e) {
        e.printStackTrace();
    }
}
  1. Send ESC/POS command via PrinterProxy

// ESC p m t1 t2

Send ESC/POS command

    0x1b,0x70,0x6d,0x1,0x2

via PrinterProxy to internal IP address 127.0.0.1 and port 9100.

Last updated