star-micronics / react-native-star-io10

react-native-star-io10 is a library for supporting application development for Star Micronics devices.
Other
88 stars 54 forks source link

Request timed out - IOS only #16

Closed Brendan-csel closed 3 years ago

Brendan-csel commented 3 years ago

Thanks for putting this library together. It is working great for us on Android but we're having problems on IOS.

Discovery is fine although the identifier looks quite different on IOS (16 numeric digits) whereas Android has 12 alpha-numeric digits.

When trying to open the printer to either get status or print we get StarIO10CommunicationsError: Request timed out. This is when running the app from XCode with the iPhone connected via USB. I also tried running the Example apps from this project and get the same results - discovery is okay but get status and printing fails.

It looks like it is communicating at some level as, before the timeout, the bluetooth signal icon on the printer flashes multiple times.

I downloaded the mPop utility and it can discover and successfully print a sample label ...although if I try to get status or access settings it pauses for a few seconds and comes up with the message "Failure".

These are the devices involved:

Printer - Star SM-T300i firmware version 4.0 in StarPRNT mode with "Bluetooth-Auto" showing on the display. iPhone 7 running IOS 14.6

Any help is greatly appreciated.

Brendan-csel commented 3 years ago

Correction: the mPop utility successfully reads "Device Status" (cover open, online, etc). However it fails if I try the menu options for "Device information" (firmware version, etc) or "Bluetooth settings".

Brendan-csel commented 3 years ago

Here are some more settings from the printer in case this helps - although there are about 20 of these and we need them to be able to be using with both Android and IOS clients so hopefully not a printer configuration issue...

image

Brendan-csel commented 3 years ago

Also tried the StarPRNT SDK App from the AppStore and that prints okay as well (StarPRNT Swift SDK 5.14.2).

bandit-ibayashi commented 3 years ago

@Brendan-csel Thank you for your patience for a long time. From the photos you have provided, the printer settings seem to be fine.

Unfortunately, I was not able to reproduce this phenomenon. But it may be possible to improve it by changing the timeout value for getting status from the behavior you reported.

Could you try to extend the timeout to get status by adding the following code after var printer = new StarPrinter(setting); ?

printer.getStatusTimeout = 30000; // 30000ms=30s

If this does not solve this issue, there may be another factor, and it would be helpful if you could let us know if this is the case.

Thanks.

Brendan-csel commented 3 years ago

Thanks for your reply. Yes I tried the longer (30000ms) timeout and it waited longer before erroring ...but still ended up with the same error.

I did note on the supported models page that the minimum firmware for the SM-T300i is version 4.3+ and the printer we are testing with is on version 4.0 - but I've not had any response from Star about a way to upgrade the firmware yet.

Do you know if that firmware requirement is a "hard minimum" (perhaps so based on these issues)?

bandit-ibayashi commented 3 years ago

@Brendan-csel Thank you for your prompt confirmation and reply. It turns out that the timeout is not the cause of this, so I would like you to restore the timeout to the default value.

Also, inquiries about firmware updates will prompt a response from the person you inquired about. We apologize for keeping you waiting. At this time, we cannot say if this is due to the firmware version.

Brendan-csel commented 3 years ago

@bandit-ibayashi thanks. It has only been a week since I requested a way to update the firmware, both from the New Zealand and Australian Star distributors. Apparently they are still waiting on a reply from Japan. Hopefully that will come soon and I'll post another update here.

Brendan-csel commented 3 years ago

@bandit-ibayashi do you have any contacts that could provide a firmware update for these SM-T300i printers?

I don't seem to be making any progress through the distribution channels.

piyasil commented 3 years ago

I have encountered the same problem but with TSP650II Bluetooth printer. I can only get StarConnectionSettings from the onPrinterFound function but not others. Please advice.

Brendan-csel commented 3 years ago

As an update, I am still waiting to get the firmware updated in our dev printer. Hoping that will be sorted in a few days now so will report back here if it helps.

piyasil commented 3 years ago

I can now resolve the problem now. It seems to be the distance or low bluetooth signal issue. When I place my iPad next to the printer, it works fine now.

Brendan-csel commented 3 years ago

Okay it took 8 weeks to get a firmware upgrade from Star...but I have just upgraded our office SM-T300I to version 4.4 (2021/07/19) and now printing using this library works! Hurray!!