Get the decoded barcode in a barcode event instead of hex values

// Expert user has replied.
T Thomas Grosche 2 years 7 months ago
333 2 0

Hello, I am using the ZEBRA barcode scanner CS8060 and developing an application which uses the software developing kit provided by zebra.

I read the developers guide and used the provided examples for catching the barcode event.

The provided examples worked fine but the resulting xml file from the scanner does not has the decoded barcode but hex values that need to be converted to chars.

Example:
If I scan the data matrix barcode with the value "5932-880-20-10-004", I get a barcode event and the following xml file. I can find the part datalabel with the hex values of the barcode (see picture).

I can extract these values and convert them myself but I think it would be better to use the decoding function of the scanner if possible.

Is there any way to tell the scanner that it should give the decoded barcode value back instead of the hex values in the datalabel part?

I searched for any option like this in the developers guide but maybe I just did not find it.
If there is no such option, does the corescanner interface of the sdk provide any decoding function that could be used?

Thanks for any help in advance.

Please Register or Login to post a reply

2 Replies

J James Swinton-Bland

Hi,

According to our docs, the sample application we created parses the XML to extract the barcode data & symbology, which suggests to me that the SDK doesn't not contain built-in functions to parse this for you, however, I'm not a Scanner SDK expert and there may be other members of the community who have some more info for you.

Thanks,

James

R Riad Riad

James is correct , the scanner sends raw data in hex since it contains additional prefix or suffix information depending on protocol used ( for example it contains length of data , code type identifier and ASCII encoded decode data ) .. Other feature of SDK using these protocol follow specifications where the packets exchanged between host and scanner will be in hex too .
So unfortunately the host application needs to parse the Barcode decoded data that is coming in hex ascii format
HID mode will allow you to get what you look for but you lose the control of the scanner with SDK . Another option is to use simulated HID pump feature in corescanner . the scanner will be in SNAPI controlled by your app and you will get barcode events but at the same time the barcode decoded data will be sent to foreground application as HID data ( char format ) by the corescanner but I believe this is not something you want to pursue

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