Changeset 751 for branches/smartreader
- Timestamp:
- 12/08/09 21:54:20 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/smartreader/csctapi/pps.c
r749 r751 172 172 //If more than one protocol type and/or TA1 parameter values other than the default values and/or N equeal to 255 is/are indicated in the answer to reset, the card shall know unambiguously, after having sent the answer to reset, which protocol type or/and transmission parameter values (FI, D, N) will be used. Consequently a selection of the protocol type and/or the transmission parameters values shall be specified. 173 173 ATR_GetParameter (atr, ATR_PARAMETER_N, &(pps->parameters.n)); 174 if (numprot > 1 || (atr->ib[0][ATR_INTERFACE_BYTE_TA].present == TRUE && atr->ib[0][ATR_INTERFACE_BYTE_TA].value != 0x11) || pps->parameters.n == 255) { 174 ATR_GetProtocolType(atr,2,&(pps->parameters.t)); //get protocol from TD1 175 if ((pps->parameters.t != 14) && (numprot > 1 || (atr->ib[0][ATR_INTERFACE_BYTE_TA].present == TRUE && atr->ib[0][ATR_INTERFACE_BYTE_TA].value != 0x11) || pps->parameters.n == 255)) { 175 176 // PTSS PTS0 PTS1 PTS2 PTS3 PCK 176 177 // PTSS PTS0 PTS1 PCK 177 178 BYTE req[] = { 0xFF, 0x10, 0x00, 0x00 }; //we currently do not support PTS2, standard guardtimes 178 179 179 int p; //protocol 1 = T0 , protocol 2 = TD1, 3=TD2 etc180 int p; 180 181 for (p=1; p<=numprot; p++) { 181 182 if (p == 1) … … 183 184 else 184 185 ATR_GetProtocolType(atr,p+1,&(pps->parameters.t)); //get protocol from TDi //FIXME p+1 is needed for flaw in atr.c 185 if (pps->parameters.t == 14 && p < numprot) //if T14 and next protocol available186 continue; //skip T14!!!186 //if (pps->parameters.t == 14) 187 // continue; //skip T14!!! 187 188 req[1]=0x10 | pps->parameters.t; //PTS0 always flags PTS1 to be sent always 188 189 if (ATR_GetInterfaceByte (atr, p, ATR_INTERFACE_BYTE_TA, &req[2]) != ATR_OK) //PTS1 … … 333 334 { 334 335 /* See if the reply differs from request */ 335 if ((len_request != len_confirm) || ( !memcmp (request, confirm, len_request)))336 if ((len_request != len_confirm) || (memcmp (request, confirm, len_request))) 336 337 { 337 338 /* See if the card specifies other than default FI and D */
Note:
See TracChangeset
for help on using the changeset viewer.