Eighth and 11th part of the PBoC on TypeA summary (i)--initialization and conflict prevention (ISO14443-3)

Source: Internet
Author: User

PBOC Part Eighth and 11th on TypeA Summary (i)--Initialization and conflict prevention (ISO14443-3)

The part of the application-independent non-contact specification ISO14443 (1~4)

Part 11th contactless IC card Communication specification

On the basis of the eighth part, the requirements of the wireless communication protocol between contactless devices and contactless cards are specified in detail.

The PBOC specification, as written by different units, will overlap and conflict in each part of the specification, which summarizes the part and 11th of this document, which can be used to write the underlying writing of the PCD (Card reader) and PICC (IC card) data communication (about the TYPEA Protocol section).

First, initialization and conflict Prevention (ISO14443-3) 1, frame format (8,p22 11,p19)

The following frame types are defined:

--Short frames for initializing the communication;

--standard frame for ordinary commands;

--conflict-resistant frames for bit-oriented anti-collision commands.

(1) Short frame

Used to initialize the communication start without parity bit (TypeA parity)

--Frame Start (SOF)

--7 data bits transferred from the LSB

--End of frame (EOF)

(2) Standard frame

For data exchange

--Frame Start (SOF) (from PCD to PICC communication, SOF should be logic 0; from PICC to PCD communication, SOF logic 1;)

--n* (8 data bits + odd check bit) n>=1; (every 8 bits of data in the frame should be followed by an odd check digit p, set the P value so that 1 is an odd number (B1 to b8,p). )

--End of frame (EOF) EOF is logic 0 (only for PCD to PICC)

Standard frames are sent crc_a16, except for odd check bits, SOF, EOF, crc_a16 itself, and other byte data to verify that the results are sent after the data byte, before EOF

(3) Bit-oriented anti-collision frame

Only used during a bitmap anti-collision loop, and the frame is a standard frame with 7 data bytes, separated into two parts (data total 7 bytes is 56 bits)

-The 1th part is used for transmission from PCD to PICC;

The minimum length should be 16 data bits, and the maximum length should be 55 data bits.

-Part 2nd is used for transmission from PICC to PCD.

The minimum length should be 1 data bits, and the maximum length should be 40 data bits.

In this example, sel ' 93 ' is a series-level anti-collision instruction, which is described in detail in the instructions

The high 4-bit ' 4 ' of NVB ' 40 ' represents the transmission of 4 bytes (sel, NVB, UID0, UID1), and the low 4-bit ' 0 ' represents a few data bits, in this case 0, only SEL, NVB, UID0, UID1 four bytes, except for the whole byte.

This example is actually when the 4th byte has a conflict bit causing the re-conflict command to be UID0 and

UID1 take down, the actual anti-conflict instructions first issued by the command is ' 93 ' 20 '

The analysis is shown below

SEL NVB UID0 UID1

93 40

The ' 4 ' of the NVB data represents the 4 bytes of PCD to the PICC, and ' 0 ' represents the 0 bits of the UID0, which sends the SEL NVB UID0 UID1 PICC to the PCD return UID2 UID3 bcc three bytes

SEL NVB

93 20

The ' 2 ' of the NVB data represents the 2 bytes of PCD to the PICC, and ' 0 ' represents the 0 bits of the UID0 and sends the SEL NVB PICC to the PCD return UID0 UID1 UID2 UID3

2. PICC status (8,p26 11,p42)

PICC Status Chart

(1) Idle state

Description: In the idle state, the PICC is added to the battery. It listens to commands and recognizes Reqa and Wupa commands.

Status jump condition and conversion: After receiving a valid REQA or Wupa command, PICC enters the ready state and sends its ATQA.

(2) Ready status

Description: In the ready state, the bit frame conflict prevention and proprietary anti-collision methods can be applied. The concatenation level is processed within this state to obtain the full UID.

Status jump condition and transition: PICC enters the active state when it is selected according to its full UID.

