Password protected tag -change EPC issue

N Nikolay Isakov 3 years 7 months ago
37 0 0

Hi All,

Our partner is  currently trying to write to Tag which has an access password set and try to change the EPC and get the ErrorMessage: C1G2WriteOpSpecResult failed: Tag Memory Locked.

Here is the code:

        private void WriteBankBlocks(ITag tag(=”3034F74F9440801000000028”), EpcMemoryBank bank(=1), int start(=2), byte[] data(={0x30 0x34 0xF7 0x4F 0x94 0x40 0x80 0x10 0x00 0x00 0x00 0x28}))
        {
try
{
TagAccess.WriteAccessParams writeAccessParams = new TagAccess.WriteAccessParams();
writeAccessParams.AccessPassword = PasswordToUint(UsedAccessPassword(={0x00 0x00 0x00 0x28}));
writeAccessParams.ByteOffset = (uint) (start*2);
writeAccessParams.WriteDataLength = (uint) (data.Length);
writeAccessParams.MemoryBank = (MEMORY_BANK) bank;
writeAccessParams.WriteData = data;

reader.Actions.Inventory.Stop();
reader.Actions.TagAccess.WriteWait(tag.OriginalIdentifier.ToString(), writeAccessParams, null);

}
catch (OperationFailureException of)
{
throw new DeviceException(getErrorDescription(of));
}
catch (Exception ex)
{
throw new DeviceException(ex.Message);
}
finally
{
reader.Actions.Inventory.Perform();
}
}
        private uint PasswordToUint(byte[] data)
        {
if (data == null) return 0;
else if (data.Length != 4) throw new ArgumentException("data must have exactly 4 bytes length");
return (uint)((((int)data[0])

CONTACT
Can’t find what you’re looking for?