ib technology
Command Protocol
The following commands are supported. The corresponding acknowledge code should be read
back by the host and decoded to confirm that the command was received and handled
correctly. The serial bit protocol is 9600 baud, 8 bits, 1 stop, no parity (lsb transmitted first).
The status flags returned in the Acknowledge byte are as follows:
b7 b6 b5 b4 b3 b2 b1 b0
1 1 1 1 1 1 1 1
| | | | | | EEPROM error (Internal EEPROM write error)
| | | | | Card OK (Card serial number matched to identity code list)
| | | | Rx OK (Card communication and acknowledgement OK)
| | | RS232 error (Host serial communication error)
| | MF type (0 = MF 1k byte card, 1 = MF 4k byte card)
|
UL type (0 = MF standard 1k/4k card,
SINGLE UID),
1 = MF Ultralight card,
DOUBLE UID)
MFRC error (Internal or antenna fault)
Note that bit 7 is fixed so that using a Mifare 1k card, the RWD acknowledge response to a
valid host command would generally be 86 (Hex), indicating that a matched (or authorised)
MF 1k card is present. The MF Ultralight card has a different memory structure to the
standard 1k/4k MF cards so bits 4 and 5 have to be checked to determine which card type is
present. Note also that only the relevant flags are set after each command as indicated in the
following specification.
Card UID
Command to return card status and UID (Unique Identifier or Serial number).
The acknowledge byte flags indicate general Mifare card status.
Command:
Acknowledge:
B7
B0
0 1 0 1 0 1 0 1
1 F F F F F F X
(Ascii “U”, 0x55)
(F = Status flags)
Data only follows if card was selected OK with no errors detected.
Reply1:
Reply2:
Reply3:
Reply4:
Reply5:
Reply6:
Reply7:
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
D
(D = LS Byte of UID/Serial number from card)
D D D D D D D D
D D D D D D D D
D D D D D D D D
Dummy bytes (0x00) for Mifare 1k/4k card types
Note that Mifare 1k and 4k cards have a four-byte serial number but Mifare Ultralight cards
have a seven-byte serial number. To accommodate all card types, the Card UID command
returns a seven-byte field with the last three bytes padded out with 0x00 dummy bytes in the
case of Mifare 1k/4k cards.
9