Requirements: PICC

After receiving the valid Anticollision CL1 command and sending its UID CL1, the PICC should keep ready state;

After receiving a valid Select CL1 command that matches its UID CL1 and sends its SAK, the PICC of level 1 UID should enter the active state. PICC should indicate in the SAK response that the UID is intact. The PICC of Level 1 UID has no ready ' and ready ' status;

After receiving a valid Select CL1 command that matches its UID CL1 and sends its SAK, the PICC with Level 2 or 3 UID should enter ready ' status

(3) Ready ' status

The requirements of this article apply to PICC in ready ' state. Ready ' status is an intermediate state, and only PICC with Level 2 and level 3 UID exists in this state. In ready ' state, the UID concatenation level 1 has been selected.

After receiving a valid anticollision CL2 command and sending its UID CL2, the PICC shall remain ready ' state;

After receiving a valid Select CL2 command that matches its UID CL2 and sending its sak, the PICC of Level 2 UID should enter the active state. PICC should indicate in its SAK response that the UID is intact. 2 level UID of PICC no Ready "state;

After receiving a valid Select CL2 command that matches its UID CL2 and sending its sak, the PICC of Level 3 UID should enter Ready "state;

In other cases, the PICC should return to the idle state and should not send a response to the PCD

(4) Ready "status

The requirements of this article apply to PICC in ready state. Ready "State is an intermediate state, and only PICC with Level 3 UID exists in this state. In the ready state, the concatenation levels of UID 1 and 2 have been selected.

Requirement: Type a-ready "status

After receiving a valid Anticollisioin CL3 command and sending its UID CL3, the PICC shall remain ready "state;

After receiving a valid Select CL3 command that matches its UID CL3 and sending its sak, the PICC of Level 3 UID should enter the active state. PICC shall indicate in the SAK response that the UID is intact;

In other cases, PICC should return to the idle state and should not send a response to PCD;

3. Command set (8,p26 11,p42) (1) Reqa and Wupa commands (seek cards)

To detect the type A PICC in the Work field. Short Frames

Reqa = 26 is valid for sleep cards

Wupa = 52 valid for all cards

Wupa Response (ATQA)

Standard frame transfer with crc_a

When PCD issues a WUPA request, TypeA Picc will return two bytes of Atqa according to its status,

ATQA (eigenvalue) 0820 may be a CPU card or PBOC3.0 card

0428 may be CPU card, M1 card, PBOC3.0 card

0408, 0400 for M1 card

In fact, according to the usage, the first byte of 08 and 04 only represents the UID length is 1 level 4 bytes (B8 b7 is 0 0); b5~b0 indicates that the bit frame is anti-collision, the bit frame anti-collision ring is required instead of the proprietary anti-collision, and the UID length is 1 levels (M1 S50). May be (M1 S70) when the UID length is level 2

(2) Anticollision (anti-collision) (with CRC_A standard frame pass)

The anticollision command is used to obtain a full UID of type a PICC and to detect the presence of multiple type a PICC in the working field.

BYTE 1 Byte2

SEL 20

SEL 93 Anti-conflict concatenation level 1

95 Anti-collision concatenation level 2

97 Anti-collision concatenation Level 3

Anticollision Response:

The response information length is fixed at 5 bytes. Response in standard frame transfer with no crc_a

(3) Select (card) adopts standard frame transfer with crc_a

The SELECT command selects the PICC by using the UID of the type A PICC.

Select Confirm Response (SAK)

The SAK is 1 bytes long and uses a standard frame transfer with crc_a

Bit b3=1 uid Incomplete ignore B6 bit, b3=0 uid complete judgment b6,b6=1 conform iso14443a-4 b6=0 not conform iso14443a-4 M1 should not comply with 14443A-4 protocol

Anti-collision is to return the UID of PICC so sel+ NVB (SEL and NVB two bytes)

The card is to activate the card according to the UID of PICC so Sel+nvb (+uid) (4 bytes) (SEL, NVB, UIDs total 7 bytes)

