-
Notifications
You must be signed in to change notification settings - Fork 250
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
Can not select Master File to read EF.CardAccess (for PACE) with Vietnam ID card (error: 6D 00) #219
Comments
Can you please supply a log? And are you sure your passport supports PACE? |
Hey @AndyQ . this issue is a little bit different than the exact error messages i've seen in other open/closed issues, but i wanted to let you know i found something interesting with master file selection for PACE (that might also fix this one). there might be more too, but i think this is a good sampling. what i found was that if i use 0x02 for the p1 parameter in readCardAccess in TagReader, the card access is able to be selected. i am not nearly as well versed in this as you are, so my terminology might be a bit wrong, but i think for some nfc chips the card access file might actually live in the applet rather than in the master file. i think by sending 0x02, we are just going and selecting the EF file directly. see 3.6.2 EF Selection Using the SELECT Command in ICAO 9303. I have a Latvian ID that was giving the exact same error as in #116, and when I made this change it fixed PACE. It also seems like using it as a fallback does work (important since most documents will still require the original 0x00 p1 param), at least for the Latvian ID. it doesn't make me rescan or anything when I try a different p1 param. |
Here is log: I received [0x6d sw2:0x00](sw1:0x6d sw2:0x00) when call tagReader.readCardAccess() when I comment select master file and I read only EF.CardAccess, I mean selecting the EF file directly, I got error Authentication method blocked @daniel-e-gonzalez ;(( Please help me, I really need using PACE. |
@longcon9999 it isn't commenting out the first select entirely that fixed the "Incorrect P1-P2 parameters" error, it was just changing the P1 parameter from 0x00 to 0x02 i.e. let cmd = NFCISO7816APDU(instructionClass: 0x00, instructionCode: 0xA4, p1Parameter: 0x02, p2Parameter: 0x0C, data: Data([0x3f, 0x00]), expectedResponseLength: -1). i don't know for sure if it would work for your case since your error is different, but if you are trying things then I figured it would be worth a shot to make sure you are trying the fix correctly. like i said though, i only am sure that this fixes the "Incorrect P1-P2 parameters" specifically during the readCardAccess function. |
|
I got same issue |
i commented select master file apdu and just executed select card access file only with apdu: 00 A4 02 0C 02 01 1C then I received 9000 (success) response with my Vietnam ID card |
I have got same issue. Did you find any solution @longcon9999? |
Hi @lttrung2001, When you receive 9000 what next you do for decode the response? |
You should send read binary of card access file apdu. But I don't know how to read binary sequently or decode response |
I always got error 6D 00 (Instruction code not supported or invalid) when select master file, so I can not using PACE. Please help me, @AndyQ. Thank you
The text was updated successfully, but these errors were encountered: