Open communication with a fiscal printer via VPN in JavaPOS

75 Views Asked by At

I'm trying to open a connection with JavaPOS to a fiscal printer via VPN. Actually, with a printer I can do this task but with a customer's printer this error comes out:

jpos.JposException: 106, 0
    at jp.co.epson.FiscalDriver.FiscalPrinter.CommonFiscalPrinterService.open(CommonFiscalPrinterService.java:2436)
    at jpos.BaseJposControl.open(Unknown Source)
    at Main.main(Main.java:11)

What do you think could be the problem? The error 106 in opening the printer communication means that the communication is already open but I've never done it.

My code:

public static void main(String[] args) 
{
    FiscalPrinter stampante = new FiscalPrinter();
    try 
    {
        stampante.open("P");
        stampante.claim(1000);
        stampante.setDeviceEnabled(true);
        System.out.println("YES !");
    } 
    catch (JposException e) 
    {
        e.printStackTrace();
    }
}
0

There are 0 best solutions below