Our APIs for writing on RFID tags are based on official GS1 documentation : "UHF RFID Protocol for Communications at 860 MHz – 960 MHz" which can be found in www.gs1.org. Please refer to this documentation for better undestanding on RFID communication protocol.
Version 1.0.9 can be found here : http://www.gs1.org/sites/default/files/docs/epc/uhfc1g2_1_0_9-standard-20050126.pdf
Change RFIG tag password
It is advised to verify if the current tag password you are using is still the default 00000000, with the read command for any memory bank : gen2UnitaryReadOperation(String accessPassword,int bank,String wordAddress,int numberReadWords)
To change password, the command to use is correct : gen2UnitaryWriteOperation( String accessPassword, int bank, String wordAddress, String dataToWrite)
This method follows the standard RFID tag memory management, that you can find in this official GS1 document : http://www.gs1.org/sites/default/files/docs/epc/uhfc1g2_1_0_9-standard-20050126.pdf
Refer to Chapter: 184.108.40.206 Tag memory. Please read this carefully before you start managing RFID memory.
The parameters are as follows :
accessPassword : current tag password
bank : memory bank to write to (0 for reserved memory bank)
wordAddress : the word address to access for given bank
dataToWrite : data to write in given bank (your new password in your scenario)
The parameters wordAddress and dataToWrite change according to your need :
To write both kill and access password:
wordAddress = 00000000
dataToWrite = 0000000000001234 : where 00000000 is killPassword and 00001234 is new accessPassword
To only write access password :
wordAddress = 00000002
dataToWrite = 00001234 : is new accessPassword
For your information, there are several tools available on the net, that can help you understand and manage RFID memory :
Our command follow the standard specified in the official international document : http://www.gs1.org/sites/default/files/docs/epc/uhfc1g2_1_0_9-standard-20050126.pdf
Refer to chapter : 220.127.116.11.3.5 Lock, and Figure 6.24 – Lock payload and usage
Please read this carefully in order to manage the right parameters.
There are 20 bits (10 for mask and 10 for action). The Embidevice command requires a 2 bytes (16 bits) in hexadecimal value for mask and action. So there are six bits at the beginning set to 0 by default, to fill in the first byte.
Exemple for kill password lock :
Mask kill password is: 0000 0011 0000 0000 => in hexa 0300 for command parameter
Action permalock is : 0000 0001 0000 0000 => in hexa 0100 for command parameter
The mask is unique for every bank. Action can be set to 4 different values, for each mask. See previous doc for more details.
Find the screenshots below for bit convertion exemple