DESFire Card Communication Errors and Solutions

Why does a DESFire card return an error on an ACS reader? First find which layer answered. A PC/SC code such as 0x80100069 comes from Windows and means the exchange never finished. 6A 81 comes from the ACS reader and means the card was not reached in ISO 14443-4 mode. A 91 xx status word comes from the DESFire card itself, which means the communication worked and the card refused the command. Most DESFire "communication errors" are the third kind: a framing mistake (native and wrapped mixed, a wrong length), an unfinished 91 AF chain, or a command sent in the wrong state: the wrong application selected, no authentication, or an authentication that was lost after a select or an error.

This page is the diagnosis guide: for each common error it says what the card is telling you, what usually causes it and how to check. The full list of command codes and every 91 xx status word with NXP's names is on our DESFire APDU commands reference, and the read-only command sequence is on how to read MIFARE DESFire cards; this page links to both instead of repeating them. For errors that have nothing to do with DESFire (reader missing, USB drops, another program holding the reader), see ACS reader communication errors. BSD Infotech is an independent ACS supplier and integrator, not the manufacturer or NXP.

Not yet tested by BSD. Status word meanings come from NXP documents marked "Company Public" and reader behaviour from the ACS manuals, checked on 1 Dec 2026. BSD has not yet reproduced these errors on its own DESFire test cards; the planned checks are under what BSD still has to test. Where a cause is general DESFire practice rather than something NXP or ACS states in a public document, the page says so. This page contains no key values, no cryptographic steps and nothing that helps read a card without its owner's keys.

A DESFire command from your program passes through four layers: the Windows Smart Card service (PC/SC), the ACS reader driver and reader, the ISO 14443-4 radio protocol, and finally the card's own command processor. Each layer has its own way of saying "no", and the fix depends on which one spoke.

What you get backWho said itWhat it meansWhere to look
SCardTransmit fails with a code like 0x80100069, 0x8010002F or 0x8010000BWindows PC/SCThe exchange did not complete: card removed, data lost, reader held by another programTimeouts and card movement; PC/SC error codes
6A 81 with return code 0The ACS readerThe ACR1552U manual (section 5.3.2) says the reader answers this itself when the card does not support ISO 14443-4ISO 14443-4 and RATS
6E 00, 6D 00, 67 00 or another ISO status word to a 90 ... commandThe card, answering in ISO 7816-4 termsUsually not a DESFire, or a malformed wrapped APDUFraming mistakes; ISO status words
91 xx other than 91 00 and 91 AFThe DESFire cardCommunication worked; the card refused the command in its current stateThe sections below; full list in the DESFire status code table

This split saves time. A 91 9D is never fixed by changing the USB port, and a 0x80100069 is never fixed by changing a key number. Log all three things on every failure: the PC/SC return code, the reply bytes, and the command you sent.

DESFire commands can be sent native ([cmd] [params]) or wrapped in an ISO 7816-4 APDU (90 [cmd] 00 00 [Lc] [params] 00). The two forms and their rules are set out in the framing section of our command reference. These are the mistakes that turn into errors:

MistakeWhat you seeFix
Native command on a fresh card under Windows. The ACR1552U manual (section 5.3.2) warns that Windows Smart Card Plug and Play can send an APDU when a card arrives, which puts a DESFire card into ISO APDU mode.The first native command (for example 60) fails, although the same command worked in another tool.Use the wrapped form in Windows applications. If you must use native commands, lift and re-present the card first.
Mixing modes in one activation. The ACR122U manual (section 7.2) says the first command after activation fixes the mode for the rest of the session.The first command works, the next one in the other form fails.Pick one form for the whole program. Wrapped is the safe choice on PC/SC.
Reading the status in the wrong place. Native replies start with the status byte; wrapped replies end with 91 and the status.Code treats data as an error, or an error as data.Parse by form: last two bytes for wrapped, first byte for native.
Lc does not match the data, or the trailing 00 (Le) is missing.91 7E, or an ISO error such as 67 00Count the data bytes again; wrapped commands end with Le 00. See 91 7E.
Multi-byte parameters in the wrong byte order. Native parameters are least significant byte first (NXP DESFire Light data sheet, section 8.3).91 F0 on a file that exists, an error from SelectApplication, 91 BE or 91 9ESend AID 000001 as 01 00 00; offsets and lengths the same way.
A native command code sent with class 00 instead of 90.An ISO error such as 6D 00 or 6E 00Class 90 for wrapped native commands; class 00 only for the ISO commands (A4, B0 and so on).

