dis you set the active detect card ??? ( not sure there this function with pc/sc ...)




Le Thu, 15 Apr 2004 09:27:35 +0200, ABY Kouaho <[EMAIL PROTECTED]> a �crit:





Hi !
I'm student and I'm working with ACR30 reader on redhat 9.
My TB100 card from Bull has an ISO7816-4 file structure. And I want to
communicate with that card with ISO-7816-4 command. But pcsc recognize my
reader but not my card. I want to know if i really need a particular plugin
for this card.


could s.o tell me how i can write an iso7816-4 card plugin ?
thanks.
********************************************

this is my test programm, but it show me -> CARD NOT INSERTTED

#include <stdio.h>
#include <stdlib.h>
#include "winscard.h"

int main(int argc, char **argv)
{

      SCARDHANDLE hCard;
    SCARDCONTEXT hContext;
    SCARD_READERSTATE_A rgReaderStates[1];
    unsigned long dwReaderLen, dwState, dwProt, dwAtrLen;
    // unsigned long dwSendLength, dwRecvLength;
    DWORD dwPref;
    DWORD dwReaders;
    char *pcReaders;
    LPSTR mszReaders;
    unsigned char pbAtr[MAX_ATR_SIZE];
    LPSTR mszGroups;
    LONG rv;
    int i, p, iReader;
    int iList[16];

        rv = SCardEstablishContext(SCARD_SCOPE_SYSTEM, NULL, NULL,
&hContext);
    printf("%s\n", pcsc_stringify_error(rv));
    if (rv == SCARD_S_SUCCESS)
    {
      printf("%s \n"," bon");
    }
    else
    printf("%s \n", "non");

    printf("Testing SCardListReaders         : ");
    rv = SCardListReaders(hContext,NULL, NULL, &dwReaders);
    mszReaders = (LPSTR) malloc(sizeof(char) * dwReaders);
    rv = SCardListReaders(hContext, mszGroups, mszReaders, &dwReaders);
    if (rv != SCARD_S_SUCCESS)
    {
         SCardReleaseContext(hContext);
         return -1;
    }

    rv = SCardConnect(hContext,mszReaders, SCARD_SHARE_SHARED,
SCARD_PROTOCOL_T0,
&hCard, &dwPref);
    if (rv != SCARD_S_SUCCESS)
    {
            printf("%s\n", pcsc_stringify_error(rv));
         SCardReleaseContext(hContext);
         return -1;
    }

}
------- End of Forwarded Message -------

_______________________________________________
Muscle mailing list
[EMAIL PROTECTED]
http://lists.drizzle.com/mailman/listinfo/muscle



--
Ing�nieur Reader Application Coframi
tel 0442365401 www.gemplus.com
Utilisant M2, le client e-mail r�volutionnaire d'Opera : http://www.opera.com/
_______________________________________________
Muscle mailing list
[EMAIL PROTECTED]
http://lists.drizzle.com/mailman/listinfo/muscle

Reply via email to