Eccel Technology Ltd BIORADRDR0200 Manuel D’Utilisation

Page de 73
 
 
 
24 
 
4.2.3  Write Block (0x03) 
 
 
Table 4.3 
 
The Write Block command takes as arguments the first block address to write (Block Address), the number of blocks 
to write (Write Length), the byte offset in the data buffer (Data Buffer Offset), the Authentication Key Number and 
(optionally) the Authentication Key.  If the Authentication Key is set-up, the command first tries to authenticate the 
sector which contains the first buffer.  If authentication fails, the Result Register is updated with the appropriate 
error code and command execution finishes.  After successful authentication, the data is transferred from the data 
buffer to the first block.  The command continues to write to the following blocks if the Write Length is higher than 1. 
If subsequent blocks fall into another tag memory sector this sector is authenticated using the same key.  If 
everything goes well all block bytes are copied from the Data Buffer starting from Data Buffer Offset, and the Result 
Register is updated with the ‘No Error’ code.  If the RFID Module is unable to write to the blocks an appropriate error 
code is stored in the Result Register. 
 
 
Command Number
Command Name
Valid Tag Types
Argument Offset [bytes]
0x00
0x01
0x02
0x03
0x04
Argument Name
Block Address
Write Length
Data Buffer Offset
Authentication Key 
Number
Authentication Key
Argument Size [bytes]
0x01
0x01
0x01
0x01
0x06
Argument Description
Address of the first 
block in the memory to 
which the data is to be 
written.
Number of blocks to 
write. Value has to be 
larger than 0.
Buffer offset in bytes 
from where the data is 
to be taken to write to 
the tag. The total write 
size and the offset 
must not exceed the 
data buffer length 
(number of bytes).
The 6 least significant 
bits define the 
Authentication Key 
Number from 0 to 39 
that is to be used to 
encrypt the data that is 
to be written.  If the 
most significant bit (bit 
7) is set, then the key 
will be used as key B.  If 
bit 7 is zero it will be 
used as key A.  If bit 6 is 
set, then the key will be 
taken from the 
following argument list 
(next 6 bytes).
Optional parameter 
used when bit 6 in 
Authentication Key 
Number argument is 
set. This Key will be 
used as Key B if bit 7 in 
Authentication Key 
Number is set or as Key 
A if bit 7 is not set. The 
byte order is the least 
significant byte first.
Mifare Classic
0x03
Write Block