Conflict prevention Ring

Process

1, send 93 20 return 5 bytes

2. Determine if the first byte is CT (0x88)

No, the description is 1 level UID returned is UID0 UID1 UID2 UID3 BCC anti-collision ring stop

Yes, description greater than Level 1 UID entered 3 returned is CT UID0 UID1 UID2 BCC

3, send 95 20 return 5 bytes

4. Determine if the first byte is CT (0x88)

No, description is Level 2 UID, return UID3 UID4 UID5 UID6 BCC anti-collision ring stop

Yes, the description is Level 3 UID, and entering 5 near the back is CT UID3 UID4 UID5 BCC

5, send 97 20, return 5 bytes

Returns the UID6 UID7 UID8 UID9 BCC

BCC is the first 4 bytes of the XOR value UID0 is the most significant byte

Or check the SAK of the return response of Select, Reqa or Ruwa (seek card) return response ATQA also has the definition of Tandem series

Conflict prevention and selection

Anti-collision rings in each series-level range

The following algorithm should be applied to the anti-collision ring:

--Step 1:PCD assigns a coded sel to the selected conflict-prevention type and concatenation level;

--Step 2:PCD assigned a NVB with a value of ' 20 ';

Note: This value defines that the PCD will not send any portion of the UID CLN. The command therefore forces all PICC in the Work field to respond with its full UID CLN.

--Step 3:PCD send sel and NVB;

--Step 4: All PICC within the workplace should use their full UID CLN response;

--Step 5: Assume that the PICC in the field has a unique serial number, then if more than one PICC responds, the conflict occurs. If no conflict occurs, steps 6 through 10 can be skipped;

--Step 6:PCD should identify the position of the first conflict;

--Step 7:PCD assigns a NVB with a value that specifies the number of significant digits of the UID CLN. These valid bits should be part of the UID CLN received prior to the occurrence of a conflict determined by PCD, plus (0) b or (1) b. The typical implementation is to increase (1) b;

--Step 8:PCD sends the SEL and NVB, followed by the effective bit itself;

--Step 9: The PICC should send the remainder of its UID CLN only if part of the UID CLN of PICC equals a valid bit sent by PCD;

--Step 10: Repeat step 6~9 if there is a further conflict. The maximum number of rings is 32;

--Step 11: If there is no further conflict, PCD assigns a NVB with a value of ' 70 ';

Note: This value defines that the PCD will send the full UID CLn.

--Step 12:PCD send sel and NVB, followed by the UID CLN all 40 bits, followed by crc_a checksum;

--Step 13: Its UID CLN is matched with 40 digits, then the PICC responds with its sak;

--Step 14: If the UID is complete, the PICC should send a sak with the emptied concatenation level bit and transition from the ready state to the active state, or from the ready* state to the active* State;

--Step 15:PCD should verify that the serial bit of the SAK is set to determine whether further anti-collision loops with an incremental concatenation level should continue.

If the UID of the PICC is known, then PCD can skip step 2~10 to select the PICC without having to perform a conflict prevention ring.

The following algorithms should apply to PCD for full UID:

--Step 1:PCD Select the concatenation level 1;

-Step 2: The conflict prevention ring should be implemented;

--Step 3:PCD should test the serial bit of SAK;

--Step 4: If the series bit is set, PCD should increase the concatenation level and initialize a new anti-collision ring

(4) Hlta (with standard frame transmission with crc_a)

The command is used to return the PICC in the polling and emigration process to an idle state.

The Hlta command contains two bytes, 50 00

PICC does not respond to the Hlta command, PCD always assumes that PICC has confirmed receipt of the Hlta command.

Description: The blog post is pasted from Word, and the format is slightly adjusted, but it may be confusing. If there is a personal understanding of the wrong place, but also ask you to correct me!

Eighth and 11th part of the PBoC on TypeA summary (i)--initialization and conflict prevention (ISO14443-3)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.