Android – Epson ePos SDK – Cannot Print on Epson TM-T88VI printer

I cannot seem to be able to print on the Epson TM-T88VI printer.

I have followed the tutorial in the docs. I can find a printer with the ePos Finder class and it gets populated in the mList variable. I can build using the epos builder but

While debugging

  • the exception has been thrown on the line of printer.openPrinter(firstDevice.deviceType,firstDevice.ipAddress,Print.TRUE,10,10)
  • I get an error status of ERR_PARAM but all the paramaters are correct and I’ve tried changing paramaters around but still nothing works 🙁
  • When I go inside the method it is part of the Epson ePos SDK and it throws on the eposOpenPrinter() line.
  • I have attached the stack trace below the code below.
class MainActivity : ComponentActivity(), BatteryStatusChangeEventListener, StatusChangeEventListener{
        private var mList: Array<DeviceInfo>? = null
    
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
                initializePrinter()
    }
private fun initializePrinter() {
    try {
        Finder.start(baseContext, DevType.TCP, "192.168.0.34")
        while (mList == null || mList?.size == 0) {
            mList = Finder.getDeviceInfoList(FilterOption.PARAM_DEFAULT)
        }
        Finder.stop()
        if (!mList.isNullOrEmpty()) {
            val builder = Builder("TM-T88VI", Builder.MODEL_ANK)

            builder.apply {
                addTextLang(Builder.LANG_EN)
                addTextSmooth(Builder.TRUE)
                addTextFont(Builder.FONT_A)
                addTextSize(3, 3)
                addText("It t")
                addText("Finally Worksn")
                addCut(Builder.CUT_FEED)
            }

            val printer = Print()
            val status = intArrayOf(0)
            //wifi/ethernet
            val firstDevice = mList!!.first()


            printer.openPrinter(
                firstDevice.deviceType,
                firstDevice.ipAddress,
                Print.TRUE,
                10,
                10
            )
            printer.sendData(builder, 10_000, status)

            if ((status[0] and Print.ST_PRINT_SUCCESS) == Print.ST_PRINT_SUCCESS) {
                builder.clearCommandBuffer()
            }

            printer.closePrinter()
        }
    } catch (e: EposException) {
        e.printStackTrace()
    } catch (e: Exception) {
        e.printStackTrace()
    }
}

override fun onBatteryStatusChangeEvent(p0: String?, p1: Int) {
    TODO("Not yet implemented")
}

override fun onStatusChangeEvent(p0: String?, p1: Int) {
    TODO("Not yet implemented")
}

}

”’

The stack trace is

2024-04-30 15:16:52.524 15851-15851 System.err              com.example.printertest              W      at com.epson.eposprint.Print.openPrinter(Print.java:467)
2024-04-30 15:16:52.524 15851-15851 System.err              com.example.printertest              W      at com.example.printertest.MainActivity.initializePrinter(MainActivity.kt:47)
2024-04-30 15:16:52.524 15851-15851 System.err              com.example.printertest              W      at com.example.printertest.MainActivity.onCreate(MainActivity.kt:20)
2024-04-30 15:16:52.524 15851-15851 System.err              com.example.printertest              W      at android.app.Activity.performCreate(Activity.java:8595)
2024-04-30 15:16:52.525 15851-15851 System.err              com.example.printertest              W      at android.app.Activity.performCreate(Activity.java:8573)
2024-04-30 15:16:52.525 15851-15851 System.err              com.example.printertest              W      at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1456)
2024-04-30 15:16:52.525 15851-15851 System.err              com.example.printertest              W      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3764)
2024-04-30 15:16:52.525 15851-15851 System.err              com.example.printertest              W      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3922)
2024-04-30 15:16:52.525 15851-15851 System.err              com.example.printertest              W      at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103)
2024-04-30 15:16:52.525 15851-15851 System.err              com.example.printertest              W      at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139)
2024-04-30 15:16:52.526 15851-15851 System.err              com.example.printertest              W      at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96)
2024-04-30 15:16:52.527 15851-15851 System.err              com.example.printertest              W      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2443)
2024-04-30 15:16:52.528 15851-15851 System.err              com.example.printertest              W      at android.os.Handler.dispatchMessage(Handler.java:106)
2024-04-30 15:16:52.528 15851-15851 System.err              com.example.printertest              W      at android.os.Looper.loopOnce(Looper.java:205)
2024-04-30 15:16:52.528 15851-15851 System.err              com.example.printertest              W      at android.os.Looper.loop(Looper.java:294)
2024-04-30 15:16:52.528 15851-15851 System.err              com.example.printertest              W      at android.app.ActivityThread.main(ActivityThread.java:8177)
2024-04-30 15:16:52.528 15851-15851 System.err              com.example.printertest              W      at java.lang.reflect.Method.invoke(Native Method)
2024-04-30 15:16:52.529 15851-15851 System.err              com.example.printertest              W      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
2024-04-30 15:16:52.529 15851-15851 System.err              com.example.printertest              W      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:971) 

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật