![Access Interfacing Solutions ATR110 Скачать руководство пользователя страница 40](http://html.mh-extra.com/html/access-interfacing-solutions/atr110/atr110_product-manual_455305040.webp)
Page
40
of
70
Copyright © Access-IS 2016
7.5 MIFARE write block (key A or key B)
Use this command to authenticate the specified MIFARE block against the MIFARE
media’s internal
Key A or B and then write the specified data into that block.
You must load the MIFARE key using
(on page 37) before sending this command.
Note:
This command is NOT applicable to MIFARE Ultralight cards and fails if executed on
Ultralight cards. To write to an Ultralight card use the MIFARE Ultralight write block command (on
page 45).
7.5.1 MIFARE command bytes
MIFARE command bytes
Command header
Command code
Block number
Block data
[0x00]
[0x08]
Write block (Key A)
Block number
16 bytes
[0x18]
Write block (Key B)
[0x48]
Authenticate and write block (Key A)
[0x58]
Authenticate and write block (Key B)
[0x88]
or
[0xC8]
RF select, authenticate and write block (Key A)
[0x98]
or
[0xD8]
RF select, authenticate and write block (Key B)
7.5.2 MIFARE response bytes
MIFARE response bytes
Response header
Response code
Block number
Status bytes
[0x00]
Any one of the following
values
(Command code + 1)
[0x09]
or
[0x19]
Block number
[0x90][0x00]
Success
Failure
Refer to page 48 for information on MIFARE failure status codes.
7.5.3 Example
This command successfully writes 16 bytes to block number 2, using the loaded key authenticated
against Key A in the media.
Command:
[0x00][0x48][0x02][0x01][0x02][0x03][0x04][0x05][0x06][0x07]
[0x08][0x09][0x10][0x11][0x12][0x13][0x14][0x15][0x16]
Response:
[0x00][0x49][0x02][0x90][0x00]