I am developing an application for the Motorola MC9190 handheld RFID reader.
I need to read and write information as human readable in the UHF RFID tag. So I decided to write the information in ASCII characters.
In some research, I found that you can write an ASCII character in the RFID tag memory, but it supports fewer characters. I do not mind until there are less than 10 characters.
links:
https://support.tracerplus.com/index.php?/Knowledgebase/Article/View/199/15/encoding-rfid-tags-with-ascii-values-vs-hexadecimal-values-whats-the-difference
http://blog.atlasrfidstore.com/types-of-memory-in-gen-2-uhf-rfid-tags
Now I'm a little confused about how to write and read an ASCII character directly in the reader.
This is the code for writing in hexadecimal characters.
private void writeButton_Click(object sender, EventArgs e) { string dataToWrite="ABCDEF9876"; Symbol.RFID3.TagAccess.WriteAccessParams m_WriteParams; m_WriteParams.AccessPassword = 0; m_WriteParams.MemoryBank = MEMORY_BANK.MEMORY_BANK_USER; m_WriteParams.ByteOffset = 0; m_WriteParams.WriteDataLength = 6; byte[] writeData = new byte[m_WriteParams.WriteDataLength]; for (int index = 0; index < m_WriteParams.WriteDataLength; index += 2) { writeData[index] = byte.Parse(dataToWrite.Substring(index * 2, 2), System.Globalization.NumberStyles.HexNumber); writeData[index + 1] = byte.Parse(dataToWrite.Substring((index + 1) * 2, 2), System.Globalization.NumberStyles.HexNumber); } m_WriteParams.WriteData = writeData; string m_SelectedTagID = "0123456789ABCDEF";
If I want to write in ASCII, it should be encoded as the ASCII bytes that I assume. So, instead of a for loop, if I replace the following code, will it write successfully?
string dataToWrite="HELLOWORLD"; byte[] writeData = ASCIIEncoding.ASCII.GetBytes(dataToWrite);
Since I do not have a reader with me, I could not check now.
If it succeeds when reading a tag, how can I configure the reader to decode as an ASCII character and display it, or do I need to programmatically convert it?
Since I'm new to RFID technology, I'm not sure I did the research correctly. Please correct me if I am wrong.