On Mon, Aug 11, 2008 at 3:47 PM, Wesley Nugent <[EMAIL PROTECTED]> wrote: > Ok, this got it running and I'm able to connect now. I still get a seg > fault when I try to run my read or write programs. What happens, it > says please select reader from the list. If I hit enter, I get > segfault, if I type anything in, it doesn't recognize the reader. I did > a gdb with backtrace and get: > > #0 0xb7e2e463 in strlen () from /lib/tls/i686/cmov/libc.so.6 > #1 0xb7f0c457 in SCardConnect (hContext=16996003, > szReader=0x1000 <Address 0x1000 out of bounds>, dwShareMode=2, > dwPreferredProtocols=4, phCard=0xbf9e1758, pdwActiveProtocol=0xbf9e12f8 > at winscard_clnt.c:745 > #2 0x08048c50 in ?? ()
SCardConnect() is called with szReader=0x1000. szReader is supposed to be a pointer to a C string containing the reader name to use. It is clear that your application is using a wrong value here and can only crash. I am surprised your application ever worked. > On a side note, I do have scriptor installed and can connect to the > smart card reader using scriptor. It uses RAW protocol and comes up > says reading commands from STDIN. > > Unfortunately, I don't know what commands to give it. If you could > point me to the commands to read and write in raw mode, or where I can > find these commands, I would appreciate it. Either help with the > segfault or the commands to read/write with scriptor in RAW mode would > be of great benefit to me. I think you will have to reverse engineer the scard-read and scard-write program (since you do not have the source code) and rewrite them. The --apdu pcscd option to log the apdu exchanged was introduced in pcsc-lite 1.1.2beta1 and your "working" configuration is using pcsc-lite 1.1.1. So it will not be easy to get the exchanged APDU. Good luck, -- Dr. Ludovic Rousseau _______________________________________________ Muscle mailing list Muscle@lists.musclecard.com http://lists.drizzle.com/mailman/listinfo/muscle