After executing the StarPrinter.close() method on the printer, if the StarPrinter.open() method is executed on the same printer within a few hundred milliseconds.
Cause
It has been identified that after calling the iOS API by Apple Inc. to close the communication port of the printer, there can be a delay before the iOS device sends the communication for the closing process.
During this interval, until the printer receives the port closing process from the iOS device, the next port opening will fail.
Workaround
If the StarIO10Error.inUse error is thrown, please add an wait for approximately 500 milliseconds (*) before re-executing the StarPrinter.open() method.
In our testing, we have confirmed that a wait time of 500 milliseconds prevents this issue from occurring. However, please adjust according to your individual environment.
Phenomenon
When repeatedly printing with an execution of
StarPrinter.open()
andStarPrinter.close()
methods via LAN interface,StarIO10Error.inUse
error may be occurred inStarPrinter.open()
method.Conditions for Occurrence
StarPrinter.close()
method on the printer, if theStarPrinter.open()
method is executed on the same printer within a few hundred milliseconds.Cause
It has been identified that after calling the iOS API by Apple Inc. to close the communication port of the printer, there can be a delay before the iOS device sends the communication for the closing process. During this interval, until the printer receives the port closing process from the iOS device, the next port opening will fail.
Workaround
If the
StarIO10Error.inUse
error is thrown, please add anwait
for approximately 500 milliseconds (*) before re-executing theStarPrinter.open()
method.