Error communication with Epson FP-81 II (fiscal printer)

1.3k views Asked by At

When I download driver they proporcionate backend code. When execute, the method claim() return error 106.

// Console.WriteLine("Initializing PosExplorer ");
posExplorer = new PosExplorer();

// Console.WriteLine("Taking FiscalPrinter device ");
DeviceInfo fp = posExplorer.GetDevice("FiscalPrinter", "FiscalPrinter1");

// Console.WriteLine("Creating instance of FiscalPrinter device ");
posCommonFP = (PosCommon)posExplorer.CreateInstance(fp);
posCommonFP.StatusUpdateEvent += new StatusUpdateEventHandler(co_OnStatusUpdateEvent);

// Console.WriteLine("Initializing FiscalPrinter ");
FiscalPrinter fiscalprinter = (FiscalPrinter) posCommonFP;

Console.WriteLine("Performing Open() method ");
fiscalprinter.Open();

Console.WriteLine("Performing Claim() method ");
fiscalprinter.Claim(1000); // Exception

Message error:

ErrorCode: Illegal
ErrorCodeExtended: 10002
Message: Stub message. LockPort Error. IORet = 4

Question relationed

2

There are 2 answers

0
Vitaly On BEST ANSWER

Is neccesarry change port to 9100 for model printer FP-81 II.
Supported by EPSON.

NPort configuration

6
kunif On

Please check if the port name setting by Epson.opos.tm.setpos.exe/SetupPOS.exe etc. is correct.


ErrorCodeExtended: 10002 will be below.
It is described in "C:\Program Files (x86)\OPOS\Epson2\Include\epson.h".

const LONG EPSNERREXT = 10000; // EPSON specific error base
const LONG OPOS_EX_BADPORT = 2 + EPSNERREXT; // invalid Port

It is described in "C:\Program Files\epson\OPOS for.NET\Documentation\OPOS Error Code.pdf"

Error Code  Extended Error Code
Illegal     EX_BADPORT
"The port name is illegal."

Message: Stub message.LockPort Error.IORet = 4 may be internal to EPSON.