1 (edited by GW_CORE 2014-05-20 13:52:36)

Topic: Desfire Card Command Response

Hi,

Hope someone can help. One of my Desfire Cards has started returning a value 0×01 in response to any commands I send, for example in my Select PICC Application command below –

My command sequence is (using wrapped commands)

SEND -> 90-5A-00-00-03-00-00-00-00 // Select PICC
Response -> 01

I would normally expect Response to be 91 00

The error appeared to start after I sent a formatPICC command (0xFC). Unfortunately I missed the status response sent the first time I sent the command. Any further sends of the command just generate the 0×01 response.

Has anyone ever had any problems after sending formatPICC command?

Thanks.

Re: Desfire Card Command Response

I had the problem. I think you need to format PICC again.

Re: Desfire Card Command Response

I tried sending format commands again many times and always got the 0x01 response.  I managed to get the card working again when I tried scanning the card against the NFC reader on my mobile phone.  This seemed to allow the format command to complete and I was able to send commands as normal again. I think it might be a timing issue where the card is requesting more time to complete command but I don't know how to respond...  I have seen mentions about a WTX (Frame Waiting Extensions) that the card sends when the command takes longer to process than the default timeout.

Re: Desfire Card Command Response

For formatting the card, I did as follows:

cmd[0]:0x0a
cmd[1]:0x02
cmd[2]:0xfc
                   rsp: 0xfa
                   rsp: 0x02
                   rsp: 0x01

cmd[0]:0xfa
cmd[1]:0x02
cmd[2]:0x01
                   rsp: 0xfa
                   rsp: 0x02
                   rsp: 0x01


cmd[0]:0xba
cmd[1]:0x02
                   rsp: 0xfa
                   rsp: 0x02
                   rsp: 0x01

cmd[0]:0xfa
cmd[1]:0x02
cmd[2]:0x01
                   rsp: 0xfa
                   rsp: 0x02
                   rsp: 0x01

cmd[0]:0xba
cmd[1]:0x02
                   rsp: 0xfa
                   rsp: 0x02
                   rsp: 0x01

cmd[0]:0xfa
cmd[1]:0x02
cmd[2]:0x01
                   rsp: 0xfa
                   rsp: 0x02
                   rsp: 0x01

cmd[0]:0xba
cmd[1]:0x02
                   rsp: 0xfa
                   rsp: 0x02
                   rsp: 0x01

cmd[0]:0xfa
cmd[1]:0x02
cmd[2]:0x01
                   rsp: 0xfa
                   rsp: 0x02
                   rsp: 0x01

cmd[0]:0xba
cmd[1]:0x02
                   rsp: 0xfa
                   rsp: 0x02
                   rsp: 0x01

cmd[0]:0xfa
cmd[1]:0x02
cmd[2]:0x01
                   rsp: 0x0a
                   rsp: 0x02
                   rsp: 0x00

Re: Desfire Card Command Response

Thanks for your commands.  I'm having the same issue with the Writing Encrypted Data to the card now as well

What does 0x0a, 0xfa and 0xba represent in your commands and responses - are they for the card reader?

Thanks

Re: Desfire Card Command Response

cmd is reader send to card.
rsp is response of card.