Write 128bits EPC with Android and RFD8500

Hi, I cannot find any method to change the default size of EPC. Even if I send longer ids, it cuts it to 96bits.

Also, using the example code from Scan Scan Write application, i dont find how to write USER bank (if i cant write 128 bits in EPC i could use, worse case scenario, the USER bank).

Andreas Fauerbach
Please refer to the RFD8500

Please refer to the RFD8500 Developer Guide.

The write operation allows you to set bank, offset and length.

You also need to make sure, you set the length field in the PC (Protocol Control) section of the EPC Memory bank correctly.

Details about Tag encoding are described in the EPC Tag Data Standard​.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Luis Pardo
Hi, thanks for your answer,

Hi, thanks for your answer, but still cant find it.

I’m using the code from Scan_Scan_Write app, and with this versión, Command_Write has no propperty to set length.

Command_Write writeCommand = new Command_Write();
//Set the param values
int offset = 2;
writeCommand.setBank(ENUM_MEMORY_BANK.
EPC);
writeCommand.setPassword(Long.decode(
"0x00000"));
writeCommand.setOffset((
short) (offset));
byte[] data = (byte[]) ASCIIUtil.ParseArrayFromString(targetEPC, "byteArray", "HEX");
writeCommand.setData(data);
writeCommand.setCriteriaIndex((
short) 1);
sendCommand(writeCommand);

Also the protocol_config has no property to set the epc size

public void initReader() {
if (!readerInit) {
sendCommand(
new Command_abort());
Command_ProtocolConfig command_protocolConfig =
new Command_ProtocolConfig();
command_protocolConfig.setEchoOff(
true);
command_protocolConfig.setIncStopOperationNotify(
true);
sendCommand(command_protocolConfig);
setDPODisable();
setAntenna();
setStartStopTriggers();
readerInit = true;
}
}

I logged the commands sent and this is what i get:

setattr .attnum 1664 .atttype B .attvalue 1

getversion

getcapabilities

abort

protocolconfig .echooff .incstopoperationnotify

setdynamicpower .disable

setantennaconfiguration .power 270

setstarttrigger .ignorehandheldtrigger .startdelay 0 .norepeat

setstoptrigger .disablestopontagcount .stoptagcount 0 .enablestopontimeout .stoptimeout 3000 .disablestoponinventorycount .stopinventorycount 0 .enablestoponaccesscount .stopaccesscount 1

setaccesscriteria .accesscriteria .filter1maskbank epc .filter1maskstartpos 2 .filter1data .filter1mask  .filter1matchlength 0 .filter1domatch

write .password 00 .bank epc .offset 2 .data 2564D369A68B29A292C36CF6 .criteriaindex 1

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Andreas Fauerbach
Hi,Talking about PC I did not

Hi,

Talking about PC I did not mean the ProtocolConfig Command.

PC is the Protocol Control Section of the EPC memory bank!

As I stated above, it is described in the EPC Tag Data Standard document.

You should also have a look at the datasheet of the RFID Tag, or more precisely, the chip you are using.

The EPC Length field is 10h to 14h of the EPC meomory bank.

Please find the definition in the Tag Data Standard document Section 15 (EPC Memory Contents).

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Gregor Tallig
Hello,

Hello,

could you explain the solution in more detail? Do you have a snippet of source code?
As from what I had understood, I tried to prepend the write data with the protocol control bits (length of EPC). I need to write 120 hex letters (480 bits). That is, for example "001E" for the PC section of the tag. In order to write it to PC I set an offset of 0. The problem is, that I almost killed the tag with that configuration, since no data at all was written.

Here is my (not working) code:

TagAccess.WriteAccessParams writeAccessParams = tagAccess.new WriteAccessParams();
String writeData = "001E"+ DataToWriteToEPC;
writeAccessParams.setAccessPassword(0);
writeAccessParams.setMemoryBank(MEMORY_BANK.MEMORY_BANK_EPC);
writeAccessParams.setOffset(1); // start writing from word offset
writeAccessParams.setWriteData(writeData);
// set retries in case of partial write happens
writeAccessParams.setWriteRetries(5);
// data length in words
writeAccessParams.setWriteDataLength(writeData.length() / 4);
boolean useTIDfilter = true;
reader.Actions.TagAccess.writeWait(tagId, writeAccessParams, null, tagData, true, useTIDfilter);

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Gregor Tallig
Ok, I could answer my

Ok, I could answer my question now by myself:

"001E"+ DataToWriteToEPC was simply the wrong encoding for the PC section of the tag. According to
https://supportcommunity.zebra.com/s/article/Write-RFID-Tag-with-RFID-De... (see table under "How to write 128bit data?")
and
https://rfid4u.com/rfid-basics-resources/epc-gen2-memory/ (see PC encoding under "EPC MEMORY (BANK 1)")
I managed to conclude the right PC value encoding for 496 bits.
So, when writing
String writeData = "7C00"+ DataToWriteToEPC;
in the above code, the problem will be fixed :)

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments