User's Manual

CAEN RFID API User Manual
19
Locking Gen2 tags
The EPCGlobal Class1 Gen2 protocol provides a mechanism to lock temporarily or permanently blocks of tag's memory.
The user can lock an entire memory bank with the only exception of the Reserved memory bank where it is allowed to
lock independently the Access Password and the Kill Password. The lock mechanism prevents the possibility of further
modifications on locked memory banks and, only for the passwords in the Reserved memory bank, it prevents also the
possibility to read back the data (the passwords). The lock command works with a single parameter called payload that
includes both the lock's type (permanent or not) and the bank to lock. The format of the payload is described by the
following tables:
Lock-Command Payload
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Kill
Mask
Access
Mask
EPC
Mask
TID
Mask
User
Mask
Kill
Action
Access
Action
EPC
Action
TID
Action
User
Action
Masks and Associated Action Fields
Kill pwd
Access pwd
EPC memory
TID memory
User memory
0
1
2
3
4
5
6
7
8
9
Mask
skip/
write
skip/
write
skip/
write
skip/
write
skip/
write
skip/
write
skip/
write
skip/
write
skip/
write
skip/
write
10
11
12
13
14
15
16
17
18
19
Action
pwd
read/
write
perma
lock
pwd
read/
write
perma
lock
pwd
write
perma
lock
pwd
write
perma
lock
pwd
write
perma
lock
Tab. 3.3: Lock payload and usage
pwd-write
permalock
Description
0
0
Associated memory bank is writeable from either the open or secured
states
0
1
Associated memory bank is permanently writeable from either the open or
secured states and may never be locked
1
0
Associated memory bank is writeable from the secured state but not from
the open state
1
1
Associated memory bank is not writeable from any state
pwd-read/write
permalock
Description
0
0
Associated password location is readable and writeable from either the
open or secured states
0
1
Associated password location is permanently readable and writeable from
either the open or secured states and may never be locked
1
0
Associated password location is readable and writeable from secured state
but not from open state
1
1
Associated password location is not readable or writeable from any state
Tab. 3.4: Lock Action-field functionality
The CAEN RFID API provides a method (LockTag_EPC_C1G2) to lock the tag's memory contents that mimic exactly the
behaviour of the protocol command. The payload parameter is implemented as a bitmask with the meaning described
by the above tables. The API provides also the secured version of the LockTag_EPC_C1G2 method to be used when the
Access password is set.