The reader does not translate any of this. For an ISO 14443-4 card, the ACS manuals say the reader passes the APDU to the card without interpreting it, so a malformed command reaches the card exactly as you built it.

Two status words look almost the same and mean opposite things. 91 AF (ADDITIONAL_FRAME) is not an error: the card has more data, or is waiting for more from you. 91 AE (AUTHENTICATION_ERROR) is an error: the current authentication state does not allow the command. A one-letter misread of these two in a log has sent many developers hunting for a key problem that was really a chaining problem, and the reverse.

Handling 91 AF correctly

  1. After any reply ending 91 AF, keep the data (everything before 91 AF) and send 90 AF 00 00 00 to ask for the next frame. GetVersion, for example, always takes three frames (ACR122U manual, section 7.2).
  2. Repeat until the reply ends 91 00 (done) or another 91 xx (an error). Join the data parts in order.
  3. Do not send any other command while a chain is open. NXP's status table defines 91 CA (COMMAND_ABORTED) for exactly this: the previous command was not fully completed because not all frames were requested or provided.
  4. Put a sensible upper limit on the number of frames, so a fault cannot loop forever. The read-only Desfire.cs helper on our reading guide does all of this.

Two kinds of chaining. NXP's AN12752 says DESFire EV3 supports both ISO/IEC 14443-4 chaining and native chaining with AF. ISO 14443-4 chaining happens between the reader and the card and is invisible to your program: the ACS reader reassembles the frames. Native AF chaining is visible: your program sees 91 AF and must ask for the rest. The frame size decides how often you see it: AN12752 gives a default frame size of 64 bytes on EV3, configurable up to 256.

When the error really is 91 AE

A real 91 AE means the step needs a key. Before you suspect the key value, check three things that cause it without any key being wrong: the right application is selected (keys belong to an application, see authentication session lost); the access rights of the file name the key number you authenticated with (read them with GetFileSettings); and the card or application settings, which NXP's AN11004 shows can require a key just to list applications or files. A wrong key during authentication also gives 91 AE; the DESFire Light data sheet adds 91 AD, a delay before another attempt is accepted. If the key is genuinely unknown to you, the data stays protected by design: BSD does not help recover keys.

91 9D (PERMISSION_DENIED) means the current configuration or state does not allow the command. It is not a key error and not a reader error. Think of it as the card saying "not here, not like this":

  • Wrong level selected. A file command (GetFileIDs, GetFileSettings, ReadData) while the card level (AID 00 00 00) is selected, or an application command at card level. Select the application first.
  • An access right set to "never". Each file has four 4-bit access conditions (Read, Write, Read&Write, Change); the value F means no access at all, whatever key you hold. Decode them from GetFileSettings as shown in the access rights decoding.
  • Not authenticated when the command needs it. NXP's public DESFire Light data sheet lists 9D for some commands "in not authenticated state". On other commands the same situation gives 91 AE, so treat both as "check the authentication state".
  • A key that cannot be used. The DESFire Light data sheet also lists 9D when the targeted key is not available for authentication or is locked by its failure counter. Exact per-command rules for DESFire EV1 to EV3 are in NXP's data sheet available under NDA.

How to check: confirm which level is selected (log every SelectApplication and its reply), read the file's access rights, and compare the key number your program authenticated with against the right the command needs. Our reading guide's what needs authentication explains the three settings (card, application, file) that decide this.

