LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

pc/sc Scardtransmit

Did that helped? Any comments?

 

Mathan

0 Kudos
Message 21 of 51
(3,361 Views)

Thanks Mathan,

 

It is working! I added in a few empty arrays at the mszReader,bATR input, pbRevBuffer input in order to stabilize the program. It tends to hang quite often, if it is running without the empty array.

 

By The way, mind to ask, why the dwProtocol(active protocol) and cbPciLength are set to 01 and 08 respectively? Thanks again

 

Best Regards,

Eit.

 

 

0 Kudos
Message 22 of 51
(3,349 Views)

Eit wrote:

By The way, mind to ask, why the dwProtocol(active protocol) and cbPciLength are set to 01 and 08 respectively?


dwActiveProtocol is the the type of protocol that your smart card supports. If your smart card is T=0 protocol, then you have to give 00 instead of 01. Then for the second parameter 08, the total size of your structure is 2 double words that is 8 bytes and hence 08. This was clearly mentioned in the microsoft msdn website for scard_transmit function. You understand? Post back for any queries.

 

Mathan

0 Kudos
Message 23 of 51
(3,340 Views)

Hi,

 

I have seen your discussions regarding smart cart transmit. I have just started working on it and going through discussions but still not able to get ATR from my card reader. Any help is appreciated.

 

Thanks

chintan vora 

0 Kudos
Message 24 of 51
(3,299 Views)

The SCard status function will give the ATR value and no need to use the SCardTransmit function just to get the ATR. Where you are facing trouble?

 

In the vi i posted just remove the SCardTransmit portion and check whether its working. Is your reader a single slot or double slot reader? Just curious what is the model number of the reader?

 

Post your vi if you got still stuck up so that i can help you out.

0 Kudos
Message 25 of 51
(3,288 Views)

 Hi mathan,

 

Thanks for your quick reply. 

 

I have omnikey 3021 card reader and some smart cards.

 

Here is what i get when i run this vi. In ScardConnect the hCard Handle i get is a negative number is that ok or my card is not functioning properly. 

 

I have attached the vi and also a picture shows the result i get after running the vi.

 

 

 Let me know if you are not able to open vi then i will attach a picture of block digram.

 

thanks

chintan 

 

Download All
0 Kudos
Message 26 of 51
(3,273 Views)

Hi Chintan,

 

I downloaded your vi and run, but it seem like unstable and tend to hang the labview program. I have attached here, my smart chip ATR read program. You might try to modify from here. Hope that it helps.   

 

Eit. 

0 Kudos
Message 27 of 51
(3,274 Views)

Hi Eit,

 

 

I went through your vi and made changes in my vi. Now the problem it shows me is in sCardStatus function. It returns me 0x80100004 one of the supplied parameters is invalid. I have attached my vi. Let me know if you find out whats is wrong in my vi.

 

I have attach the results what i get after running the vi.

 

Thanks

vora 

 

 

Download All
0 Kudos
Message 28 of 51
(3,256 Views)

Hi,

 

thanks mathan and Eit. 

 

I finally got it to work. got ATR from smartcard. The readerlen data type was an integer value it required pointer to value

 

Thank you all for your support. I am trying to do scardtransmit function to transmit and receive from smart cards. 

 

thanks

vora 

0 Kudos
Message 29 of 51
(3,245 Views)

vora wrote:

Thank you all for your support. I am trying to do scardtransmit function to transmit and receive from smart cards. 


Good to hear that you worked it out. All the best. Go through the msdn website. Study the scardtransmit function thoroughly and after getting a clear idea about it go and code in LabVIEW. Post back for any support.

 

Mathan

0 Kudos
Message 30 of 51
(3,210 Views)