italia / cie-PN532

Arduino library for SPI and I2C access to the NFC chip in the Italian Electronic Identity Card (CIE)
BSD 3-Clause "New" or "Revised" License
23 stars 8 forks source link

"File or application not found; Command (failure) [...]" for every field #5

Open valerionew opened 5 years ago

valerionew commented 5 years ago

Ciao! I've received my CIE a few days ago and i wanted to test it with this library. I happend to have a PN532 shield from Adafruit. I've installed this lib and the modified PN532 library linked in the readme, i've uploaded the ReadAll example to my arduino Uno, to which i've connected the shield with power and the 4 SPI signals following the pin numbering suggested by the example.
I've left out the reset and IRQ pins, as their declaration is commented in the example.

Sadly i don't have anything else to test that my CIE is properly working, any suggestion will be appreciated.

Following is the log with the verbose option:

Found chip PN532
Firmware ver. 1.6
PN53x initialized, waiting for a CIE card...
TIMEOUT!
Tag number: 1
File or application not found 0x6A 0x82
Command (failure): 0x00 0xA4 0x04 0x0C 0x0D 0xA0 0x00 0x00 0x00 0x30 0x80 0x00 0x00 0x00 0x09 0x81 0x60 0x01
Couldn't select the IAS application
Error reading EF_SN_ICC
We have 1302 bytes of memory left
File or application not found 0x6A 0x82
Command (failure): 0x00 0xA4 0x04 0x0C 0x0D 0xA0 0x00 0x00 0x00 0x30 0x80 0x00 0x00 0x00 0x09 0x81 0x60 0x01
Couldn't select the IAS application
Couldn't detect a tag in the BER content
Error reading EF_DH
We have 1302 bytes of memory left
File or application not found 0x6A 0x82
Command (failure): 0x00 0xA4 0x04 0x0C 0x0D 0xA0 0x00 0x00 0x00 0x30 0x80 0x00 0x00 0x00 0x09 0x81 0x60 0x01
Couldn't select the IAS application
Error reading EF_ATR
We have 1302 bytes of memory left
File or application not found 0x6A 0x82
Command (failure): 0x00 0xA4 0x04 0x0C 0x0D 0xA0 0x00 0x00 0x00 0x30 0x80 0x00 0x00 0x00 0x09 0x81 0x60 0x01
Couldn't select the IAS application
Error reading EF_ID_Servizi
We have 1302 bytes of memory left
File or application not found 0x6A 0x82
Command (failure): 0x00 0xA4 0x04 0x0C 0x0D 0xA0 0x00 0x00 0x00 0x30 0x80 0x00 0x00 0x00 0x09 0x81 0x60 0x01
Couldn't select the IAS application
Error reading EF_Int_Kpub
We have 1318 bytes of memory left
File or application not found 0x6A 0x82
Command (failure): 0x00 0xA4 0x04 0x0C 0x0D 0xA0 0x00 0x00 0x00 0x30 0x80 0x00 0x00 0x00 0x09 0x81 0x60 0x01
Couldn't select the IAS application
Error reading EF_Servizi_Int_Kpub
We have 1318 bytes of memory left
EF_SOD
File or application not found 0x6A 0x82
Command (failure): 0x00 0xA4 0x04 0x0C 0x0D 0xA0 0x00 0x00 0x00 0x30 0x80 0x00 0x00 0x00 0x09 0x81 0x60 0x01
Couldn't select the IAS application
Couldn't detect a tag in the BER content
EF_SOD length was 0
We have 1318 bytes of memory left

Read complete, you can remove the card now
TIMEOUT!
TIMEOUT!

As a test, i've also tryed with a regular MiFare card, the output is slightly different, giving "Don't know how to handle this command: 81" instead of "File or application not found 0x6A 0x82"

I've opened a different issue from #3 since in my case it doesn't run succesfully the first commands

BrightSoul commented 5 years ago

Hey there, thanks for submitting an issue. Sadly, as with #3, I cannot verify this at the present time since I still have to get my own CIE. However, I'm also busy with another project so I won't have time to look into this issue for a while. We're talking about a few months.

In the meantime, I'm not sure what to suggest. This error here puzzles me a bit since @fottavi said nothing changed since the CIE specimen sample I worked on.

File or application not found

I would suggest to try and list applications and their Elementary and Dedicated Files, just to be absolutely sure their addresses still match the specification. Unfortunately, there seems to be no standard ADPU command to do so, as stated here.

valerionew commented 4 years ago

I met @ebrienza at maker faire Rome, he said it's probably easy to fix, and he'll check the code soon

rubromka commented 4 years ago

Someone solved the problems described above?

valerionew commented 4 years ago

Hi @rubromka! I've been in touch with @ebrienza during the month of december and we agreed that as soon as he has time to do so, he'll check if he has the code with the fix on his local repo.

What I recall from the brief discussion with him at maker faire, (please Eros correct me if i'm wrong) was that at the present version there is hardcoded some sort of address or name for the file system in the smartcard, and while this name was fixed for the first batch of CIE, it can be one among a few, all listed in some standard.

ebrienza commented 4 years ago

Hi,

I have not investigated more, but it makes me think wrong ATR. I'm busy in other developments and I cannot work on it for the moment. I'm sorry.

deledG commented 2 years ago

Hello everybody! Do you have any update? tks