2017-03-29 07:43 AM
I am trying to create a EF file in SmartCard on STM32F09C-EVAL board.
My code is as follow.
--------------------------------------------------------------------------------------------------------------------------------------------
#define FILE_PARAM_SIZE 16
const uint8_t FILE_PARAM[16] = {0x62, 14, 0x80, 0x01, 0x20, 0x82, 0x01, 0x41, 0x83, 0x02, 0x12, 0x34, 0x85, 0x01, 0x01, 0x00};/* Send APDU Command for create file */
SC_ADPU.Header.CLA = SC_CLA_GSM11; SC_ADPU.Header.INS = SC_CREATE_FILE; SC_ADPU.Header.P1 = 0x00; SC_ADPU.Header.P2 = 0x00; SC_ADPU.Body.LC = FILE_PARAM_SIZE;for(i = 0; i < SC_ADPU.Body.LC; i++)
{ SC_ADPU.Body.Data[i] = FILE_PARAM[i]; } while(i < LC_MAX) { SC_ADPU.Body.Data[i++] = 0; } SC_ADPU.Body.LE = 0;SC_Handler(&SCState, &SC_ADPU, &SC_Response);
-----------------------------------------------------------------------------------------------
But I am getting 0x6D00 as response.
What's wrong?
Please help me.