The card tag not detected MFRC531.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

The card tag not detected MFRC531.

525 Views
togsin
Contributor I

Dear

We use MRFC531.

I tag card. But it is not detect, and I am debugging.

I wonder source code.

  1. char CL_GetChallenge(unsigned char CID, unsigned char *Buf)   
  2. {   
  3.     unsigned char len;   
  4.    
  5.     Buf[0]=0x0A;    // I-block PCB with CID   
  6.     Buf[1]=CID;     // CID   
  7.     Buf[2]=0xb8;    // INF:CLA   
  8.     Buf[3]=0x84;    // INF:INS   
  9.     Buf[4]=0x00;    // INF:P1   
  10.     Buf[5]=0x00;    // INF:P2   
  11.     Buf[6]=0x04;    // INF:Le   
  12.     if(M500PiccExchangeBlock(Buf,9,Buf,&len,1,FWI)!=MI_OK) return(!MI_OK);   
  13.     if(Buf[len-4]==0x90) return(MI_OK);   ===> what means?
  14.     else return(!MI_OK);         
  15. }

in 13 line

char T_Money_DF_SELECT(unsigned char CID, unsigned char *Buf)
{
 unsigned char len;

 Buf[0]=0x0A|BLK;// I-block PCB with CID
 BLK ^= 1; // Toggle block number
 Buf[1]=CID;   // CID
 Buf[2]=0x00; // INF:CLA
 Buf[3]=0xA4; // INF:INS
 Buf[4]=0x04; // INF:P1
 Buf[5]=0x00; // INF:P2
 Buf[6]=0x07; // INF:Le
    Buf[7]=0xD4; // DATA
    Buf[8]=0x10; // DATA
    Buf[9]=0x00; // DATA
    Buf[10]=0x00; // DATA
    Buf[11]=0x03; // DATA
    Buf[12]=0x00; // DATA
    Buf[13]=0x01; // DATA

    if(M500PiccExchangeBlock(Buf,16,Buf,&len,1,FWI)!=MI_OK) return(!MI_OK);

 //memcpy(Send_Buf, Buf, len);
    //Send_Serial((int)len);
    printf("Buf[len-4] :%x %d\n", Buf[len-4],len);
 return(MI_OK);

 if(Buf[len-4]==0x90) return(MI_OK);   ===> what mean???
 else return(!MI_OK);
}

Buf[len-4]==0x90  ==> what is the "0x90" mean?

Result debuging , Buf[len-4] is 0x00. So it is failed.

What is 0x90 mean?And when Buf[len-4] is 0x00, what is my card type(iso etc)?

Let me know my question~~

Thanks.

Tags (1)
0 Kudos
1 Reply

370 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi,

90 means command issued ok, please refer to ISO7816-4 for more details on that. From my point of view, the card is a ISO14443A type card.

Have a great day,
Kan

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos