EPSON サーマルプリンター TM-T20 用の EPSON ePOS iOS SDK を実装しています。プリンターは、Airport Express の USB ポートに IP 192.168.0.10 で接続されています。
EPSON のドキュメント ( https://download.epson-biz.com/modules/pos/index.php?page=single_soft&cid=3248&scat=50&pcat=3 zip ファイル内) の指示に従います。コードは次のとおりです。
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日間です。気が狂いそうです。
ご協力いただきありがとうございます