How to configure the JposEntry for Epson's cash drawer for POS?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

How to configure the JposEntry for Epson's cash drawer for POS?

Chatree Srichart
Hi community,

I have a problem concerning to configuring the Epson's cash drawer for POS.
I use an Epson TM-U220B printer. I can configure jpos.xml file for that
because there is a example configuration for Epson TM-T88III printer in the
jpos.xml. Unfortunately, there is not an example configuration for cash
drawer. Could you please tell me how to configure the JposEntry in the
jpos.xml file for a cash drawer?

My cash drawer is not an Epson's model but it work fine when I test with the
SetupPOS program of Epson.

This is my JposEntry for the Epson TM-U220B printer:

<JposEntry logicalName="TM-T88III">
        <creation
factoryClass="jp.co.epson.jpos180.util.EpsonJposServiceInstanceFactory"
serviceClass="jp.co.epson.jpos180.ptr.T88III"/>
        <vendor name="SEIKO EPSON" url="http://www.epson.co.jp"/>
        <jpos category="POSPrinter" version="1.8"/>
        <product description="EPSON TM-T88III Printer Device Service"
name="EPSON Services for JavaPOS(TM) Standard" url="http://www.epson.co.jp
"/>

        <!--Other non JavaPOS required property (mostly vendor properties
and bus specific properties i.e. RS232 )-->
        <prop name="dataBits" type="String" value="8"/>
        <prop name="Parity" type="String" value="0"/>
        <prop name="portName" type="String" value="COM1"/>
        <prop name="U375Compatible" type="String" value="0"/>
        <prop name="deviceBus" type="String" value="RS232"/>
        <prop name="DataLen" type="String" value="1"/>
        <prop name="UsedJAI" type="String" value="0"/>
        <prop name="TimeoutTime" type="String" value="5000"/>
        <prop name="baudRate" type="String" value="9600"/>
        <prop name="TwoColor" type="String" value="0"/>
        <prop name="PortType" type="String" value="0"/>
        <prop name="UsedNVRAM" type="String" value="0"/>
        <prop name="StopBit" type="String" value="1"/>
        <prop name="RetryTime" type="String" value="100"/>
        <prop name="ErrorOption" type="String" value="1"/>
        <prop name="ReverseEject" type="String" value="0"/>
        <prop name="SerialPowerWaitTime" type="String" value="500"/>
        <prop name="InputWait" type="String" value="1"/>
        <prop name="AnalysisLevel" type="String" value="1"/>
        <prop name="BufferSize" type="String" value="2"/>
        <prop name="DeviceDesc" type="String" value="EPSON TM-T88III
Printer"/>
        <prop name="OutputLength" type="String" value="10"/>
        <prop name="parity" type="String" value="None"/>
        <prop name="stopBits" type="String" value="1"/>
        <prop name="PortName" type="String" value="COM1"/>  <!-- Windows -->
        <!--prop name="PortName" type="String" value="/dev/ttyS0"/--> <!--
RS232 Linux -->
        <!--prop name="PortName" type="String" value="/dev/usbtm0"/--> <!--
USB Linux, set before something like "sudo chmod 666 /dev/usbtm0" -->
        <prop name="ReceiveTimeout" type="String" value="10"/>
        <prop name="TwoByteCharacter" type="String" value="0"/>
        <prop name="Page254UseCode" type="String" value="0"/>
        <prop name="PhysicalDevice" type="String" value="TM-T88III"/>
        <prop name="PaperSize" type="String" value="80"/>
        <prop name="BaudRate" type="String" value="6"/>
        <prop name="Page255UseCode" type="String" value="0"/>
        <prop name="ServiceVersion" type="String" value="1.80"/>
        <prop name="flowControl" type="String" value="None"/>
        <prop name="FlowControl" type="String" value="1"/>
    </JposEntry>

Thank you

Regards,
Chatree Srichart
Reply | Threaded
Open this post in threaded view
|

Re: How to configure the JposEntry for Epson's cash drawer for POS?

Chatree Srichart
Ops... Sorry, I put wrong JposEntry. That is example for TM-T88III.

This for TM-U220B  :

<JposEntry logicalName="TM-U220B">
        <creation
factoryClass="jp.co.epson.jpos182.util.EpsonJposServiceInstanceFactory"
serviceClass="jp.co.epson.jpos182.ptr.U220B"/>
        <vendor name="SEIKO EPSON" url="http://www.epson.co.jp"/>
        <jpos category="POSPrinter" version="1.8"/>
        <product description="EPSON TM-U220B Printer Device Service"
