Eccel Technology Ltd BIORADRDR0200 Manuel D’Utilisation
26
4.2.5 Write Data Block (0x05)
Table 4.5
The Write Data 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 an ‘error’ value
and command execution terminates. After successful authentication, the data is transferred from the data buffer to
the first block. The Command continues to write to subsequent blocks if the Write Length is higher than 1. The
difference between Write Data Block command and Write Block Command is that the first one omits blocks with
authentication keys and lock bits. It only writes to the data blocks of Mifare tags. If subsequent blocks fall into
another sector this sector is authenticated using the same key. If everything goes well all block bytes are copied
from the Data Buffer starting from the Data Buffer Offset and the Result Register is updated with a ‘No Error’ value.
If the RFID Module is unable to write to the blocks an ‘error’ value is stored in the Result Register.
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 an ‘error’ value
and command execution terminates. After successful authentication, the data is transferred from the data buffer to
the first block. The Command continues to write to subsequent blocks if the Write Length is higher than 1. The
difference between Write Data Block command and Write Block Command is that the first one omits blocks with
authentication keys and lock bits. It only writes to the data blocks of Mifare tags. If subsequent blocks fall into
another sector this sector is authenticated using the same key. If everything goes well all block bytes are copied
from the Data Buffer starting from the Data Buffer Offset and the Result Register is updated with a ‘No Error’ value.
If the RFID Module is unable to write to the blocks an ‘error’ value 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 will 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
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
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.
0x05
Write Data Block
Mifare Classic