Question

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

Was it helpful?

Solution

I hope you've been able to solve this already, but here's a couple of things to think about. First, in ePOS-Print_DK_iOS... manual that I'm looking at, the TM-T20 is not listed as a valid printer type for initWithPrinterModel. The valid values it lists are: TM-T88V, TM-T70, TM-P60, and TM-U220. Maybe try the T70? Or maybe it's not compatible with the ios sdk?

Another thing to try is to see if you can access the web-based config utility for the printer. Go to

http://192.168.0.10

(I'm assuming yours has one, I'm using a TM-U220B.) If you can't reach the config web utility, you probably can't reach the printer.

There's probably a way to dump the ip config of the printer. (On mine, I hold in the "stupid-little-button" on the ethernet interface for 3 seconds.

It's also possible that it won't work with the USB -- the airport might not include that in the IP network. I don't know too much about that.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top