name="EPSON Services for JavaPOS(TM) Standard" url="http://www.epson.co.jp
"/>

        <!--Other non JavaPOS required property (mostly vendor properties
and bus specific properties i.e. RS232 )-->
        <prop name="dataBits" type="String" value="8"/>
        <prop name="Parity" type="String" value="0"/>
        <prop name="portName" type="String" value="COM1"/>
        <prop name="U375Compatible" type="String" value="0"/>
        <prop name="deviceBus" type="String" value="RS232"/>
        <prop name="DataLen" type="String" value="1"/>
        <prop name="UsedJAI" type="String" value="0"/>
        <prop name="TimeoutTime" type="String" value="5000"/>
        <prop name="baudRate" type="String" value="9600"/>
        <prop name="TwoColor" type="String" value="0"/>
        <prop name="PortType" type="String" value="0"/>
        <prop name="UsedNVRAM" type="String" value="0"/>
        <prop name="StopBit" type="String" value="1"/>
        <prop name="RetryTime" type="String" value="100"/>
        <prop name="ErrorOption" type="String" value="1"/>
        <prop name="ReverseEject" type="String" value="0"/>
        <prop name="SerialPowerWaitTime" type="String" value="500"/>
        <prop name="InputWait" type="String" value="1"/>
        <prop name="AnalysisLevel" type="String" value="1"/>
        <prop name="BufferSize" type="String" value="2"/>
        <prop name="DeviceDesc" type="String" value="EPSON TM-U220B
Printer"/>
        <prop name="OutputLength" type="String" value="10"/>
        <prop name="parity" type="String" value="None"/>
        <prop name="stopBits" type="String" value="1"/>
        <prop name="PortName" type="String" value="COM1"/>  <!-- Windows -->
        <!--prop name="PortName" type="String" value="/dev/ttyS0"/--> <!--
RS232 Linux -->
        <!--prop name="PortName" type="String" value="/dev/usbtm0"/--> <!--
USB Linux, set before something like "sudo chmod 666 /dev/usbtm0" -->
        <prop name="ReceiveTimeout" type="String" value="10"/>
        <prop name="TwoByteCharacter" type="String" value="0"/>
        <prop name="Page254UseCode" type="String" value="0"/>
        <prop name="PhysicalDevice" type="String" value="TM-U220B"/>
        <prop name="PaperSize" type="String" value="80"/>
        <prop name="BaudRate" type="String" value="6"/>
        <prop name="Page255UseCode" type="String" value="0"/>
        <prop name="ServiceVersion" type="String" value="1.80"/>
        <prop name="flowControl" type="String" value="None"/>
        <prop name="FlowControl" type="String" value="1"/>

    </JposEntry>

On Thu, Nov 18, 2010 at 5:24 PM, Chatree Srichart <
[hidden email]> wrote:

> Hi community,
>
> I have a problem concerning to configuring the Epson's cash drawer for POS.
> I use an Epson TM-U220B printer. I can configure jpos.xml file for that
> because there is a example configuration for Epson TM-T88III printer in the
> jpos.xml. Unfortunately, there is not an example configuration for cash
> drawer. Could you please tell me how to configure the JposEntry in the
> jpos.xml file for a cash drawer?
>
> My cash drawer is not an Epson's model but it work fine when I test with
> the SetupPOS program of Epson.
>
> This is my JposEntry for the Epson TM-U220B printer:
>
> <JposEntry logicalName="TM-T88III">
>         <creation
> factoryClass="jp.co.epson.jpos180.util.EpsonJposServiceInstanceFactory"
> serviceClass="jp.co.epson.jpos180.ptr.T88III"/>
>         <vendor name="SEIKO EPSON" url="http://www.epson.co.jp"/>
>         <jpos category="POSPrinter" version="1.8"/>
>         <product description="EPSON TM-T88III Printer Device Service"
> name="EPSON Services for JavaPOS(TM) Standard" url="http://www.epson.co.jp
> "/>
>
>         <!--Other non JavaPOS required property (mostly vendor properties
> and bus specific properties i.e. RS232 )-->
>         <prop name="dataBits" type="String" value="8"/>
>         <prop name="Parity" type="String" value="0"/>
>         <prop name="portName" type="String" value="COM1"/>
>         <prop name="U375Compatible" type="String" value="0"/>
>         <prop name="deviceBus" type="String" value="RS232"/>
>         <prop name="DataLen" type="String" value="1"/>
>         <prop name="UsedJAI" type="String" value="0"/>
>         <prop name="TimeoutTime" type="String" value="5000"/>
>         <prop name="baudRate" type="String" value="9600"/>
>         <prop name="TwoColor" type="String" value="0"/>
>         <prop name="PortType" type="String" value="0"/>
>         <prop name="UsedNVRAM" type="String" value="0"/>
>         <prop name="StopBit" type="String" value="1"/>
>         <prop name="RetryTime" type="String" value="100"/>
>         <prop name="ErrorOption" type="String" value="1"/>
>         <prop name="ReverseEject" type="String" value="0"/>
>         <prop name="SerialPowerWaitTime" type="String" value="500"/>
>         <prop name="InputWait" type="String" value="1"/>
>         <prop name="AnalysisLevel" type="String" value="1"/>
>         <prop name="BufferSize" type="String" value="2"/>
>         <prop name="DeviceDesc" type="String" value="EPSON TM-T88III
> Printer"/>
>         <prop name="OutputLength" type="String" value="10"/>
>         <prop name="parity" type="String" value="None"/>
>         <prop name="stopBits" type="String" value="1"/>
>         <prop name="PortName" type="String" value="COM1"/>  <!-- Windows
> -->
>         <!--prop name="PortName" type="String" value="/dev/ttyS0"/--> <!--
> RS232 Linux -->
>         <!--prop name="PortName" type="String" value="/dev/usbtm0"/--> <!--
> USB Linux, set before something like "sudo chmod 666 /dev/usbtm0" -->
>         <prop name="ReceiveTimeout" type="String" value="10"/>
>         <prop name="TwoByteCharacter" type="String" value="0"/>
>         <prop name="Page254UseCode" type="String" value="0"/>
>         <prop name="PhysicalDevice" type="String" value="TM-T88III"/>
>         <prop name="PaperSize" type="String" value="80"/>
>         <prop name="BaudRate" type="String" value="6"/>
>         <prop name="Page255UseCode" type="String" value="0"/>
>         <prop name="ServiceVersion" type="String" value="1.80"/>
>         <prop name="flowControl" type="String" value="None"/>
>         <prop name="FlowControl" type="String" value="1"/>
>     </JposEntry>
>
> Thank you
>
> Regards,
> Chatree Srichart
>
Reply | Threaded
Open this post in threaded view
|

Re: How to configure the JposEntry for Epson's cash drawer for POS?

Chatree Srichart
I have tried to create a new JposEntry for Epson cash drawer without
property like this:

<JposEntry logicalName="CD-100M">
        <creation
factoryClass="jp.co.epson.jpos182.util.EpsonJposServiceInstanceFactory"
serviceClass="jp.co.epson.jpos182.drw.CashDrawerService"/>
        <vendor name="SEIKO EPSON" url="http://www.epson.co.jp"/>
        <jpos category="CashDrawer" version="1.11.1"/>
        <product description="Printer controlled Cash Drawer" name="CD-100M"
url="http://www.epson.co.jp"/>
    </JposEntry>

But I got error like this:

