0
votes

I'm using HID smart card reader 3121 to read/write smart card using APDU commands. I successfully performed the basic operations (pin verification/ read / write) on some smart cards. However, some of my cards doesn't write data successfully and return the response as following: 0x6581 Memory failure (unsuccessful writing). I check the error detail on internet and it said: 0x6581: State of non-volatile memory changed.. if anybody knows the solution to this, please let me know. Thanks

1

1 Answers

1
votes

Unfortunately there is no generic smart card behaviour and I did not find a specific card reference in your question.

Most probable solution: The cards you tried were already used for some time and might be subjected to (possibly excessive) rewrite of the same few memory cells. The error counter of the PIN is a likely candidate, since it needs to be updated at least twice on every VERIFY command. Note, that a typical limit guaranteed by the hardware manufacturer is in the magnitude of 100k write accesses, for exact numbers ask your hardware vendor.

"State of volatile memory changed" simply means that the state of the card is no longer the same as at the start of the last command (so something might already have been updated successfully before the error occurred). SInce the memeory is starting to wear out, there is not much benefit in atttempts to clean up.