2021-06-23 01:33 PM
I use the standard function " STUHFL_T_RET_CODE Gen2_Lock(STUHFL_T_Gen2_Lock *lockData) " to Lock a Tag, But now I wanted to unlock the same Tag and following the standards information in Gen2 protocol Like the pictures below, I try using the same function but with a different "mask" but don't obtain a successful.
Is It possible to Unlock a Tag? Can you send a Mask to Unlock all Fields in one Tag?
Mask to Lock: FFFFFh.
Mask to Unlock: FFC0h.
https://www.gs1.org/sites/default/files/docs/epc/Gen2_Protocol_Standard.pdf
Solved! Go to Solution.
2021-06-30 03:58 AM
Dear GPaiv.1,
looking at the lock mask you was using it seems that all memory banks have been permalocked.
As defined in the corresponding standards:
Permalock or permalocked:
A memory location whose lock status is unchangeable (i.e. the memory location is permanently locked or permanently unlocked).
Therefore unlocking is not possible anymore.
Note that your unlock mask is missing a nibble.
Note as well that in our lock function the mask information stretches over 3 bytes - maskAction[0:2]
The 20 bit mask payload is stored as shown below
maskAction[0]: Bit 19 - Bit 12
maskAction[1]: Bit 11 - Bit 4
maskAction[2]: Bit 3 - Bit 0
For maskAction[2] the lower nibble is not used: maskAction[2] & 0xf0
I hope this information is helpful.
Cheers,
B
2021-06-30 03:58 AM
Dear GPaiv.1,
looking at the lock mask you was using it seems that all memory banks have been permalocked.
As defined in the corresponding standards:
Permalock or permalocked:
A memory location whose lock status is unchangeable (i.e. the memory location is permanently locked or permanently unlocked).
Therefore unlocking is not possible anymore.
Note that your unlock mask is missing a nibble.
Note as well that in our lock function the mask information stretches over 3 bytes - maskAction[0:2]
The 20 bit mask payload is stored as shown below
maskAction[0]: Bit 19 - Bit 12
maskAction[1]: Bit 11 - Bit 4
maskAction[2]: Bit 3 - Bit 0
For maskAction[2] the lower nibble is not used: maskAction[2] & 0xf0
I hope this information is helpful.
Cheers,
B
2021-06-30 11:53 AM
Dear Bart,
Thanks so much, for your answer.
You help a lot, I could saw now, where are my mistake.
I'm written the wrong mask.