5
votes

Now I try to write a Java Application what uses the Epson Java Pos ADK.

What I did: -Installed Java 1.6.0_22 -Installed Java JDK -Installed Eclipse -Installed the Epson Java Pos ADK 1.11.8

Then I tried my Printer using Com Port Tool, I send him Hexadecimal Chars to see if all works. It does!

Then I started developing my Application. In the jpos.xml I used the SetupPOS generator within the Epson Java Pos ADK Package.

I used a few lines to make a test print from my Application:

posPrinter = new POSPrinter();
posPrinter.open("##THE_NAME_I_SET_IN_JPOS_XML##");      
posPrinter.claim(0);
posPrinter.setDeviceEnabled(true);
posPrinter.printNormal(station, "xxxxxxxxxxxxxxxxxx\n");
posPrinter.cutPaper(0);
posPrinter.release();
posPrinter.setDeviceEnabled(false);
posPrinter.close();

But the result of this app is:

jpos.JposException: It is not initialized. at jp.co.epson.upos.pntr.CommonPrinterService.checkInitialized(Unknown Source) at jp.co.epson.upos.pntr.CommonPrinterService.sendOutputData(Unknown Source) at jp.co.epson.upos.pntr.CommonPrinterService.sendOutputData(Unknown Source) at jp.co.epson.upos.pntr.CommonPrinterService.executeNormalPrint(Unknown Source) at jp.co.epson.upos.pntr.CommonPrinterService.printNormal(Unknown Source) at jpos.POSPrinter.printNormal(Unknown Source) at Printer.(Printer.java:146) at Main.main(Main.java:28)

I tried this on two different PC's (Vista and XP 32bit), with the same Versions and Tools, but it's always the same.

I also tried the JavaPos Example Test App and the EpsonHealtCheckTool. It's also the same with this tools.

Don't know what else to try, does everyone knows the problem?

PS: My Printer Epson TM-U220A, the serial connection seems to work, because when I try to claim the Printer and another Application uses the COM Port, My App says that the Port is not available.

Thanks.

1

1 Answers

1
votes

I've found out whats the issue: I used the wrong cable.

I made my own, see the Epson documentation below:

Null Modem Cable for Epson POS Printer