Description: When attempting to access the method PrinterStatus.GetCurrentStatus()
in the Zebra.Sdk.Printer
namespace with library version 2.15.2634, everything works fine. However, after updating to version 2.16.2905, the method throws an exception. This issue occurs on a computer with a Zebra TLP 2824 Plus printer installed with the latest drivers from the Zebra website (ZDesigner version: 5.1.17.7415), connected via USB.
Steps to Reproduce:
- Install Zebra SDK version 2.16.2905.
- Connect a Zebra TLP 2824 Plus printer via USB.
- Use the
PrinterStatus.GetCurrentStatus()
method in theZebra.Sdk.Printer
namespace.
Additional Information:
- The issue occurs with both .NET Framework 4.7.2 and a test project with .NET 8.
- Updated to the latest version of Zebra SDK (3.0.3), but the issue persists.
- We have numerous Zebra printers and are a significant customer of Zebra.
I hope this helps! Let me know if you need any further assistance.
Code:
//Here build local USB connection. Discovered printer is my currently installed tlp 2824 printer. I have only one installed.
var reachableDevices = UsbDiscoverer.GetZebraUsbPrinters();
if (reachableDevices.Count == 0)
{
throw new ConnectionException("Cannot reach device. Check if cable disconnected or device is broken");
}
foreach (DiscoveredUsbPrinter usbPrinter in reachableDevices)
{
discovered = usbPrinter;
}
Zebra.Sdk.Comm.ConnectionException
HResult=0x80131500
Message=Malformed status response - unable to determine printer status
Source=SdkApi.Core
StackTrace:
at Zebra.Sdk.Printer.Internal.PrinterStatusZpl.GetStatusInfoFromPrinter() in D:\a\sdk_c\sdk_c\SdkApi_Core\src\SdkApi_Core\Zebra\Sdk\Printer\Internal\PrinterStatusZpl.cs:line 124
at Zebra.Sdk.Printer.Internal.PrinterStatusZpl.GetPrinterStatus() in D:\a\sdk_c\sdk_c\SdkApi_Core\src\SdkApi_Core\Zebra\Sdk\Printer\Internal\PrinterStatusZpl.cs:line 70
at Zebra.Sdk.Printer.Internal.PrinterStatusZpl.UpdateStatus() in D:\a\sdk_c\sdk_c\SdkApi_Core\src\SdkApi_Core\Zebra\Sdk\Printer\Internal\PrinterStatusZpl.cs:line 49
at Zebra.Sdk.Printer.PrinterStatus.GetStatusFromPrinter() in D:\a\sdk_c\sdk_c\SdkApi_Core\src\SdkApi_Core\Zebra\Sdk\Printer\PrinterStatus.cs:line 127
at Zebra.Sdk.Printer.PrinterStatus..ctor(Connection printerConnection) in D:\a\sdk_c\sdk_c\SdkApi_Core\src\SdkApi_Core\Zebra\Sdk\Printer\PrinterStatus.cs:line 119
at Zebra.Sdk.Printer.Internal.PrinterStatusZpl..ctor(Connection connection) in D:\a\sdk_c\sdk_c\SdkApi_Core\src\SdkApi_Core\Zebra\Sdk\Printer\Internal\PrinterStatusZpl.cs:line 32
at Zebra.Sdk.Printer.Internal.ZebraPrinterZpl.GetCurrentStatus() in D:\a\sdk_c\sdk_c\SdkApi_Core\src\SdkApi_Core\Zebra\Sdk\Printer\Internal\ZebraPrinterZpl.cs:line 50
at ZebraServices.Services.PrinterBase.CheckStatus() in |ZebraServices\Services\PrinterBase.cs:line 42
at ZebraRemotePrintHost.ZebraPrintHost.Print(String command) in \ZebraRemotePrintHost\ZebraPrintHost.cs:line 175
This exception was originally thrown at this call stack:
Zebra.Sdk.Printer.Internal.PrinterStatusZpl.GetStatusInfoFromPrinter() in PrinterStatusZpl.cs
Zebra.Sdk.Printer.Internal.PrinterStatusZpl.GetPrinterStatus() in PrinterStatusZpl.cs
Zebra.Sdk.Printer.Internal.PrinterStatusZpl.UpdateStatus() in PrinterStatusZpl.cs
Zebra.Sdk.Printer.PrinterStatus.GetStatusFromPrinter() in PrinterStatus.cs
Zebra.Sdk.Printer.PrinterStatus.PrinterStatus(Zebra.Sdk.Comm.Connection) in PrinterStatus.cs
Zebra.Sdk.Printer.Internal.PrinterStatusZpl.PrinterStatusZpl(Zebra.Sdk.Comm.Connection) in PrinterStatusZpl.cs
Zebra.Sdk.Printer.Internal.ZebraPrinterZpl.GetCurrentStatus() in ZebraPrinterZpl.cs
ZebraServices.Services.PrinterBase.CheckStatus() in PrinterBase.cs
ZebraRemotePrintHost.ZebraPrintHost.Print(string) in ZebraPrintHost.cs
0 Replies