acshk / acsccid

acsccid is a PC/SC driver for Linux/Mac OS X and it supports ACS CCID smart card readers. This library provides a PC/SC IFD handler implementation and communicates with the readers through the PC/SC Lite resource manager (pcscd).
GNU Lesser General Public License v2.1
104 stars 19 forks source link

Workarond for APDU sequence bug in ACR122U #1

Closed crosser closed 9 years ago

crosser commented 9 years ago

Older versions of ACR122U USB NFC reader have a bug: if last APDU written to the device was longer than 54 bytes, then response APDU read from the device has sequence number one less than it must be. Vendor says that this bug is fixed in the devices manufactured later than certain date. This patch accepts response APDU with off by one sequence number if they arrive from this reader, and previously sent APDU was long enough to trigger the problem.

Signed-off-by: Eugene Crosser crosser@average.org

godfreychung commented 9 years ago

Thank you for your patch. I modified your changes and merge it to master.