Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

AN2646 Datasheet(PDF) 38 Page - STMicroelectronics

Part # AN2646
Description  Smartcard interface with the STM8S microcontroller
PDF  43 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN2646 Datasheet(HTML) 38 Page - STMicroelectronics

Back Button AN2646 Datasheet HTML 34Page - STMicroelectronics AN2646 Datasheet HTML 35Page - STMicroelectronics AN2646 Datasheet HTML 36Page - STMicroelectronics AN2646 Datasheet HTML 37Page - STMicroelectronics AN2646 Datasheet HTML 38Page - STMicroelectronics AN2646 Datasheet HTML 39Page - STMicroelectronics AN2646 Datasheet HTML 40Page - STMicroelectronics AN2646 Datasheet HTML 41Page - STMicroelectronics AN2646 Datasheet HTML 42Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 38 / 43 page
background image
Smartcard interface example
AN2646 - Application note
38/43
Figure 12.
Smartcard example: file system description
At the end of the example:
●
The ICCID file located under the MasterRoot directory is read
●
The IMSI file, under GSMDir, that has a secure access through PIN1, is read
●
The PIN1 is enabled/disabled
7.2.1
Smartcard startup: answer to reset (A2R)
The first action to perform when the reader wants to access a card is the answer-to-reset
procedure. To this aim the SC_Handler is invoked as follows:
SC_ADPU.Header.CLA = 0x00;
SC_ADPU.Header.INS = SC_GET_A2R;
SC_ADPU.Header.P1 = 0x00;
SC_ADPU.Header.P2 = 0x00;
SC_ADPU.Body.LC = 0x00;
while(SCState != SC_ACTIVE_ON_T0)
{
SC_Handler(&SCState, &SC_ADPU, &SC_Responce);
}
When a card is detected, the A2R sequence is generated, received and decoded. If the
recognized protocol is the T0 protocol, the smartcard state of the reader is active
(SC_ACTIVE_ON_T0) and the smartcard is available for operations on the file system.
The procedure type selection (PTS) will be applied after the ATR using the SC_PTSConfig()
function. For the used GSM card, the PTS procedure is as follows:
PTSS = 0xFF
PTS0 = 0x10
PTS1 = 0x95
PCK = 0x7A
PTS1 = 0x95, F = 9 and D = 5, Fi = 512, Di = 16, BaudRate = 112500 baud.
7.2.2
Reading a file at a specified path
The specified reading path is assumed to be: MasterRoot/GSMDir/IMSI
To reach it, the following actions are performed:
●
Select GSMDir using a SelectFile APDU command
●
Select IMSI File using a SelectFile APDU command
The user has to get the file characteristics to check its access conditions. The IMSI file has a
CHV1(PIN1) read condition, so PIN1 has to be checked before reading it. The verify
command must be executed under the directory containing the file to be read, the GSMDir
must be selected in the example.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43


Datasheet Download

Go To PDF Page


Link URL



Does ALLDATASHEET help your business so far?  [ DONATE ] 

About Alldatasheet   |   Advertisement   |   Contact us   |   Privacy Policy   |   Link to Datasheet    |   Link Exchange   |   Manufacturer List
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com