08-22-2010 09:59 PM
Hi guys,
I have a question here, any of you try multiple card readers using labview before? As what I mean is that by connecting more than one smart card reader to a single PC and use the scard commands to read the smart chip information?
The current method that I tried is, by increase the readerlistlength and collect the full string of all the readers' name and process them sequentially in a subsequent For Loop, to get the ATR return and send in scardtransmit command.
The current result is that I am only able to get the correct result from the 1st reader from SmartCardSlot 0. the rest was unsuccessful... anyone can help out? thanks.
Regards,
Eit.
11-15-2010 02:11 PM
Hello.
I'm trying to make a VI that can read the UID of card.
I've based my code on the SmartCard_transmit-vi by Mathan, but I don't think I understand wich values should go into pioSendPci.
I think I'm suppose to send 0xFF 0xCA 0x00 0x00 0x00 in the sendBuffer to get the UID, but all I get is 80100004 which means invalid parameter (?).
I'm also not sure about the difference between the protocol-parameter returned from SCardConnectA and SCardStatusA...
Anybody?
Best regards Marius
11-16-2010 03:46 AM
also, when I use the same values for pioSendPci as Mathan (1 and 😎 I get the error 16 (directory cannot be removed) from the card, what ever that's suppose to mean....
11-17-2010 02:18 AM
Mariusra, Attach ur vi here. Its hard to guess where it went wrong. Please attach ur vi here so that its possible to identify where it went wrong.
Mathan
11-17-2010 02:21 AM
Eit, I hope the problem is very minor one. The name from the readerlist has not been extracted correctly or has not been transferred to the next block i guess.
Post ur vi here so that i can help you out.
Mathan
11-17-2010 07:28 AM
Thank you for replying, but I managed a work-around by using the SCardCLGetUID from the scardsyn library, instead of the SCardTransmit.
Anyways, I'll post the VI with the SCardTransmit in case you're interested.
Note that I had some problems with LabView crashing when I used blocks from your code, and I think it was some memory foul up because of incorrect types and/or undefined variables. As you can see I used the SCardListReadersA block from another VI in this thread, and this behaves correctly.
Marius
08-02-2013 07:45 AM
Finally i managed to get implement the scard transmit function. Posting it here for future reference. Mathan
01-06-2014 04:24 AM
Hi Mathan
Can you also post a version of your TresMan.vi that is compatible with Labview 2011? I think this is just what I need to get my NFC project going. Thank you very much!
01-06-2014 09:25 PM
Hey guys,
I have tried Mathan's implementation of the SCardTransmit and I think it works for me. Well, at least it returns a zero after each call of the function. But there is no data on the pbRecvBuffer. I don't know why. Please advise.
Bley
06-19-2014 01:35 PM
Hello.
I've read this thread and I've found it really helpful! Thanks to Mathan and the rest of you guys.
I have a problem with the SCardTransmit function that maybe someone here can help me solve; I implemented Mathan's VI to my program and everything works fine until it gets to the SCardTransmit block, then it returns error code 80100004, which I found out it's for an invalid parameter.
I think the problem may be in the pioSendPci array (labeled with "[Protocol] [Length]" for convenience), more specifically the protocol, or maybe the instruction I send to the function.
Here's what I'm working with:
- Mifare Ultralight NFC Card
- ACS ACR122 Reader
The instruction I'm trying to send is a simple Write command, which is FF B0 00 04 04 (hex), and should return 4 bytes from the 4th page of the memory block.
Hope somebody can help me out. Thanks!
PS: Attached is the VI I'm using, for reference.