Giter VIP home page Giter VIP logo

Comments (5)

smlu avatar smlu commented on August 12, 2024

Thank you for reporting this issue!
From what I greathearted from above log the problem is the check digit character for optional data which is special character '<' in this case.
Could you test the develop branch and see if it fixes your problem?

from dmrtd.

SimonVillage avatar SimonVillage commented on August 12, 2024

I can confirm that dev branch works with my German passport.

When trying a Thai passport I am receiving:

flutter: passport FINE: 2022-02-20 11:43:18.051408: Selecting MF
flutter: mrtd.api FINE: 2022-02-20 11:43:18.051810: Selecting MF
[CoreNFC] 00000002 816b5ef0 -[NFCTagReaderSession setAlertMessage:]:90  (null)
flutter: icc FINE: 2022-02-20 11:43:18.052137: Transceiving to ICC: C-APDU(CLA:00 INS:A4 P1:00 P2:0C Le:0 Lc:2 Data:3f00)
flutter: icc FINE: 2022-02-20 11:43:18.053044: Sending 7 byte(s) to ICC: data='00a4000c023f00'
flutter: icc FINE: 2022-02-20 11:43:18.075544: Received 2 byte(s) from ICC
flutter: icc FINE: 2022-02-20 11:43:18.075764:  data='6a86'
flutter: icc FINE: 2022-02-20 11:43:18.075882: Received response from ICC: sw=6A86 data_len=0
flutter: icc FINE: 2022-02-20 11:43:18.076007:  data=null
flutter: mrtdeg.app SEVERE: 2022-02-20 11:43:18.076428: PassportError: Incorrect parameters P1-P2
flutter: nfc.provider FINE: 2022-02-20 11:43:18.076659: Disconnecting

from dmrtd.

smlu avatar smlu commented on August 12, 2024

It looks like the Thai passport doesn't support select command for Master File (example app tries to read EF.CardAccess).
I made some changes how master file is selected in develop branch. Could you check if dev branch now works with Thai & German passport?

from dmrtd.

SimonVillage avatar SimonVillage commented on August 12, 2024

Still the same error. I commented EF.CardAccess and EF.CardSecurity but now I am receiving

flutter: icc FINE: 2022-02-21 13:27:24.793685: Transceiving to ICC: C-APDU(CLA:00 INS:B0 P1:35 P2:45 Le:256 Lc:0 Data:null)
flutter: mrtd.sm FINE: 2022-02-21 13:27:24.793735: Protecting APDU
flutter: mrtd.sm FINER: 2022-02-21 13:27:24.793775:   header=00b03545
flutter: mrtd.sm FINER: 2022-02-21 13:27:24.793811:   data=null
flutter: mrtd.sm FINER: 2022-02-21 13:27:24.793845:   Le=256
flutter: mrtd.sm FINER: 2022-02-21 13:27:24.793880: masked APDU header=0cb03545
flutter: mrtd.sm FINER: 2022-02-21 13:27:24.793915: Generated data DO=
flutter: mrtd.sm FINER: 2022-02-21 13:27:24.793955: Generated data DO97=970100
flutter: mrtd.sm FINER: 2022-02-21 13:27:24.793994: Generated M=0cb0354580000000970100
flutter: mrtd.sm FINER: 2022-02-21 13:27:24.794047: Generated N=53a98c4dbd45205e0cb03545800000009701008000000000
flutter: mrtd.sm FINER: 2022-02-21 13:27:24.794092:   used SSC=53a98c4dbd45205e
flutter: mrtd.sm FINER: 2022-02-21 13:27:24.794531: Calculated CC=ec71a3dd9112c00e
flutter: mrtd.sm FINER: 2022-02-21 13:27:24.794573: Generated data DO8E=8e08ec71a3dd9112c00e
flutter: icc FINE: 2022-02-21 13:27:24.794623: Sending 19 byte(s) to ICC: data='0cb035450d9701008e08ec71a3dd9112c00e00'
flutter: mrtdeg.app SEVERE: 2022-02-21 13:27:24.795285: An exception was encountered while trying to read Passport: NfcProviderError: PlatformException(500, Communication error, Session invalidated, null)
flutter: nfc.provider FINE: 2022-02-21 13:27:24.795439: Disconnecting

I assume that this error is related to the flutter_nfc_kit lib?

Anyways, I only need MRZ data for now. Do you know if we can also get the passport picture?

from dmrtd.

smlu avatar smlu commented on August 12, 2024

Still the same error.

Do you get all this logs when MrtdApi.selectMasterFile is called?

I commented EF.CardAccess and EF.CardSecurity but now I am receiving

flutter: icc FINE: 2022-02-21 13:27:24.793685: Transceiving to ICC: C-APDU(CLA:00 INS:B0 P1:35 P2:45 Le:256 Lc:0 Data:null)
flutter: mrtd.sm FINE: 2022-02-21 13:27:24.793735: Protecting APDU
flutter: mrtd.sm FINER: 2022-02-21 13:27:24.793775:   header=00b03545
flutter: mrtd.sm FINER: 2022-02-21 13:27:24.793811:   data=null
flutter: mrtd.sm FINER: 2022-02-21 13:27:24.793845:   Le=256
flutter: mrtd.sm FINER: 2022-02-21 13:27:24.793880: masked APDU header=0cb03545
flutter: mrtd.sm FINER: 2022-02-21 13:27:24.793915: Generated data DO=
flutter: mrtd.sm FINER: 2022-02-21 13:27:24.793955: Generated data DO97=970100
flutter: mrtd.sm FINER: 2022-02-21 13:27:24.793994: Generated M=0cb0354580000000970100
flutter: mrtd.sm FINER: 2022-02-21 13:27:24.794047: Generated N=53a98c4dbd45205e0cb03545800000009701008000000000
flutter: mrtd.sm FINER: 2022-02-21 13:27:24.794092:   used SSC=53a98c4dbd45205e
flutter: mrtd.sm FINER: 2022-02-21 13:27:24.794531: Calculated CC=ec71a3dd9112c00e
flutter: mrtd.sm FINER: 2022-02-21 13:27:24.794573: Generated data DO8E=8e08ec71a3dd9112c00e
flutter: icc FINE: 2022-02-21 13:27:24.794623: Sending 19 byte(s) to ICC: data='0cb035450d9701008e08ec71a3dd9112c00e00'
flutter: mrtdeg.app SEVERE: 2022-02-21 13:27:24.795285: An exception was encountered while trying to read Passport: NfcProviderError: PlatformException(500, Communication error, Session invalidated, null)
flutter: nfc.provider FINE: 2022-02-21 13:27:24.795439: Disconnecting

I assume that this error is related to the flutter_nfc_kit lib?

Are you reading passport with Android phone? If so, can you try raising transceive timeout. By default timeout is 10 sec.
In example app after _nfc is constructed you can set timeout to e.g.: _nfc.timeout = Duration(seconds: 30)

Anyways, I only need MRZ data for now. Do you know if we can also get the passport picture?

The picture is stored in EF.DG2 file on passport. This library for now supports only reading raw bytes of EF.DG2 (i.e. passport.readEfDG2()).
Note the image in EF.DG2 is usually stored in jpeg 2000 (JP2) image format. I haven't found any good flutter library yet to support this format.

from dmrtd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.