react-native-star-io10 icon indicating copy to clipboard operation
react-native-star-io10 copied to clipboard

Multiple opened connections

Open joarwilk opened this issue 3 years ago • 3 comments

Hi,

Is it possible to have multiple opened connections to one printer? For example multiple POS-devices getting status updates from the same printer.

Also, is there a way to prevent a printer from being stuck in an "opened" mode?

Thanks

joarwilk avatar Aug 10 '21 10:08 joarwilk

@joarwilk the short answer is no its not possible. There's lots of reasons why and sometimes they will depend on the printer OR interface OR the device being used for printing.

To your second question, the simplest way is to close the connection after each print, especially if you plan on sharing the printer among multiple devices.

gare-bear avatar Aug 30 '21 21:08 gare-bear

Thank you for the answer.

Just so we are aware, a standard "open, get status, close" process, how long would you expect that to take? Is it reasonably to have multiple (15) POS devices ping multiple (10) printers every 5s or so for status and not have them collide?

joarwilk avatar Sep 02 '21 08:09 joarwilk

Just so we are aware, a standard "open, get status, close" process, how long would you expect that to take?

@joarwilk a few seconds but really it depends on a variety of factors such as the connection type, the type of receipt (text or image-based) and the length of the receipt. BLE is the slowest, LAN being the fastest (shareable) connection type. For a 6" receipt, on a LAN printer, I'd say approximately 5 seconds.

Is it reasonably to have multiple (15) POS devices ping multiple (10) printers every 5s or so for status and not have them collide?

Unfortunately, I think you're going to see lots of collisions. Instead, I'd suggest you check the printer status before attempting to print. If you're unsuccessful connecting to the printer, then you can choose a different (from your 10) printers.

gare-bear avatar Sep 07 '21 19:09 gare-bear