Unable to Contact Printer(ZQ630) Within a Short Time on Android Devices

// Expert user has replied.
A Andy Kang 1 month 3 weeks ago
22 2 0

When applying the SDK to connect to the ZQ630 printer for label printing on an Android device, I encountered an issue where printing fails if consecutive print commands are sent within 1 second.However, if the interval between print commands exceeds 2 seconds, printing occurs without any issues and works normally.

Android 8.1
Bluetooth®Class I, V4.2, BLE, dual mode, V2.1 with Enhanced Data Rate (EDR)

Android 12

Bluetooth® Class II, V5.1 dual mode, V2.1 with Enhanced Data Rate (EDR)

The SDK used is from Zebra's official resources, and an exception screenshot is provided below:
Android Device: CipherLab RS51 Series https://www.cipherlab.com/en/product-271788/Rugged-Touch-Mobile-Computer-RS51-Series.html
SDK Used: Zebra LinkOS Android Samples https://github.com/ZebraDevs/LinkOS-Android-Samples?tab=readme-ov-file

Anyone could help, please?

Please Register or Login to post a reply

2 Replies

A Andy Kang

However, if the interval between print commands exceeds 2 seconds, printing occurs without any issues and works normally.

S Steven Si

Without seeing the code, we cannot be sure about the cause of the issue. In general, we should keep in mind that we don't overflow the Bluetooth buffer by transmitting a large amount of data in one shot. Secondly, we don't want to overflow the receiving buffer on the printer. The recommended workflow is to check the printer status before sending data to the printer.

  • Open a connection
  • Check the printer status to see if it's ready.
  • If the printer is ready to print, then send the print data to the printer to print. If the printer is not ready, the wait for sometime and check the status again.
  • Check the printer status again, before we close the connection. We don't want to close the Bluetooth connection prematurely, as there could be some un-transmitted data in the Bluetooth buffer waiting to be transmitted.

Please note, by default, there is a 5 sec delay when calling the connection.close() API in the SDK on a Bluetooth connection on Android.

 

CONTACT
Can’t find what you’re looking for?