-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect parameters P1-P2", 106, 134 #164
Comments
Hey @febinfathah I end up with the same error 106, 134. Did you figure out what is wrong ? I suppose my real error is due to some authentication issue
|
@TSkovsgaard would you be able to test it with latest version? Also, can you post a log with debug enabled? See readme |
Testet out the newest version, this is the ouput for verbose logging. It is not a passport but an ID card I'm trying to scan.
|
ok cool, which country did issue the ID card? Just FYI with italians ID card it works flawlessy, so it may be interesting to know the country as well. |
Oman :) |
I see they issued 2 types of ID cards, one older (from 2006) and one newer (after 2017), are you dealing with the last type right? |
Yes my test card is issued in 2019, it is expired though but that shouldn't be a problem ? I testet with an expired passport which worked flawless. |
Maybe @AndyQ could say something looking at your logs, let's wait for him. |
I can't see anything obvious, the only thing I can think of trying though is changing the expectedResponseLength from 256 to -1 (similar to a couple of other issues). Not sure what affect (if any) this will have on existing code - would need to test that but would be interesting to see if this works for @TSkovsgaard. So if you change the method TagReader:doMutualAuthentication( cmdData : Data ).... |
Same error after changing to -1
Could it be something with the AID ? have the following AID's in my plist
|
Don't think so, that's really down to detecting the nfc chip. One other thing to try - does the ReadID app read the id card OK? |
No the ReadID app also returns an error |
It looking like it either doesn't support BAC properly or it has its own version. Sadly, I don't think there is much I can do here esp as I don' have access to id cards! |
It's happening on the latest version of Dutch passports as well. Exact same code for an older passport (eq. 2019) works, but a passport handed out in 2023 is not working. Same error code as above. 2023-03-21 15:1:57.3120 - Starting Basic Access Control (BAC) |
@renevdkooi can you also try it with ReadID? |
READID app seems to work, maybe they have a newer version? |
Can you post logs with logging set to debug? |
2023-03-21 15:10:02.8550 - tagReaderSessionDidBecomeActive |
I think I'm being thick.. i put "skipPACE" on true. :( |
That's good news! |
Hi @TSkovsgaard I have the same issue with OMAN resident card, Do you find any solutions? Thanks |
Can you post logs with logging set to debug? |
Hi @danydev , 2023-08-09 18:10:44.9990 - tagReaderSessionDidBecomeActive |
Would you mind using the latest code from main branch? (so no 2.0.2 currently published, but really what's on |
@danydev Just for info, I testing with an expired Oman Resident card, but that shouldn't be a problem ? |
no it should work, that should not be a factor |
@danydev Just for Info I checked with android app which is use the |
Hi @AndyQ And @danydev ,
And also read the DataGroups DG1, DG2, DG4, DG6, DG10, DG11, DG13 But I am not able to read DataGroups DG5, DG7, DG8, DG9, DG12, DG14 and DG16 Getting error: Here is full logs for COM and DG5: 2023-08-25 15:39:05.580593+0530 DemoIDV[50141:2580417] [CoreNFC] -[NFCTagReaderSession setAlertMessage:]:101 (null) |
Hello, we were facing the same issue, the explanation and fix are on iOS APIs, where PACE is sadly poorly documented. Long story short, on iOS >= 16, to read NFC from some PACE documents, you must use let pollingOption: NFCTagReaderSession.PollingOption = if #available(iOS 16, *) {
skipPACE ? .iso14443 : .pace // pace can not be combined
} else {
.iso14443
}
readerSession = NFCTagReaderSession(pollingOption: [pollingOption], delegate: self, queue: nil)
<key>com.apple.developer.nfc.readersession.formats</key>
<array>
<string>PACE</string>
<string>TAG</string>
</array> ℹ️ For french IDs, no need to add |
This is quite interesting, @AndyQ do you think we can incorporate somehow in the API? I mean, it looks like we could at very least offer a configuration to enable this polling, that would enable something like: I just described my use case where I want to scan the maximum "kind" of documents, but I think that some flexibility here in the API would be appreciated |
💯 Agree, maybe turning that It is unclear to what extent this pace polling is needed, as some PACE docs can be read w/o it. But OTOH, some docs, like 🇫🇷 ID cards it must be used... |
I've created a test branch - aa_test which makes the following changes:
If anyone can test this branch to see if it works fine that would be great! |
I am trying to scan the French ID card using the NFCPassportReader Demo application. But it was failing with an error "missing the required entitlement". After a bit of research, I found the application identifier for this card is "A0000001510000".
Now, I can detect the tag, and while selecting the master file I am getting this error "Incorrect parameters P1-P2", 106, 134". But in our android app, we are using JMRTD to read the ID cards and can select the master file and select and read the EF.CardAccess file. I have compared both JMRTD and NFCPassportReader codes, and we have the same APDU commands and flow.
Please help me with what I am missing and let me know if you need any further information.
Thank you in advance.
The text was updated successfully, but these errors were encountered: