I am using ePOS2
SDK from Epson to communicate with receipt printer TM-M30.
I am able to successfully connect to printer and print some data.
After finishing printing I am keeping connection to printer, so next time I need to print something I don't connect to it again.
However connection is alive for only 90 seconds. After 90 seconds of inactivity connection printer is dropped and Epos2Printer
notifies delegate that power is off:
func onPtrStatusChange(_ printerObj: Epos2Printer, eventType: Int32) {
let eventStatus = Epos2StatusEvent(rawValue: eventType)
// Event status is EPOS2_EVENT_POWER_OFF here
}
I don't see any parameters for Epos2Printer
to keep connection alive.
Does anybody know how force printer to keep connection beyond 90 seconds?