I'm implementing the EPSON ePOS iOS SDK for an EPSON thermal printer TM-T20. The printer is connected on USB port of an Airport Express with IP 192.168.0.10.
I follow the instructions of EPSON documentation (https://download.epson-biz.com/modules/pos/index.php?page=single_soft&cid=3248&scat=50&pcat=3 in the zip file) and here's my code :
EposBuilder *builder = [[EposBuilder alloc] initWithPrinterModel:@"TM-T20" Lang:EPOS_OC_MODEL_ANK];
if (builder != nil)
{
int errorStatus = EPOS_OC_SUCCESS;
errorStatus = [builder addText: @"Hello,\t"];
errorStatus = [builder addText: @"World!\n"];
errorStatus = [builder addCut: EPOS_OC_CUT_FEED];
EposPrint *printer = [[EposPrint alloc] init];
if (printer != nil)
{
errorStatus = [printer openPrinter:EPOS_OC_DEVTYPE_TCP DeviceName:@"192.168.0.10"];
}
}
Unfortunately, the "errorStatus" has a "2" value, which is an "opening error".
Then I was telling myself, that I have to pass by the Bonjour protocol, but the same.
It's been 3 days I'm struggling with that. I'm about to be crazy.
Thanks for your help