I am developing an application for Motorola MC9190 RFID handheld reader.
I am in need of reading and writing information as human-readable in UHF RFID tag. So I decided to write information in ASCII characters.
On doing some research, I found that it is possible to write ASCII character in RFID tag memory but it supports less characters. I wouldn't mind until it is less than 10 characters.
references:
http://blog.atlasrfidstore.com/types-of-memory-in-gen-2-uhf-rfid-tags
Now, I am little bit confused how do I write and read ASCII character directly in reader.
This is the code for writing in hexadecimal character.
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"; //for example
RunWriteOperation(m_SelectedTagID,m_WriteParams);
}
void RunWriteOperation(string m_SelectedTagID,Symbol.RFID3.TagAccess.WriteAccessParams m_WriteParams)
{
if (m_SelectedTagID != String.Empty)
{
m_ReaderAPI.Actions.TagAccess.WriteWait(m_SelectedTagID,m_WriteParams, null);
}
}
If I want to write in ASCII, it should be encoded as ASCII bytes I guess. So instead of for loop, if I replace the following code, will it write successfully?
string dataToWrite="HELLOWORLD";
byte[] writeData = ASCIIEncoding.ASCII.GetBytes(dataToWrite);
Since I don't have the reader with me, I could not able to test now.
If it gets success, when reading the tag, how can I configure the reader to decode as ASCII character and display it or should I need to convert programmatically?
Since I am new to RFID technology, I am not sure I have done the research correctly. Please correct me if I am wrong.