Features - Compact size module and ANT - Card read/write frequency : 13.56Mhz±5% - Power consumption : 5[V]/300[㎃] - Reading distance : ~ 50mm - Operating Temperature : -10 ~ 70 - Storage Temperature : -25 ~ 80 - Serial communication controlled (RS-232C/9600bps/8BIT/1STOP/NONE PARITY) - ANTI-Collision procedure support. - Based on ISO/IEC-14443A&B - PCD and PICC Data transmit& Receive capacity is 256bytes(ISO-14443A&B) - Available PICC (VICC) : Mifare® standard, ISO-14443A&B STX Bit_Len_high Bit_Len_low Command Data BCC ETX HOST STX Bit_Len_high Bit_Len_low Status Response BCC ETX 1-1. Response status list Status Result Remark 0X00 Command operating Success 0X01 Type-A PICC Select error 0X02 Type-A PICC Anti-collision error 0X03 Type-A PICC Request error 0X04 Type-A or B PICC (VICC) no response 0X05 Type-A or B CRC error 0X06 Type-A or B PICC Receive Frame error 0X80 PCD Command not found 0X81 Communication error Total bit length Exclusive OR Total bit length Exclusive OR
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Features - Compact size module and ANT - Card read/write frequency : 13.56Mhz±5% - Power consumption : 5[V]/300[㎃] - Reading distance : ~ 50mm - Operating Temperature : -10� � ~ 70 - Storage Temperature : -25� �~ 80 - Serial communication controlled
(RS-232C/9600bps/8BIT/1STOP/NONE PARITY) - ANTI-Collision procedure support. - Based on ISO/IEC-14443A&B - PCD and PICC Data transmit& Receive capacity is 256bytes(ISO-14443A&B) - Available PICC (VICC) : Mifare® standard, ISO-14443A&B
STX Bit_Len_high Bit_Len_low Command Data BCC ETX
HOST
STX Bit_Len_high Bit_Len_low Status Response BCC ETX
1-1. Response status list
Status Result Remark 0X00 Command operating Success 0X01 Type-A PICC Select error 0X02 Type-A PICC Anti-collision error 0X03 Type-A PICC Request error 0X04 Type-A or B PICC (VICC) no response 0X05 Type-A or B CRC error 0X06 Type-A or B PICC Receive Frame error 0X80 PCD Command not found 0X81 Communication error
Total bit length
Exclusive OR
Total bit length
Exclusive OR
2. Communication
Set up each operating time according to ISO-14443.
2-1. RF Field Control
Host STX Bit_Len_high Bit_Len_low 0X20 Time BCC ETX
Processing sequence between Reader and card Note) In case that the multiple PICCs are in the RF field, the PCD is settled according to the Anti-collision sequence of ISO-14443.
Or
ISO-14443-3
PCD
PICC ATQA 2bytes UID 4Bytes SAK 1Bytes
REQA Anti-collision SELECT
3-3. Request A & anti-collision/select (Ready state)
Processing sequence between Reader and card Note) In case that the multiple PICCs are in the RF field, the PCD is settled according to the Anti-collision sequence of ISO-14443. 3-4. Halt Command
1 1 1 1 1 1 This command is to halt the function of the Card Among the multiple cards, it is to be used to halt the function of the Card that is under currently operating for the purpose of reading of another card. Also it is to be used in case that the operating of Card is completed.
1 1 1 1 1 1 This command is for authentication of the Card and the Card is to be authenticated through the Key of 6 Byte. The Key inside of the card is composed of Key-A and Option Key-B and this command is for KEY-A Authentication. For more details, refer to Mifare® Standard card in MF1 IC S50
1 1 1 1 1 1 This command is for authentication of the card and the card is to be authenticated through the Key of 6 Byte (Mifare® standard). The Key inside of the card is composed of Key-A and Option Key-B. It is for KEY-B Authentication. For more details, refer to Mifare® Standard card in MF1 IC S50.
1 1 1 1 1 1 This command is to start the cryptography between the card and reader and always can be operated after that the Authentication 1 Command is operated and authenticated only. For more details, refer to Mifare® Standard card in MF1 IC S50
1 1 1 1 1 1 1 Response STX Bit_Len_high Bit_Len_low Status Read Block Data BCC ETX
1 1 1 1 16 1 1 This command is to read the data on the Card. The length of Read Data is always Block unit and 1 Block is composed of 16 Byte. The Read/Write commands are available only in the Block of Sector that is defined at authentication 1 and Authentication 2 after that the operation of Authentication 1, Authentication 2 is completed.
1 1 1 1 1 1 This command is to write the data on the Card. The length of Write Data is always Block unit and 1 Block is composed of 16 Byte. The Read/Write commands are available only in the Block of Sector that is defined at
Authentication 1 and Authentication 2 after that the operation of Authentication 1, Authentication 2 is completed.
1 1 1 1 1 1 It is to write the Key or data on the EEPROM inside of the Card Reader. As the Key coming from outside could be flowed out, it prevent the Key from the out-flowing by means of writing the Key on the EEPROM inside of the Card Reader. The Block Address is to be written so as to be located with the Key of the Card on the basis of 6 Byte internally.
3-11. AuthenticationE2 Command
Host STX Bit_Len_high Bit_Len_low 0X68 Key Type E2 Start Address
1 1 1 1 1 1 Authentication Block BCC ETX
1 1 1 Response STX Bit_Len_high Bit_Len_low Status BCC ETX
1 1 1 1 1 1 Authentication E2 Command can operate the Authentication 1 without out-flowing of the data to outside using the internal EEPROM of the Card Reader. Using the EEPROM Key Buffer structure as mentioned above, it can be stored in production or before outgoing. Also if necessary, it can be modified to the goods under operation Key_Type (00H : Authentication1A, 01H : Authentication1B) Note : WriteE2 or AuthenticationE2 Command supports Mifare® standard card key format
3-12. Increment & Transfer Command (based on Mifare® standard card)
Host STX Bit_Len_high Bit_Len_low 0X69 Block Transfer Address
1 1 1 1 1 1 Increment Value BCC ETX
4 1 1 Response STX Bit_Len_high Bit_Len_low Status BCC ETX
1 1 1 1 1 1
Mifare® supports the function of Debit(Value) card and it enables us to do e-payment. It is used as the command for increment or decrement of fixed value with 4byte of value byte in case of Mifare®. BLOCK structure
Note) when using it as Debit(value) card, it is necessary to define the trailer access byte as
value block in every sector. PICC Data maximum bytes: 32bytes Increment Value: 4byte value for increment Transfer_Address: transfer the value of card data register to the memory area of the card.
3-13. Decrement & Transfer Command (based on Mifare® standard card)
Host STX Bit_Len_high Bit_Len_low 0X6A Block Transfer Address
1 1 1 1 1 1 Decrement Value BCC ETX
4 1 1 Response STX Bit_Len_high Bit_Len_low Status BCC ETX
1 1 1 1 1 1
Mifare® supports the function of Debit(Value) card and it enables us to do e-payment. It is used as the command for increment or decrement of fixed value with 4byte of value byte in case of Mifare®. BLOCK structure
Note) when using it as Debit(value) card, it is necessary to define the trailer access byte as
value block in every sector. PICC Data maximum bytes: 32bytes Increment Value: 4byte value for increment Transfer_Address: transfer the value of card data register to the memory area of the card. Decrement_Value: as the 4byte value, it is for the processing with the value of PICC value block.
3-14. Restore Command (based on Mifare® standard card)
1 1 1 1 64 1 1 Read the data of PICC as the unit of sector. Sector is based on the sector of Mifare®. 1 sector is composed of 64byte. The sector that can be read by Read sector command means the sector that included the address of block defined when Authentication-1.
4. Reference 4-1. Card Reader (PCD) Operating Procedure(Mifare®) CASE 1
1. Configuration Command send 2. RF Field Control Command send 3. Request A & Anti-Collision/Select Command send 4. In case Status and .ATQA , UID , SAK confirmation ERROR, retry from No. 2 5. In case Authentication1A , Authentication1B , AuthenticationE2 Command ERROR, retry
from No. 2 6. In case Authentication2 Command Error, retry from No. 2 7. Read/Write/Increment & transfer /Decrement & transfer/Restore operation 8. In case Halt Command send, operate from No. 3, operation repeatedly
4-2. Mifare® Standard Card Structure The capacity of Mifare® Standard Card is 1 Kbytes and it is composed of Block structure. 1 Block is composed of 16 Byte. 4 Block is 1 Sector. The high-ranking Block 16 Byte in each
Sector is composed of the Trailer consisting of the Sector characteristic. Each Trailer has the Key-A, Key-B(Option) & Access Byte and each Sector can be accessed by the authorized Key.
The Block 0 in Sector 0 is read only block and stores the manufacturing data of the Card. Ex) Sector 0 is composed of Block 0, Block 1, Block2 & Block3 and Block 3 is Trailer Block.
4-3. EEPROM Key Buffer structure This structure is composed of the Block structure of 6 Byte and available for write only. The Address of EEPROM Key Buffer is optional to set by the User, but the data that would be
written at EEPROM Key Buffer should be 6 Byte always. This structure is for easy data writing as the structure of Key-A and Key-B on the Card is composed of 6 Byte. Also, that’s because the Key location should be setting by User’s own right.
The capacity of Key Buffer is 192 Byte and can store maximum 16th Key-A, Key-B considering the Key-A, Key-B with 6 Byte of the Key. It means that it can store all the Key of Mifare® Standard Card. EEPADDR can be defined from 00H to 1FH 4-4. PICC INCREMENT/DECRMENT 4-4-1. VALUE BLOCK definition
- Write the value of 16byte to the block that is willing to use as VALUE BLOCK according to the block format as described below.
VALUE ~VALUE VALUE ADR ~ADR ADR ~ADR The value is 4byte value with the amount of value stored to the VALUE BLOCK at the first time, it should be stored three(3) times by inversion or non-inversion. The ADR should be equal to BLOCK ADDRESS and it should be stored four(4) times with the inverted or non-inverted value. Transfer ADR indicates the BLOCK ADDRESS that result of the processing is to be moved, after completion of INC/DEC command.(Refer to 4-4-2.).
- Write the trailer of sector that is included designated BLOCK by VALUE BLOCK. - In this moment, the value of SECTOR TRAILER refers to the specification of Mifare®
Standard Card in MF1 IC S50.
Note) The Key-B of SECTOR TRAILER should be set not to be read when SECTOR TRAILER READ.
- Operates INCREMENT/DECREMENT. 4-4-2. VALUE BLOCK structure
VALUE BLOCK
SECTOR TRAILER
SECTOR2~15
INC/DEC BLOCK0VALUE4BYTE
SECTOR0
SECTOR1SECTOR1
BLOCK6
PRODUCT BLOCKSECTOR0BLOCK1
SECTOR1
TRANSFERTEMP REGISTER
BLOCK2
BLOCK5BLOCK4
BLOCK7
BLOCK3
INC/DEC
SECTOR0SECTOR0
RESTORE
SECTOR TRAILER
SECTOR1
4-5. Abbreviation
UID : Unique identification PICC : Proximity integrated chip card CT : Cascade Tag SAK : Select acknowledged PCD : Proximity coupling device MFin : Mifare® input ATQ : Answer to request REQA : Request type A MFout: Mifare® output RFU : Reserved for future use REQB: Request type B BLK : Block
Processing sequence between Reader and card Note) In case that the multiple PICCs are in the RF field, the PCD is settled according to the Anti-collision sequence of ISO-14443. 5-3. Request A & anti-collision/select (Ready state)
1 1 1 1 1 1 This command is to halt the function of the Card Among the multiple cards, it is to be used to halt the function of the Card that is under currently operating for the purpose of reading of another card. Also it is to be used in case that the operating of Card is completed.
5-5. Active PICC 5-5-1. Request for answer to select (RATS) command
Shall be set to 1 NAD following, if bit is set to 1
CID following, if bit is set to 1 Chaining, if bit is set to 1 Shall be set to 0, 1 is RFU I-Block Coding of R-block PCB
D8 D7 D6 D5 D4 D3 D2 D1 1 0 1 0 0 1
Block of number
Shall be set to 1, 0 is RFU
Shall be set to 0
CID following, if bit is set to 1 ACK if bit is set to 0 NAK, if bit is set to 1 Shall be set to 0, 1 is RFU R-Block Coding of S-block PCB
D8 D7 D6 D5 D4 D3 D2 D1 1 1 0 1 0
Shall be set to 0, 1 is RFU
Shall be set to 1, 0 is RFU Shall be set to 0
CID following, if bit is set to 1
(00) DESELECT or
(11) WTX S-Block
Or
Coding of card identifier D8 D7 D6 D5 D4 D3 D2 D1
0 0 CID
Shall be set to (00), all other values are RFU
Power level indication CRC-A is transmitted to the Host in the Receive data frame CRC-A is transmitted together with the data when the calculated result inside Reader is equal to the received value. If it is not equal to the received value, CRC Error code is generated at Status byte and the data is not transmitted. CRC-A is not included in the Transmit data frame. Calculation of CRC-A is settled inside Reader and CRC-A is included in the data when transmitting to the PICC. 5-5-4. Type-A Dummy command Host
STX Bit_Len_high Bit_Len_low 0X32 Data BCC ETX 1 1 1 1 N Bytes 1 1
Response STX Bit_Len_high Bit_Len_low Status Data BCC ETX
No calculation of CRC or BCC related to PICC inside Reader. Calculation of CRC and BCC should be done separately with the information on the data field.
Response STX Bit_Len_high Bit_Len_low Status BCC ETX
1 1 1 1 1 1 Type-B Setting command is set up by the transmission protocol stipulated to the ISO-14443-B. When the PCD is power ON, the PCD is as follows. SOF_ LOW: 11(0X0B) SOF_HIGH=3(0X03) EGT : 2(0X02) EOF=10(0X0A)
In case of Type B PICC, PICC is set to Active State through Attrib command after PICC request. The procedure of Request command can be done by the transmission of the code of APf, AFI, Parameter, etc in the data frame to the Reader. Anti-collision prefix byte APf is 05H(0000 0101) b AFI Coding
AFI Most signification
Half byte
AFI Least signification
Half byte
Meaning PICCs respond from
Examples/note
‘0’ ‘0’ All families and sub-families
No application preselection
X ‘0’ All sub-families of families X
Wide application preseletion
X Y Only the Yth sub-families Y only
‘0’ Y Proprietary sub-family Y only
‘1’ ‘0’.Y Transport Mass transit, Bus, Airline ‘2’ ‘0’,Y Financial IEP,Banking, retail ‘3’ ‘0’,Y Identification Access control ‘4’ ‘0’,Y Telecommunication Public telephony, GSM ‘5’ ‘0’,Y Medical ‘6’ ‘0’,Y Multimedia Internet service.. ‘7’ ‘0’,Y Gaming ‘8’ ‘0’,Y Data storage Portable files
‘9’-F ‘0’,Y RFU Note : X=’1’ to Y=’1’ to ‘F’ Coding parameter
All RFU bits shall be set to 0 B4=0 defines REQB: PICCs in idle state or ready state shall process this command B4=1 defines WUPS: PICCs in idle state or ready state or HALT state shall process this command B1, B2 and B3 are used to code the number of slot N according to table
B6 B5 Meaning 0 0 PCD to PICC, 1ETU=128/Fc, bit rate is 106kbps 0 1 PCD to PICC, 1ETU=64/Fc, bit rate is 212kbps 1 0 PCD to PICC, 1ETU=32/Fc, bit rate is 424kbps 1 1 PCD to PICC, 1ETU=16/Fc, bit rate is 847kbps
B8 B7 Meaning 0 0 PICC to PCD, 1ETU=128/Fc, bit rate is 106kbps 0 1 PICC to PCD, 1ETU=64/Fc, bit rate is 212kbps 1 0 PICC to PCD, 1ETU=32/Fc, bit rate is 424kbps 1 1 PICC to PICD, 1ETU=16/Fc, bit rate is 847kbps
Param3 B4=B3=B2=0, B1=1 then PICC compliant with ISO/IEC14443-4 B4=B3=B2=B1=0 then PICC not compliant with ISO/IEC14443-4 B8=B7=B6=B5=0 Param4
CRC-B is transmitted to the Host in the Receive data frame CRC-B is transmitted together with the data when the calculated result inside Reader is equal to the received value. If it is not equal to the received value, CRC Error code is generated at Status byte and the data is not transmitted. CRC-B is not included in the Transmit data frame. Calculation of CRC-B is settled inside Reader and CRC-A is included in the data when transmitting to the PICC. 6-2-5-2. Type-B Dummy Send command Host
STX Bit_Len_high Bit_Len_low 0X42 Data BCC ETX 1 1 1 Dummy data 1 1
Response STX Bit_Len_high Bit_Len_low Status Data BCC ETX