Alert information returning appended in the response of unrelated SGD.GET command.

// Expert user has replied. //Solved
S SDK NDD 10 months ago
83 1 1

Hi,

 

We are developing the capture of Alerts of Link-OS printers, via USB using SGD Commands, and noticed a strange behaviour:

The alert information is returning appended on the response value of the first SGD.GET Command executed after the alert is created on the Printer.

 

Here is how to reproduce the problem:

The printer was previously configured to send alerts via USB with the command below:

 

SGD.SET("alerts.add", "HEAD OPEN,USB,Y,Y,,0,N,", Connection);

 

Then the steps are these:

1 - Open the Print Head

2 - Execute a SGD command unrelated to Alert, like:

String serialNumber = SGD.GET("device.unique_id", connection);

 

The returned value of serialNumber comes like this: "ERROR CONDITION: HEAD OPEN [2024-01-15 19:08:32] [T3J231401598]\r\nT3J231401598"

 

Instead of returning the Serial, its returning "Alert info + Serial".

 

If we run the SGD.GET again, the Alert information does not come appended anymore.

 

This was done using a Zebra ZT231.

 

Is this the expected behaviour or is a bug?

 

Best regards,

 

Please Register or Login to post a reply

Accepted Solution

S Steven Si

This is an expected behavior. The printer was configured to send the alerts over USB. When open the printer head, an alert is generated and sent over USB. The alert will stay on the other end of USB until it's read. Then an SGD.GET() is called to get the printer serial number. This will trigger the printer to send the serial number to the other end of USB. When the SGD.GET() tries to read the serial number from USB, the alert that is sent prior to the serial number will be read along with the serial number together. So, the SGD.SET() will get both the alert and the serial number off USB.

1 Replies

S Steven Si

This is an expected behavior. The printer was configured to send the alerts over USB. When open the printer head, an alert is generated and sent over USB. The alert will stay on the other end of USB until it's read. Then an SGD.GET() is called to get the printer serial number. This will trigger the printer to send the serial number to the other end of USB. When the SGD.GET() tries to read the serial number from USB, the alert that is sent prior to the serial number will be read along with the serial number together. So, the SGD.SET() will get both the alert and the serial number off USB.

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