-
-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can the USB receiving timeout cause ifdwrapper.c:374:IFDStatusICC() Card not transacted: 612? #104
Comments
I do not have the "PANJIA TECH RACK NODE" reader in my list. I guess you added support for this reader yourself. Exact? I need a full pcscd log. See https://ccid.apdu.fr/#support |
Dear Ludovic, Thanks for your kindly reply. In fact, we have studied this link carefully before submitting this issue. But because we are using libccid and pcsclite in an embedded device with limited resources, we cannot run the toolchain directly on the device. The OpenWRT official package does not seem to contain the Thanks :-) |
You can build and run parse on any Unix system. No need to run the command on the target system. What I asked is the complete pcscd log.
|
Hi Ludovic, We found the problem: this smart card chip sometimes returns a 0-byte empty message before returning the RDR_to_PC_DataBlock message. We believe this should be the cause of the problem. In addition, pcscd has some execution efficiency problems in our compact embedded environment (500 requests per second vs. 330 requests per second). We ended up using libusb to communicate directly with the chip. Thanks :-) |
It looks like the Zero Length Packet issue. See https://ludovicrousseau.blogspot.com/2017/03/gemalto-idbridge-k30-k50-ct30-and-zero.html You are using my CCID driver (ifd-ccid.bundle) that already uses libusb. |
Hi Ludovic, Let me clear it:
So in this kind of embedded environment, once the intermediate dependencies of libpcsclite --> IPC --> pscsd --> libccid are omitted, directly calling libusb can greatly improve the performance. For reference, we can also achieve 500 SCardTransmit calls per second on a Thinkpad P51 Windows machine with the same 230 bytes message. Thanks :-) |
We are developing an application using a CCID compatible USB smart card chip. The host environment where our application runs uses libpcsclite to provide a smart card interface, and its configuration is:
Our application uses the
SCardTransmit
API to communicate with the smart card. It works very well in the Windows environment (using Microsoft's official winscard.dll, our app also supports Windows).On the above-mentioned OpenWRT host computer based on pcsclite, most of the commands can also work normally. Only one command will fail every time it is executed:
We found that for the host, the only difference between this command and other (can run normally) commands is the longer execution time (this command needs to erase several hundred KB of on-chip Flash).
We did not find a document describing what time unit is used in the first column of the log, we guess it is a number of microseconds. So
01645996 SW: 90 00
means that this command has been executed for 1.6s before returning the result (0x9000) to the host, right?We quickly checked the source code of libccid and found that the default timeout of its ReadUSB function seems to be 3 seconds (not sure)? Is it possible that the timeout triggered here or elsewhere in pcsclite or pcscd caused this error?
In addition, are there any options for configuring timeout in Info.plist or elsewhere?
Thanks :-)
The text was updated successfully, but these errors were encountered: