I'm reading and writing some RFID, whose EPC is 16 bit long.
Let's say I write 16 byte 00 (0x00)
on a tag, and then read the whole EPC memory, which is 20 byte long, I get:
41CB400000000000000000000000000000000000
Let's say now I write 11223344
as new EPC and then I read the memory again, I get:
3658100011223344000000000000000000000000
Keep in mind that the maximum length of the EPC byte array that you can write is 16.
Every time I read the memory there are 4 bytes more at the beginning, and I wanted to know what they mean. I think that the 3rd and 4th bytes indicates the length of the EPC: 4000 [16384]
for the 16bit
, 1000 [4096]
for the 4bit
What does the other mean?
There indeed are some additional bytes in the EPC memory before the actual EPC. Those bytes are:
You can find the details in section 6.3.2.1.2.2 of the EPC Gen2 Air Interface Standard.
If the XI bit is high, there are more bytes before the actual EPC storing some additional control information (called 'Extended Protocol Control' (XPC)). However, this is quite rare to see in practise at the moment.