我正在为EPSON热敏打印机TM-T20实施EPSON ePOS iOS SDK。 打印机连接到机场快车的USB端口,IP为192.168.0.10。无法与Epson POS打印机通信
我跟随EPSON文件(zip文件https://download.epson-biz.com/modules/pos/index.php?page=single_soft&cid=3248&scat=50&pcat=3)的说明,这里是我的代码:
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"];
}
}
不幸的是,“的ErrorStatus”具有“2”的价值,这是一个“打开错误” 。
然后我告诉自己,我必须通过Bonjour协议,但是一样。
已经3天了,我正在努力。我即将变得疯狂。
感谢您的帮助
感谢您的回答,但最后我直接尝试了ESC/POS语言,并且效果很好 – neospirit 2013-05-30 21:08:04
嗨,neospirit您是如何解决这个问题的?与android中的错误代码2相同。打开错误是什么意思? – Samra 2017-02-03 07:02:34