How to reset the bluetooth connection

I have a problem,

When printing for the first time with zpl does it with no problem, but when it reprints no, it is as if I lost the Bluetooth connection, I have tried using the ConnectionReestablisher class, but I have not been able to use the zebra SDK.

I have this Singleton in Java:

 

public static Connection getInstance(String mac){

   if (printerConnection == null){

   printerConnection = new BluetoothConnection(mac);
  try {

   printerConnection.open();
   } catch (ConnectionException e) {

  e.printStackTrace();
   Log.e(Properties.TAG, "The connection was not established because " +

   "the printer is turned off or is not a compatible device!",e);
  return null;
   }

  }

 

   return printerConnection;
}

 

 

If you could help me, thank you!

Manuel Caicedo-...
Hi Daniel,Please, could you

Hi Daniel,

Please, could you share with us the printer that you are using with your application and the version of the firmware.

Thanks,

MC

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


daniel Ppe
I'm using iMZ320 Firmware V73

I'm using iMZ320

Firmware V73.19.15Z

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Manuel Caicedo-...
Daniel,What version of the

Daniel,

What version of the Link-OS - Android are you using?

MC

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


daniel Ppe
MC, The version of Link-OS -

MC,

The version of Link-OS - Android is : v2.11.2800

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Manuel Caicedo-...
Daniel,There are several

Daniel,

There are several possibilities of how you are getting this behavior with the printer.

1.)Time out of the printer or mobile computer, and/or Bluetooth is too short.

2.)As Zebra best practices, we recommend that you should open communication with the printer, verify status of the printer before to send the print job, transmit or send the file or print job to the printer, then you should close the port. It is possible that you are not re-opening the communication, or closing the communication in each cycle of transmission.

3.)Battery does not have enough energy.

If you want to know more about our Zebra's best practices for printing apps, please, review the link below.

Zebra Technologies - Best Practices in Creating a Printing Application for Zebra Printers

Please, let me know if this information was useful.

MC

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


daniel Ppe
I have been testing and it

I have been testing and it prints me maximum 4 tickets, without closing the Bluetooth connection, but when sending the 5 ticket, send me the following Exception:

com.zebra.sdk.comm.ConnectionException: Could not connect to device:  is not a valid Bluetooth address

                                                               at com.zebra.sdk.comm.ConnectionA.open(Unknown Source)

                                                               at com.zebra.sdk.comm.BluetoothConnection.open(Unknown Source)

1. The battery is 100%

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Manuel Caicedo-...
Daniel,Please, could you send

Daniel,

Please, could you send me the "allcv" report of the printer to this email: ISV_NALA_Support@zebra.com

Zebra Technologies - Using the SGD Allcv Command to return the Super Host Status

Thanks,

MC

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments