Thanks for your help. This is my situation: i need to develop a log for a office employeds. I want to use a smartcard reader at the office door, so when someone have to enter or exit, he put his smart in the reader, and the host who control the smartcard reader can store in a database the number of the smart, date and time.
In practice: i have a ACR38 reader who work as well with openct/pcsc/opensc.
The problem is the smartcard, or better, the memory card SLE-4442.
Opensc do not recognize the card, so is impossible to work.
Pcsc_scan says that my card is "Unresponsive card".
The only who works is the openct library.
This is my test program in C followed by a run
#include <stdio.h>
#include <stdlib.h>
#include <openct/openct.h>
#include <openct/error.h>
int main(){
ct_handle *res;
int status;
int a;
char str[10];
str[0]='\0';
res=ct_reader_connect(0);
printf ("Init CT interface %p \n",res);
ct_card_status(res,0, &status);
printf ("Found card? %s \n",(status)?"yes":"no");
a=ct_card_write_memory(res, 0,0,"test",4);
a=ct_card_read_memory(res,0,0,&str, 4);
printf("Read [%s] %d \n",str,a);
ct_reader_disconnect(res);
printf ("Close CT Inteface \n");
return 0;
}
$ ./main
Init CT interface 0x601040
Found card? yes
Read [] -1
Close CT Inteface
Any idea?
On Monday 28 January 2008, Andreas Jellinghaus wrote:
> Am Montag, 28. Januar 2008 14:57:15 schrieb Federico Guizzardi:
> > i'm trying to develop a util using openct but i do not find any docs about
> > its api so i need some help for using ct_card_write_memory.
>
> Hi Frederico,
>
> the author of that code left the project years ago, and I don't remember
> anyone still using it, so not sure if I can help.
>
> maybe you can tell us what you want to do, so we can help?
>
> it's ok to use openct+opensc, especially for usb crypto tokens.
> but in general: if you want to write some new software, I strongly
> suggest to base it on pcsc-lite and the ccid driver, both actively
maintained
> by ludovic rousseau. or base your software on to of opensc pkcs#11 module,
> maybe using libp11 or pkcs11-helper, if you want to talk to smart cards with
> pkcs#15 format, certificates and rsa crypto keys etc.
>
> if you want to access pure memory cards (like the functions indicates):
> no idea if that code in openct still works. I don't remember anyone on the
> mailing list still using in the past few years.
>
> Regards, Andreas
>
--
dott. Federico Guizzardi
~~~~~~~~~~~~~~~~~~~~~~~~
Netfarm s.r.l.
E-mail [EMAIL PROTECTED]
Tel +39 050 754 330
Fax +39 050 754 332
~~~~~~~~~~~~~~~~~~~~~~~~
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ opensc-devel mailing list [email protected] http://www.opensc-project.org/mailman/listinfo/opensc-devel
