Able to print with insecure bluetooth, but not get status


I have a ZT410 label printer and I'm using the Android SDK. Using the code examples and the printer's bluetooth mac address, I was able to print successfully from my Android app using the BluetoothConnectionInsecure class.

However, using the same mac address and the code example to get status information using BluetoothStatusConnectionInsecure, I'm getting an error.

Here's a sample of the code I'm using to get the printer's status info:

new Thread(new Runnable() {

   public void run() {

   try {

   // Instantiate insecure connection for given Bluetooth® MAC Address.   Connection connection = new BluetoothStatusConnectionInsecure(macAddress);

   // Initialize   Looper.prepare();

   // Open the connection - physical connection is established here.;

   // This sends down JSON to the status channel to retrieve the '' setting   String firmwareVersion = SGD.GET("", connection);

  toast("The firmware version is : " + firmwareVersion);

   // Close the insecure connection to release resources.   connection.close();


  } catch (Exception e) {

   // Handle communications error here.   e.printStackTrace();




And here's the error message I'm getting:

com.zebra.sdk.comm.ConnectionException: Could not connect to device: read failed, socket might closed or timeout, read ret: -1

Anton Beza
I was able to get this

I was able to get this working by using the BluetoothConnectionInsecure for both querying status and printing. This has solved my issue.

Vote up!
Vote down!

Points: 0

You voted ‘up’

Log in to post comments