AndyQ / NFCPassportReader

NFCPassportReader for iOS 13
MIT License
727 stars 231 forks source link

How Can I read the Data Group 11? #34

Closed puneetmahali closed 4 years ago

puneetmahali commented 4 years ago

Hi @AndyQ I want to read the Data Group 11 also. Any approach for that?

puneetmahali commented 4 years ago

Like DataGroup1 elements stores the all DG1 elements. So, I am getting nil in DG11? Is there need to define the DG11 tags also like 5F10, 5F11 etc etc. Or can achieve without it?

puneetmahali commented 4 years ago

Hi @AndyQ I am getting an error when I am trying to read the data group 11 Error : Reading tag - DG11 Error reading tag: sw1 - 6A, sw2 - 82 - reason: File not found Can you please explain it?

AndyQ commented 4 years ago

Are you sure that your passport actually contains DataGroup 11?

The dataGroupsPresent property on NFCPassportModel should contain all the datagroups contained within the passport. If it isn't there they you get the File not found error.

DataGroup 11 should already be parsed out (it works on my test passports that actually have a DG11 item - most of them don't sadly).

If your passport definately does have a DG11 item (and you can confirm that using the ReadID app - from the app store too), then you can step through the DG11 class and see why - pull requests welcome!

puneetmahali commented 4 years ago

Thanks @AndyQ for the quick reply.

Yeah that's true actually my passport read only DG1, DG2, DG 14,SOD & COM. So, now how do I know it's not possible to read Data Group11. Or, In other words how do we know which data groups are present in passport chip and which is readable through NFC?

Yeah I tested with READ ID and it says DG Read : 1, 3, 14, 2. Therefore NO DG 11 in my passport but Is there any documentation or something similar which can proof your passport have blah blah data groups.

AndyQ commented 4 years ago

I really suggest you read the ICAO DOC9303 E-Passport documentation - especially section 10 - https://www.icao.int/publications/Documents/9303_p10_cons_en.pdf

This describes what all the directory items that can be set on a passport are and also says what is mandatory (DG1,2, COM and SOD) and which are optional (pretty much everything else under certain conditions)

The data groups included can be found in the COM entry (which I read into into the dataGroupsPresent field).

Closing this now as this isn't an issue.