From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
11-26-2008 04:47 AM
hi,
I have a problem to interface pc/sc smartcard reader using pc/sc with the windscard.dll. The function ScardTransmit sends me an error message wrong parameter.
LONG SCardTransmit(
__in SCARDHANDLE hCard,
__in LPCSCARD_IO_REQUEST pioSendPci,
__in LPCBYTE pbSendBuffer,
__in DWORD cbSendLength,
__inout LPSCARD_IO_REQUEST pioRecvPci,
__out LPBYTE pbRecvBuffer,
__inout LPDWORD pcbRecvLength
);
more detail in http://msdn.microsoft.com/en-us/library/aa379804.aspx. I don't try to pass a correct format for the 2 parameters. I have seen an old post about it, but without the final solution.
typedef struct _SCARD_IO_REQUEST{
DWORD dwProtocol; // Protocol identifier
DWORD cbPciLength; // Protocol Control Information Length
Can you help me, please.
Thanks
emmanuel
11-26-2008 05:38 AM
Dear Emmanuel,
Hope you are fine.
I think you are mentioning about the post i involved in the discussion here.
What you have done till now? Post your work. That will help sorting out the problems easily. I think i might help you.
Mathan
11-26-2008 07:45 AM
thank you for your rapidity,
So for the moment, i have the ScardListReadersA, the Scardestablishcontext, Scardconnect and ScardStatus ok ( i have the ATR of my smartcard). But now, i don't understand how to formate the input of the ScardTransmit ( i have the response wrong parameter 0x80100004).
I have seen your post, but i can't open the VI, because of my labview version. So could you please send me pictue of your VI, and specially the structure of LPCSCARD_I0_REQUEST, and the different input using in the ScardTransmit.
thanks,
manu
03-28-2010 08:22 PM
Hi Elmanou and Mathan,
I happen to find your post here, and realise that you guys were discussing the same issue that I am currently facing. Let me briefly explain what I had done so far. I manage to get the response from the smart card reader, same here, I stuck at the point on how to formate the input for SCarddTransmit. Please help, If possible please send me the vi or the print screen which would be really helpful. I am reacable thru eitys@hotmail.com
. Thank you so much
Best Regards,
Shien Eit.
03-28-2010 11:16 PM
Hai all,
I did managed to made it work. But give me some hours. I need to search in my PC for the file and attach here in another 4 to 5 hours (that is at lunch time). Sorry for the delay.
Thanks,
Mathan
03-28-2010 11:24 PM
Thanks Mathan,
Looking forward to your reply.
Best Regards,
Eit
03-29-2010 10:49 PM
Hai,
Am very sorry for the late reply. Unable to locate the file. I can do onething. I don't want to start again since i have no readers or cards to check with. So can you please post the vi you did as of now so that i can help you from there. I am sure we can sort out this.
Mathan
03-30-2010 01:57 AM
Hi Mathan,
Attached is my VI,a read text sub-VI. With these VIs, I am able to get a ATR reply from the card reader. However, I have problem in formulate a correct input to the "SCardTransmit' CLN. There is always a error "6" return.
The commands to be input are as follow,
1.
0x00 | 0xA4 | 0x04 | 0x00 |
|
| 0x00 |
0x80 | 0xCA | 0x9F | 0x7F |
|
| 0x2D |
Kindly, give me a solution, many thanks.
Best Regards,
Eit
03-30-2010 02:08 AM
Hai Eit,
I have downloaded your vi's. Let me give me some time. Ill have a look at it and post before this evening.
03-31-2010 10:33 AM
Hi Mathan,
How was my program, do you have any clue why the scardtransmit is not working? Hope to hear from you, thanks.
Eit.