现在读SIM卡数据正常,读ICCID有问题不明白
/* Read Binary in ICCID --------------------------------------------------*/
if(SC_Responce.SW1 == SC_EF_SELECTED) //9F
{
SC_ADPU.Header.CLA = SC_CLA_GSM11; //A0
SC_ADPU.Header.INS = SC_READ_BINARY; //B0
SC_ADPU.Header.P1 = 0x00;
SC_ADPU.Header.P2 = 0x00;
SC_ADPU.Body.LC = 0x00;
SC_ADPU.Body.LE = 10;
SC_Handler(&SCState, &SC_ADPU, &SC_Responce);
}
/* Select GSMDir ---------------------------------------------------------*/
if(((SC_Responce.SW1 << 8) | (SC_Responce.SW2)) == SC_OP_TERMINATED) //9000
{
/* Copy the ICCID File content into ICCID_Content buffer */
for(i = 0; i < SC_ADPU.Body.LE; i++)
{
ICCID_Content[i] = SC_Responce.Data[i];
}
for(i = 0; i < SC_ADPU.Body.LE; i++)
{
USART_SendData(USART1,ICCID_Content[i]); //98 68 00 16 51 40 02 83 52 19
delay1(2);
}
读了10个字节,数据是98 68 00 16 51 40 02 83 52 19
可是手机卡上的ICCID是8986,0112,8170,4100,187w。
我怎么对都对不上?是不是哪儿有问题?谢谢!
|