12-11-2009 12:54 AM - edited 12-11-2009 12:58 AM
Hi all,
I want to develop a test equipment that is capable to test Memory cards used in phones. In the test process at first the card should be formatted then write some data into it ,read that data and again should be formatted.
ie. 1.formating
2.writing
3.reading
4.formating
The first formatting part I have done using calling a SHFormatDrive in shell32.dll and then I got stuck in WRITING AND READING DATA on to the card .I planned to do it by using winscard.dll .But Im confused what are the functions to be called.Im using LabVIEW 8.5.Please help.
12-11-2009 02:07 AM
12-11-2009 04:07 AM - edited 12-11-2009 04:09 AM
Yes I checked that discussions but when i run that Reading Smart Card w SCR3351.vi
then Im getting the card status return ,card connect return,Disconnect return and release context return as 6. My winscard.dll version is 5.1.2600.0.I tried all the suggestions mentioned in that discussion.
Operating system is windows XP professional.
LabVIEW version 8.6
12-11-2009 08:57 AM
Did you really moved from 8.5 to 8.6 in a single day? That's great.
Ok coming to your problem. You said only few of the functions are failing with error 6. What happened to the first 2 functions? I mean don't you get any errors with scardestablishcontext and scardlistreaders function? Did your reader got listed in it and you are selecting that particular reader name only to pass it to scardconnect function?
Trying to help
Mathan
12-12-2009 09:07 AM - edited 12-12-2009 09:08 AM
Hello,
Please find the below vi to check the status of my smart card .I am new in using DLL in LabVIEW so can I know whether procedures are correct in this code.
12-15-2009 10:38 AM
You did not answered any of my question. You need lot of changes. You have to change the protocol value input. Try this one and let me know whether it work. Go step by step. Check whether the scardestablishcontext returns any error code and if not go for scardlistreaders. Check whether the reader name got displayed. Then check scardconnect and if that passes then you will get the ATR value in scardstatus. Post back your findings.
12-17-2009 02:24 PM - edited 12-17-2009 02:26 PM
Hi,
I checked SCardListReader output ...but even though there is no error Im not getting any output....Plz help..
12-17-2009 06:49 PM
12-29-2009 01:03 AM
Actually Im communicating with the memory card through a USB smart card reader. So in devicemanager under disc drives “USB 2.0 SD MMC Reader USB device” is displayed.
scardestablishcontextand scardlistreaders functions are getting passed without any errorsand at that time mszReader output which is a 1D array , is full of zeros.
Im gettinga return type value of -2146435068.
I alsochanged pcchReaders to 1000 but nothing happened.
Smart cardis connected through a “Multi in onememory card reader USB 2.0”.At this time only one reader and one smart cardis connected to the system…in future I want to connect up to 10 cards or morefor testing.
Plz note Im using a MicroSD card and not a smart card....
12-29-2009 07:27 AM
@george_82 wrote:
scardestablishcontextand scardlistreaders functions are getting passed without any errorsand at that time mszReader output which is a 1D array , is full of zeros.
Im gettinga return type value of -2146435068.
Here is a contradiction in your statement. You told scardlistreaders function passed but in the below statement, you are telling it is returning error -2146435068. So your reader name is not at all listed instead all are zeros.
The error code in Hex is 80100004. That means, "One or more of the supplied parameters could not be properly interpreted" as per msdn library. So please post in detail how you are passing all the parameters in scardlistreaders function. Please post your updated vi so that i will check it out.
Trying to help,
Mathan