11-03-2012 10:22 AM
Hi all
I am using a pcb that switches an on board smart card communications between two dummy smart cards. One is fitted to a device and the other is fitted to a USB smart card reader.
I have written some code that works fine once, but fails after that unless I either pull out the USB lead (works) or the dummy smart card reader (brings up a prompt to try again etc).
I am trying to figure out if it is possible to fix this issue with code rather than extra hardware or mods.
Sudo code:
Inside a Callbackcommand:
DeleteFile *.* if ==0
then say pass
CopyFile *.* if ==0
then say pass
Switch lines to other dummy card
run code etc
Switch lines to smart card reader
finish
The errors on DeleteFile/CopyFile are either 5 or 6.
The smart card reader does not like the comms severed with out the internal switch being released.
I think I may need to close the mass storage device and reopen it maybe? Any ideas please?
11-03-2012 10:58 AM
maybe getdrivetype will work?
11-09-2012 03:27 AM
Hi,
Firstly, welcome to the NI Discussion Forums and apologies for the late reply.
Have you been able to make any progress with this issue?
I am a little unclear as to exactly what you are doing. Would it be possible for you to clarify the following:
How does the PCB switch communications between the two devices?
Is this a custom PCB?
You mention that one communication connection is fitted to a device - what device is this?