Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
337 views
in Technique[技术] by (71.8m points)

zpl - Why zebra printer encodes hex data into RFID when I want ASCII

I use this code to encode ASCII into RFID, but when I read data with other tools and not a printer it returns me HEX code.

^XA
^F050, 50
^A0N, 40
^FN0
^FS
^RFW, A
^FD001325
^FS
^FN0
^RFR, A
^FS
^HV0
^XZ

What am I missing?

question from:https://stackoverflow.com/questions/65847176/why-zebra-printer-encodes-hex-data-into-rfid-when-i-want-ascii

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

As far as I know, RFID tag memory is always encoded using hexadecimal format. So even though your input is ASCII, it is written as hexadecimal. In fact, all 3 formats: A (ASCII), H (Hexadecimal), E (EPC decimal) are always written as hexadecimal to tag memory. So when you read tag data, you always read its hexadecimal value. If you want to read the data in different format, you just have to translate it. I prefer to translate the hexadecimal tag data to groups of four binary characters(1 hex digit to 4 binary digits) and then to decimal format. And thats it.

To wrap it up - there is no mistake, this is how it works. You just have to translate the read data.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...