ZD410 bluetooth printing

// Expert user has replied.
D Dmitriy Abramkin 3 years 6 months ago
131 2 0

I need to build app for to send PDF file on ZD410 printer using bluetooth connection. Is there any solutions to handle it? Any information will be helpful, thank you.
 
UPDATE:
here is my code from test application
 
try {  mmSocket.connect();  } catch (IOException e1) {      android.util.Log.e(TAG, e1.toString());  try {      android.util.Log.i(TAG, "Trying fallback...");      mmSocket =(BluetoothSocket) mmDevice.getClass().getMethod("createRfcommSocket", new Class[] {int.class}).invoke(mmDevice,1);      mmSocket.connect();      android.util.Log.i(TAG, "Connected");  } catch (Exception e2) {      android.util.Log.e(TAG, "Couldn't establish Bluetooth connection!");      try {        mmSocket.close();      } catch (IOException e3) {        android.util.Log.e(TAG, "unable to close() " + mSocketType + " socket during connection failure", e3);      }      connectionFailed();      return;   }}
 
“java.io.IOException: read failed, socket might closed or timeout, read ret: -1” exception appears while i'm trying to connect my android device with Zebra ZD410 printer.
This code works well with Epson printer and some other devices, but not with zebra ZD410 printer. What can be a reason?

Please Register or Login to post a reply

2 Replies

G Gregory Pawlik

Hi Dimitriy,
First make sure that the ZD410 printer and pair with your Android device by itself as to make sure that the printer is capable of a Bluetooth connection with the device.
As far as having your app communicate via Bluetooth to the printer, we recommend developing your app with the Link-OS™ Multiplatform SDK | Zebra
It contains Andoid APIs that allow for Bluetooth communication with Zebra printers.

Also, since you are printing a PDF, I wanted to ask if you were able to convert it into an image and wrap it in ZPL.  The PDF would need to converted into ZPL in order for it to print on the ZD410.

Greg

D Dmitriy Abramkin

Thanks for reply Greg

I checked direct Bluetooth connection with my Nexus 7 and it's works well.
Then i downloaded and installed Link-OS SDK as you said, but unfortunately it's still doesn't work, i was trying to use demo app provided with installation package "ZSDK_DemosAndroid".
Here is what i got with "Printer Status" function

03-31 10:36:21.236 633-694/? W/qcom_sensors_hal: hal_sensor1_data_cb: SENSOR1_MSG_TYPE_BROKEN_PIPE
03-31 10:36:21.264 23281-23281/? E/Diag_Lib:  Diag_LSM_Init: Failed to open handle to diag driver, error = 2
03-31 10:36:21.264 23281-23281/? E/Sensors: sns_fsa_la.c(386):fsa: fflush failed, 9
03-31 10:36:21.265 23281-23281/? E/Sensors: sns_fsa_la.c(386):fsa: fflush failed, 9
03-31 10:36:21.293 23281-23283/? W/Sensors: sns_smr_la.c(446):smr_la: smr_apps_la_thread_main is starting, fd=11, sns_smr.en_rx_msg_ptr=b7002a00
03-31 10:36:21.312 23281-23285/? W/Sensors: sns_sam_app.c(6827):sns_sam_reg_algo: Registering algo service 16, err 0
03-31 10:36:21.319 23281-23287/? E/Sensors: sns_debug_main.c(565):Debug Config File missing in EFS!
03-31 10:36:24.816 17048-17114/? W/bt_rfcomm: PORT_StartCnf failed result:4
03-31 10:36:24.823 17048-17116/? E/bt_btif_sock_rfcomm: find_rfc_slot_by_id unable to find RFCOMM slot id: 8
03-31 10:36:24.825 19328-23242/com.zebra.android.devdemo W/BluetoothAdapter: getBluetoothService() called with no BluetoothManagerCallback
03-31 10:36:29.987 17048-17114/? W/bt_sdp: SDP - Rcvd conn cnf with error: 0x4  CID 0x49
03-31 10:36:29.990 17048-17116/? E/bt_btif_sock_rfcomm: find_rfc_slot_by_id unable to find RFCOMM slot id: 9

Printer configuration label
:

BR, Dmitriy

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