StatusNXP name and meaningUsual causesHow to check
91 40NO_SUCH_KEY: the targeted key does not existA key number at or above the number of keys the application was created with (key numbers start at 0); the right number in the wrong application; the card-level key number used inside an applicationLog the selected AID before each authentication. GetKeySettings (no change to the card) reports the key settings of the selected level; the full reply layout is in NXP's NDA data sheet.
91 F0FILE_NOT_FOUND: the file number does not existThe wrong application is selected (or the select failed and your code did not check); a file number taken from documentation for a different card layout; byte order mixed up in a combined parameterRun GetFileIDs (90 6F 00 00 00) in the selected application and compare. Always check that SelectApplication returned 91 00 before going on.

Both errors are usually a wrong application problem rather than a missing key or file. A SelectApplication that fails returns its own 91 xx error (the exact code for "application not found" is in NXP's NDA data sheet, so this page does not state it); code that ignores that reply carries on at the previous level, and every later command then fails with 91 40, 91 F0 or 91 9D.

91 7E (LENGTH_ERROR) means the length of the command is not valid; NXP's per-command tables put it as "command size not allowed". The card counted your bytes and they did not fit the command. Typical causes:

  • Wrong parameter count: for example 2 bytes of AID instead of 3, or a ReadData without the full 7 bytes (file number, 3-byte offset, 3-byte length).
  • Lc does not match the data you actually appended, often after a code change that added or removed a byte.
  • Parameters sent with a command that takes none, such as data appended to 90 60 00 00 00.
  • Too much in one frame. The public DESFire Light data sheet says that when ISO 14443-4 chaining is used, the reassembled command header must fit within the card's buffer size (FSC) given in its ATS, otherwise the card may respond with LENGTH_ERROR. With short APDUs the data field is also limited to 255 bytes.

How to check: print the exact bytes your program sends and count them against the layout in the public layouts table. If the same command works in the ACS Script Tool, the difference is in how your program builds it.

A common pattern: authentication succeeds with 91 00, and a few commands later everything fails with 91 AE or 91 9D. The key was right; the authenticated state was gone. Three things end it:

  1. Selecting an application. Keys belong to a level: the card master key to the card level, application keys to one application (NXP's EV2 short data sheet describes key-related commands as acting on the currently selected application). An authentication therefore belongs to the level that was selected when you made it. After SelectApplication, even of the same application, authenticate again. NXP's public DESFire Light data sheet also states that a transaction is aborted when an application is selected with ISOSelectFile, even when the same application is reselected. The exact rule for every DESFire EV1 to EV3 select path is in NXP's data sheet available under NDA, so BSD's practical advice is simply: authenticate after every select.
  2. Any error. The DESFire Light data sheet says that when a MAC or padding check fails, the ongoing command and transaction are aborted and the authentication state is immediately lost, and that any other error during command execution has the same consequences. So after any 91 xx error in an authenticated session, assume the session is gone: re-select and re-authenticate before the next protected command. Treating the second error as the real problem is a classic debugging trap.
  3. The card leaving the field, or a reset. The card powers down and all state is lost; start again from GetVersion or SelectApplication (see timeouts and card movement).

The safe program structure is short sessions: select, authenticate, do one logical operation, and on any error start that whole operation again from the select. This is general DESFire practice, consistent with NXP's public statements above; BSD has not yet tested each case on EV1, EV2 and EV3 cards.

Errors that appear only on one card generation are usually about secure messaging, the way data is protected after authentication. At the level NXP publishes (the details of the calculations are in NXP's NDA data sheets and are not on this page):

TopicWhat NXP's public documents sayError it can cause
Which authentication commandEV1 has the legacy (0A), ISO (1A) and AES (AA) commands. EV2 and EV3 add AuthenticateEV2First (71) and AuthenticateEV2NonFirst (77) for EV2 secure messaging (AN12752).91 1C (illegal command code) when an EV2 command is sent to an EV1 card. Identify the generation with GetVersion first.
First and non-firstThe DESFire Light data sheet says a First authentication can run at any time, while a Non-First one needs an existing authenticated state.An error on a Non-First authentication after the state was lost (see above).
Secure messaging on the wireEV2 and EV3 support D40, EV1 and EV2 secure messaging; files use plain, MAC or full encryption as their communication mode says (EV2 short data sheet).91 1E (INTEGRITY_ERROR: CRC or MAC does not match, padding not valid). This is a problem in your program's secure messaging, not in the reader or the radio link.
Backward compatibilityNXP says an EV2 works as an EV1 in its default delivery configuration, and an EV3 as an EV1 or EV2 (EV2 short data sheet, AN12753).A program written for EV1 normally works on EV2 and EV3 cards until the issuer enables newer features.
Frame sizeEV1 has a 64-byte communication buffer; EV2 and EV3 allow larger frames (AN12752, EV2 short data sheet).More or fewer 91 AF frames on the same read; code that assumes a fixed frame count breaks.

The full generation comparison is in the EV1, EV2 and EV3 table of our command reference, and the concept of authentication in its authentication section. Key planning and storage are covered in our key management guide.

DESFire commands only work once the card is activated in ISO 14443-4 mode. The reader sends RATS (Request for Answer To Select), the card answers with its ATS, and from then on APDUs travel over the ISO 14443-4 block protocol. NXP's DESFire Light data sheet says GetVersion is only available after ISO/IEC 14443-4 activation. If activation stops one step earlier, at ISO 14443-3, the card is seen but cannot take DESFire commands.

How to tell

  • The ATR. For an ISO 14443-4 card an ACS reader builds a short ATR starting 3B 8n 80 01; a storage-card ATR starting 3B 8F 80 01 80 4F means the reader is treating the card at the ISO 14443-3 level. Decode it with our ATR guide.
  • The reader's own answer. 6A 81 to a wrapped DESFire command means the reader did not reach the card in ISO 14443-4 mode (ACR1552U manual, section 5.3.2).
  • The ATS. The ACR1252U manual (section 5.2.5) notes that for ISO 14443-4 Type A cards the ATS can be read with FF CA 01 00 00. No ATS, no ISO 14443-4 session.

Reader settings that decide it

ReaderWhat the ACS manual documentsWhat to check
ACR122U (older, end of life)API v2.04, section 6.5: the PICC operating parameter has an "Auto ATS Generation" option, described as issuing the ATS request whenever an ISO 14443-4 Type A tag is activated. The documented default of the whole parameter is FFh.If a program or an earlier test changed the PICC operating parameter, DESFire cards may stop at ISO 14443-3. Read it back with "Get the PICC operating parameter" (section 6.4) and compare with the default before changing anything.
ACR1252UAPI v1.17, sections 5.4.7 and 5.4.8: the automatic PICC polling setting includes an "Enforce ISO 14443-A Part 4" option, and the manual notes that the reader activates ISO 14443A-4 mode of a compliant card automatically. The documented default setting is 8Bh. The setting is saved in non-volatile memory.Read the setting with "Read Automatic PICC Polling" and compare with the default. A setting changed for another card type stays changed after a replug.
ACR1552UReference manual, section 5.3.2: commands are passed to ISO 14443-4 cards without interpretation, and the reader answers 6A 81 if the card does not support ISO 14443-4.A 6A 81 on a card that you know is a DESFire points to the card's position or condition; try it again flat on the centre of the reader.

The command bytes for these settings are in the ACS manuals; this page does not repeat them, because a wrong value is saved in the reader and affects every card type. Read before you write, and note the original value. The reader-side polling options are also discussed on NFC reader not reading cards. BSD has not tested these settings with DESFire cards.

Frame sizes. During RATS the reader tells the card how large a frame it can receive (FSD), and the card's ATS tells the reader its own buffer (FSC). The DESFire Light data sheet says the card splits its responses to fit the reader's frame size. On a working setup this is automatic; it only matters for the length limits under 91 7E.

DESFire operations take more exchanges than a MIFARE Classic read: GetVersion alone is three, and an authenticated read adds the authentication round trips. The longer the sequence, the more likely a card that is moving will leave the field partway.

What you seeLikely causeWhat to do
SCARD_W_REMOVED_CARD (0x80100069) or SCARD_E_COMM_DATA_LOST (0x8010002F) in the middle of a sequenceThe card left the field, or was at the edge of itHold the card flat on the centre of the reader until the program confirms. In code: disconnect, wait for the next card and restart the whole operation from the select (the authentication is gone too).
Errors only on long reads or after authentication, never on GetVersionCard at the edge of the field, metal nearby, or several cards in the fieldTest position and range as in the read range test; see metal and several cards.
A program-level "timeout" with the card held stillThe program's own wait is too short, or a reader timeout setting was changedThe ACR122U manual (section 6.6) documents a "Set Timeout Parameter" command for the contactless chip's response time, in 5-second units, including a "wait until the chip responds" value. Check whether your software changes it. Other ACS readers: see their manuals.
Every operation after an interrupted write behaves oddlyA write or value change was cut offRead the data back before trusting it. For backup, value and record files, NXP's transaction mechanism (CommitTransaction / AbortTransaction) is designed for this; see the command table.

The card also has its own timing. The ATS carries a frame waiting time (FWI) that tells the reader how long to wait for an answer. NXP's DESFire Light data sheet, for example, recommends raising its default FWI for one specific secure messaging mode to avoid aborted commands. That is a card personalisation setting made by the card issuer, not something to change on a card you do not own. General reader-side communication errors are covered on ACS reader communication errors.

Use your own test card, close every other card program, and use the ACS Script Tool or QuickView (free from ACS after a short registration). All steps are read-only; none uses a key.

  1. Check the ATR in QuickView. Expected: a short ATR starting 3B 8n 80 01. Not that: see ISO 14443-4. How to read it: QuickView guide.
  2. Send GetVersion wrapped (90 60 00 00 00, then 90 AF 00 00 00 twice). Expected: 91 AF, 91 AF, 91 00. A failure here, with the card held still, is a card, reader or activation problem, not a key problem.
  3. Select the card level (90 5A 00 00 03 00 00 00 00). Expected: 91 00.
  4. Repeat the failing step of your program by hand, with the same select before it. If it fails the same way, the card state is the cause (91 9D, 91 40 / 91 F0). If it works by hand, the difference is in your program's framing, chaining or state.
  5. Read the file settings of the file involved (90 F5 00 00 01 [file] 00) and decode the access rights. This tells you which key, if any, the step needs.
  6. Lift and re-present the card between attempts, so every test starts from a fresh activation with no leftover authentication or open chain.

The same read-only sequence, with expected replies, is the DESFire stage of our APDU test plan and the Script Tool example on the reading guide. Record each run in the results table so BSD or your card supplier can see exactly what happened.

What you seeMost likely causeWhat to do
6A 81 to every DESFire commandCard not activated in ISO 14443-4, or not a DESFireCheck the ATR and the reader's ISO 14443-4 setting (section)
Native commands fail, wrapped ones workWindows Plug and Play put the card in ISO modeUse wrapped commands (framing)
Data seems cut off; reply ends 91 AFChain not finishedSend 90 AF 00 00 00 until 91 00 (chaining)
91 CAA new command was sent while a chain was openFinish every 91 AF chain first
91 AE right after a successful authenticationWrong application selected, or the authenticated state was lostRe-select, re-authenticate (session lost)
91 9DWrong level selected, access right "never", or not authenticatedCheck the selected AID and the file's access rights (91 9D)
91 40Key number does not exist in the selected applicationCheck the AID selected before authentication (91 40)
91 F0 on a file you know existsWrong application selected, or the select failed uncheckedGetFileIDs in the selected application (91 F0)
91 7EWrong parameter count, Lc mismatch, or frame too largeCount the bytes against the layout (91 7E)
91 1CCommand not supported by this card generationCheck the generation with GetVersion (EV1, EV2, EV3)
91 1EMAC, CRC or padding wrong in your secure messagingFix the program; the session is lost, start again from the select
0x80100069 or 0x8010002F mid-sequenceCard moved or left the fieldHold the card still; restart the whole operation (timeouts)
0x8010000BAnother program holds the cardClose QuickView, the Script Tool and BSD utilities before running your program
Works on one reader model, fails on anotherDifferent polling or ISO 14443-4 settings, or the older ACR122UCompare the reader settings (reader settings)

Every 91 xx code with NXP's name is in the DESFire status code table. PC/SC codes are explained in the PC/SC error code reference.

Read-only checks on BSD's own DESFire test cards, with no key used, on the ACR1252U, ACR1552U and ACR122U under Windows:

  • A native GetVersion straight after tapping a fresh card, then after lifting and re-presenting it, to record the Plug and Play effect per reader.
  • A wrapped command with a deliberately wrong Lc, and one with a missing parameter byte, to record which reply each gives (91 7E or an ISO error).
  • A new command sent while a GetVersion chain is still open, to confirm 91 CA.
  • GetFileSettings at card level and in an application, to record 91 9D or another code, and on a missing file to confirm 91 F0.
  • Lifting the card during the three GetVersion frames, to record the PC/SC code each reader returns.
  • Reading back (without changing) the ACR122U PICC operating parameter and the ACR1252U polling setting, to confirm the documented defaults on BSD's units.

Checked on 1 Dec 2026. Only NXP documents marked "Company Public" and the ACS manuals were used. Explanations are in BSD's own words.

  • NXP, MF2DL(H)x0 MIFARE DESFire Light product data sheet rev. 3.3 (5 April 2019): status word names and per-command meanings, byte order, ISO 14443-4 chaining and buffer size (LENGTH_ERROR), GetVersion after ISO 14443-4 activation, loss of the authentication state on errors, transaction abort on ISOSelectFile, First and Non-First authentication, FWI remark
  • NXP, AN12752 rev. 1.4 (24 July 2023), MIFARE DESFire EV3 feature and functionality comparison: command codes per generation, EV3 frame size, ISO 14443-4 and native chaining
  • NXP, MF3D(H)x2 MIFARE DESFire EV2 product short data sheet rev. 3.2 (12 June 2019): secure messaging types, communication buffer, backward compatibility, key commands acting on the selected application
  • NXP, AN12753 rev. 1.2 (30 Sept 2020), MIFARE DESFire EV3 quick start guide; AN11004 rev. 2.4 (22 May 2013), MIFARE DESFire as Type 4 Tag (card and application settings that require a key for listing)
  • ACS, ACR122U Application Programming Interface, version 2.04: section 6.4 and 6.5 (PICC operating parameter, Auto ATS Generation, default FFh), section 6.6 (Set Timeout Parameter), section 7.2 (DESFire wrapped and native modes, first command fixes the mode)
  • ACS, ACR1252U Application Programming Interface, version 1.17: sections 5.4.7 and 5.4.8 (automatic PICC polling, "Enforce ISO 14443-A Part 4", default 8Bh, non-volatile), section 5.2.5 (ISO 14443-4 cards, reading the ATS); listed on the ACR1252U product page
  • ACS, ACR1552U Series Reference Manual, section 5.3.2: pass-through to ISO 14443-4 cards, 6A 81, the Windows Plug and Play note
  • PC/SC return codes: Microsoft: Smart Card Return Values

BSD Infotech is an independent ACS supplier and integrator, not the manufacturer. ACS, the ACS logo, QuickView, Script Tool and ACS product names belong to Advanced Card Systems Ltd. MIFARE and MIFARE DESFire are trademarks of NXP B.V. Windows is a trademark of Microsoft Corporation.

Stuck on a DESFire error?

Send us the command bytes, the reply, the card generation and the reader model. We build DESFire software for ACS readers, from provisioning to everyday reading.