Caused by: java.lang.NullPointerException
        at java.lang.String.lastIndexOf(Unknown Source)
        at java.lang.String.lastIndexOf(Unknown Source)
        at jp.co.epson.jpos182.drw.CashDrawerService.readJSD(CashDrawerS
        at jp.co.epson.jpos182.drw.CashDrawerService.open(CashDrawerServ
        at jpos.BaseJposControl.open(Unknown Source)
        at org.ofbiz.pos.device.GenericDevice.open(GenericDevice.java:47
        at org.ofbiz.pos.device.DeviceLoader.load(DeviceLoader.java:165)

It seem like the CashDrawerService need a JSD property to be specified. But
I don't know the property's name and value for the JSD.

Regards,
Chatree Srichart
Reply | Threaded
Open this post in threaded view
|

Re: How to configure the JposEntry for Epson's cash drawer for POS?

Jacques Le Roux
Administrator
Hi Chatree,

I'm off today, but I will try to help you this evening if needed. Normally you don't need to worry about cash drawers. You simply
connect them through the printer...

Jacques

From: "Chatree Srichart" <[hidden email]>

>I have tried to create a new JposEntry for Epson cash drawer without
> property like this:
>
> <JposEntry logicalName="CD-100M">
>        <creation
> factoryClass="jp.co.epson.jpos182.util.EpsonJposServiceInstanceFactory"
> serviceClass="jp.co.epson.jpos182.drw.CashDrawerService"/>
>        <vendor name="SEIKO EPSON" url="http://www.epson.co.jp"/>
>        <jpos category="CashDrawer" version="1.11.1"/>
>        <product description="Printer controlled Cash Drawer" name="CD-100M"
> url="http://www.epson.co.jp"/>
>    </JposEntry>
>
> But I got error like this:
>
> Caused by: java.lang.NullPointerException
>        at java.lang.String.lastIndexOf(Unknown Source)
>        at java.lang.String.lastIndexOf(Unknown Source)
>        at jp.co.epson.jpos182.drw.CashDrawerService.readJSD(CashDrawerS
>        at jp.co.epson.jpos182.drw.CashDrawerService.open(CashDrawerServ
>        at jpos.BaseJposControl.open(Unknown Source)
>        at org.ofbiz.pos.device.GenericDevice.open(GenericDevice.java:47
>        at org.ofbiz.pos.device.DeviceLoader.load(DeviceLoader.java:165)
>
> It seem like the CashDrawerService need a JSD property to be specified. But
> I don't know the property's name and value for the JSD.
>
> Regards,
> Chatree Srichart
>


Reply | Threaded
Open this post in threaded view
|

Re: How to configure the JposEntry for Epson's cash drawer for POS?

Chatree Srichart
Hi Jacques,

Every thing is working fine. I found the configuration file (jpos.xml) for
cash drawer that contains JposEntry for cash drawer like this:

<JposEntry logicalName="CD-100M">
        <creation
factoryClass="jp.co.epson.jpos182.util.EpsonJposServiceInstanceFactory"
serviceClass="jp.co.epson.jpos182.drw.CashDrawerService"/>
        <vendor name="SEIKO EPSON" url="http://www.epson.co.jp"/>
        <jpos category="CashDrawer" version="1.11.1"/>
        <product description="Printer controlled Cash Drawer" name="CD-100M"
url="http://www.epson.co.jp"/>
        <prop name="PhysicalDevice" type="String" value="Standard"/>
        <prop name="PulseONTime" type="String" value="100"/>
        <prop name="PortName" type="String" value="COM1"/>
        <prop name="ClosedStatusPhase" type="String" value="0"/>
        <prop name="Uses" type="String" value="TM-U220B"/>
        <prop name="PulseOFFTime" type="String" value="400"/>
        <prop name="PortType" type="String" value="0"/>
        <prop name="Parity" type="String" value="0"/>
        <prop name="DeviceDesc" type="String" value="EPSON Standard
CashDrawer"/>
        <prop name="ServiceVersion" type="String" value="1.82"/>
        <prop name="TimeoutTime" type="String" value="5000"/>
        <prop name="DataLen" type="String" value="1"/>
        <prop name="RetryTime" type="String" value="100"/>
        <prop name="ReceiveTimeout" type="String" value="10"/>
        <prop name="PinNO" type="String" value="0"/>
        <prop name="deviceBus" type="String" value="Unknown"/>
        <prop name="FlowControl" type="String" value="1"/>
        <prop name="StopBit" type="String" value="1"/>
        <prop name="BaudRate" type="String" value="7"/>
        <prop name="OutputLength" type="String" value="10"/>
    </JposEntry>

It's work well.

Thank you for your attention.

Regards,
Chatree Srichart

On Fri, Nov 19, 2010 at 4:06 PM, Jacques Le Roux <
[hidden email]> wrote:

> Hi Chatree,
>
> I'm off today, but I will try to help you this evening if needed. Normally
> you don't need to worry about cash drawers. You simply connect them through
> the printer...
>
> Jacques
>
> From: "Chatree Srichart" <[hidden email]>
>
>  I have tried to create a new JposEntry for Epson cash drawer without
>> property like this:
>>
>> <JposEntry logicalName="CD-100M">
>>       <creation
>> factoryClass="jp.co.epson.jpos182.util.EpsonJposServiceInstanceFactory"
>> serviceClass="jp.co.epson.jpos182.drw.CashDrawerService"/>
>>       <vendor name="SEIKO EPSON" url="http://www.epson.co.jp"/>
>>       <jpos category="CashDrawer" version="1.11.1"/>
>>       <product description="Printer controlled Cash Drawer" name="CD-100M"
>> url="http://www.epson.co.jp"/>
>>   </JposEntry>
>>
>> But I got error like this:
>>
>> Caused by: java.lang.NullPointerException
>>       at java.lang.String.lastIndexOf(Unknown Source)
>>       at java.lang.String.lastIndexOf(Unknown Source)
>>       at jp.co.epson.jpos182.drw.CashDrawerService.readJSD(CashDrawerS
>>       at jp.co.epson.jpos182.drw.CashDrawerService.open(CashDrawerServ
>>       at jpos.BaseJposControl.open(Unknown Source)
>>       at org.ofbiz.pos.device.GenericDevice.open(GenericDevice.java:47
>>       at org.ofbiz.pos.device.DeviceLoader.load(DeviceLoader.java:165)
>>
>> It seem like the CashDrawerService need a JSD property to be specified.
>> But
>> I don't know the property's name and value for the JSD.
>>
>> Regards,
>> Chatree Srichart
>>
>>
>
>