Error while connecting to printer via Bluetooth

// Expert user has replied.
J Juan Manuel Garcia 2 years 11 months ago
11 1 0

We are experiencing an error when we try to connect to a printer via Bluetooth. The error started to appear when we update our android device to version 10, the app worked fine in version 9 or previous.
Our code looks like this
macAddress = tablaImpresoras.get(idiMacAddress);
if (zebraPrinterConnection == null)
{
if (macAddress != null)
{
Bluetooth.conectar();
zebraPrinterConnection = new BluetoothPrinterConnection(macAddress.trim());
zebraPrinterConnection.open();
}
}
We get the error when we call the method open and the message we are getting is the following “read failed, socket might closed or timeout, read ret: -1”
We are working with a iMZ220 printer
Any ideas on how to fix this issue?
Thanks in advance

Please register or login to post a reply

1 Replies

S Steven Si

Are you using Link-OS SDK for Android or for Xamarin? From the code snippet, it looks like you are using Link-OS SDK for Android. But I just want to be sure. What's the Android device model that runs on Android 10? The issue could be related to a specific device type with Android 10. I don't see anything wrong based on the code snippet. The code looks just fine.

macAddress = tablaImpresoras.get(idiMacAddress);
if (zebraPrinterConnection == null)
{
if (macAddress != null)
{
Bluetooth.conectar();
zebraPrinterConnection = new BluetoothPrinterConnection(macAddress.trim());
zebraPrinterConnection.open();
}
} 

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