Open quantum-x opened 8 years ago
This seems to point towards a bug in the PCSC driver of PN532, but it's hard to tell for sure. Could you also provide a dump of the "Logs" tab in cardpeek (at least the relevant lines). There might be some additional info there that detail why cardpeek returns an "application level error"...
Here we go:
AMEX on the PN532 interface:
0021 DEBUG Attempting to connect to 'pcsc://PN532 board on UART 00 00'
0022 DEBUG Could not determinate reader maximum input length
0023 INFO Connection successful, protocol is T=1
0024 INFO ATR is 16 bytes: 3B8B80010031C0641F27010000900036
0025 INFO Could not find ATR in smartcard database.
0026 INFO send: 00A404000E315041592E5359532E4444(...) [4S]
0027 INFO Recv: 9000 6F1A840E315041592E5359532E444446(...) [Normal processing]
0028 INFO send: 00B2010C00 [2S]
0029 INFO Recv: 9000 7041611F4F08A0000000250108015010(...) [Normal processing]
0030 INFO PSE contains application #A000000025010801
0031 INFO PSE contains application #A0000000291010
0032 INFO send: 00B2020C00 [2S]
0033 INFO Recv: 6A83 [Wrong parameter(s) P1-P2 - Record not found]
0034 INFO Reconnected reader
0035 INFO ATR is 16 bytes: 3B8B80010031C0641F27010000900036
0036 INFO Processing application #A000000025010801
0037 INFO send: 00A4040008A00000002501080100 [4S]
0038 ERROR Failed to transmit command to card: Transaction failed. (error 0x80100016).
0039 INFO Recv: 6FFF [Cardpeek application-level error]
0040 ERROR Failed to reconnect reader: No smart card inserted. (error 0x8010000c).
0041 ERROR Failed to query card status: Card was reset. (error 0x80100068).
0042 INFO ATR is 0 bytes:
0043 INFO Processing application #A0000000291010
0044 INFO send: 00A4040007A000000029101000 [4S]
0045 ERROR Unknown smartcard protocol: 0
0046 INFO Recv: 6FFF [Cardpeek application-level error]
0047 ERROR Failed to reconnect reader: Card protocol mismatch. (error 0x8010000f).
0048 ERROR Failed to query card status: Card was reset. (error 0x80100068).
0049 INFO ATR is 0 bytes:
0050 INFO Processing CPLC data
0051 INFO send: 80CA9F7F00 [2S]
0052 ERROR Unknown smartcard protocol: 0
0053 INFO Recv: 6FFF [Cardpeek application-level error]
0054 INFO Disconnected reader
0055 DEBUG Executing 'ui.save_view("/home/rebadge/AMEX - EMV - ACR - Dump.xml")'
0056 INFO Wrote card data to '/home/rebadge/AMEX - EMV - ACR - Dump.xml'
AMEX on the ACR 122U
0021 DEBUG Attempting to connect to 'pcsc://ACS ACR122U PICC Interface 00 00'
0022 INFO Reader maximum input length is 261 bytes
0023 INFO Connection successful, protocol is T=1
0024 INFO ATR is 16 bytes: 3B8B80010031C0641F27010000900036
0025 INFO Could not find ATR in smartcard database.
0026 INFO send: 00A404000E315041592E5359532E4444(...) [4S]
0027 INFO Recv: 9000 6F1A840E315041592E5359532E444446(...) [Normal processing]
0028 INFO send: 00B2010C00 [2S]
0029 INFO Recv: 9000 7041611F4F08A0000000250108015010(...) [Normal processing]
0030 INFO PSE contains application #A000000025010801
0031 INFO PSE contains application #A0000000291010
0032 INFO send: 00B2020C00 [2S]
0033 INFO Recv: 6A83 [Wrong parameter(s) P1-P2 - Record not found]
0034 INFO Reconnected reader
0035 INFO ATR is 16 bytes: 3B8B80010031C0641F27010000900036
0036 INFO Processing application #A000000025010801
0037 INFO send: 00A4040008A00000002501080100 [4S]
0038 INFO Recv: 9000 6F2C8408A000000025010801A5205010(...) [Normal processing]
0039 INFO Attempting GPO
0040 INFO send: 80A800000383010000 [4S]
0041 INFO Recv: 9000 80161800080101000803030108050500(...) [Normal processing]
0042 INFO send: 80CA9F3600 [2S]
0043 INFO Recv: 9000 9F3602000E [Normal processing]
0044 INFO send: 80CA9F1300 [2S]
0045 INFO Recv: 6985 [Command not allowed - Conditions of use not satisfied]
0046 INFO send: 80CA9F1700 [2S]
0047 INFO Recv: 6985 [Command not allowed - Conditions of use not satisfied]
0048 INFO send: 80CA9F4D00 [2S]
0049 INFO Recv: 6A86 [Wrong parameter(s) P1-P2 - Incorrect parameters P1-P2]
0050 INFO send: 80CA9F4F00 [2S]
0051 INFO Recv: 6A86 [Wrong parameter(s) P1-P2 - Incorrect parameters P1-P2]
0052 INFO send: 80CA9F4D00 [2S]
0053 INFO Recv: 6A86 [Wrong parameter(s) P1-P2 - Incorrect parameters P1-P2]
0054 INFO send: 80CADF6000 [2S]
0055 INFO Recv: 6A86 [Wrong parameter(s) P1-P2 - Incorrect parameters P1-P2]
0056 INFO No transaction log indicator
0057 INFO Reading SFI 1, record 1
0058 INFO send: 00B2010C00 [2S]
0059 INFO Recv: 9000 70325713376088201041002D19087020(...) [Normal processing]
0060 INFO Reading SFI 1, record 2
0061 INFO send: 00B2020C00 [2S]
0062 INFO Recv: 6A83 [Wrong parameter(s) P1-P2 - Record not found]
0063 WARNING Read record failed for SFI 1, record 2
0064 INFO Reading SFI 1, record 3
0065 INFO send: 00B2030C00 [2S]
0066 INFO Recv: 9000 70755F24031908315F25031508015A08(...) [Normal processing]
0067 INFO Reading SFI 1, record 4
0068 INFO send: 00B2040C00 [2S]
0069 INFO Recv: 6A83 [Wrong parameter(s) P1-P2 - Record not found]
0070 WARNING Read record failed for SFI 1, record 4
0071 INFO Reading SFI 1, record 5
0072 INFO send: 00B2050C00 [2S]
0073 INFO Recv: 9000 7081B39081B01BFC07CD48CE7EEB6092(...) [Normal processing]
0074 INFO Reading SFI 1, record 6
0075 INFO send: 00B2060C00 [2S]
0076 INFO Recv: 6A83 [Wrong parameter(s) P1-P2 - Record not found]
0077 WARNING Read record failed for SFI 1, record 6
0078 INFO Reading SFI 2, record 1
0079 INFO send: 00B2011400 [2S]
0080 INFO Recv: 6A83 [Wrong parameter(s) P1-P2 - Record not found]
0081 WARNING Read record failed for SFI 2, record 1
0082 INFO Reading SFI 2, record 2
0083 INFO send: 00B2021400 [2S]
0084 INFO Recv: 9000 700D9F3201038F010F92041B0A36BB [Normal processing]
0085 INFO Reading SFI 2, record 3
0086 INFO send: 00B2031400 [2S]
...snip...
0125 INFO Reading SFI 4, record 1
0126 INFO send: 00B2012400 [2S]
0127 INFO Recv: 9000 7081A59F46819063B6E101A3CBDB269B(...) [Normal processing]
0128 INFO Reading SFI 4, record 2
0129 INFO send: 00B2022400 [2S]
0130 INFO Recv: 6A83 [Wrong parameter(s) P1-P2 - Record not found]
..snip...
0791 WARNING Read record failed for SFI 31, record 5
0792 INFO Reading SFI 31, record 6
0793 INFO send: 00B206FC00 [2S]
0794 INFO Recv: 6A86 [Wrong parameter(s) P1-P2 - Incorrect parameters P1-P2]
0795 WARNING Read record failed for SFI 31, record 6
0796 INFO Reconnected reader
0797 INFO ATR is 16 bytes: 3B8B80010031C0641F27010000900036
0798 INFO Processing application #A0000000291010
0799 INFO send: 00A4040007A000000029101000 [4S]
0800 INFO Recv: 9000 6F258407A0000000291010A51A501041(...) [Normal processing]
0801 INFO Attempting GPO
0802 INFO send: 80A8000002830000 [4S]
0803 INFO Recv: 9000 80161800080101000803030108050500(...) [Normal processing]
0804 INFO send: 80CA9F3600 [2S]
0805 INFO Recv: 9000 9F3602000F [Normal processing]
0806 INFO send: 80CA9F1300 [2S]
0807 INFO Recv: 6985 [Command not allowed - Conditions of use not satisfied]
0808 INFO send: 80CA9F1700 [2S]
0809 INFO Recv: 6985 [Command not allowed - Conditions of use not satisfied]
0810 INFO send: 80CA9F4D00 [2S]
0811 INFO Recv: 6A86 [Wrong parameter(s) P1-P2 - Incorrect parameters P1-P2]
...snip..
1553 WARNING Read record failed for SFI 31, record 5
1554 INFO Reading SFI 31, record 6
1555 INFO send: 00B206FC00 [2S]
1556 INFO Recv: 6A86 [Wrong parameter(s) P1-P2 - Incorrect parameters P1-P2]
1557 WARNING Read record failed for SFI 31, record 6
1558 INFO Reconnected reader
1559 INFO ATR is 16 bytes: 3B8B80010031C0641F27010000900036
1560 INFO Processing CPLC data
1561 INFO send: 80CA9F7F00 [2S]
1562 INFO Recv: 6A86 [Wrong parameter(s) P1-P2 - Incorrect parameters P1-P2]
1563 INFO Disconnected reader
Mastercard on the ACR122U
0018 INFO Selected 'pcsc://ACS ACR122U PICC Interface 00 00'
0019 DEBUG cardpeek scripts will be scheduled for update in about 5 day(s).
0020 INFO Running script emv.lua (please wait)
0021 DEBUG Attempting to connect to 'pcsc://ACS ACR122U PICC Interface 00 00'
0022 INFO Reader maximum input length is 261 bytes
0023 INFO Connection successful, protocol is T=1
0024 INFO ATR is 17 bytes: 3B8C80015000253215000000008081712F
0025 INFO Could not find ATR in smartcard database.
0026 INFO send: 00A404000E315041592E5359532E4444(...) [4S]
0027 INFO Recv: 9000 6F20840E315041592E5359532E444446(...) [Normal processing]
0028 INFO send: 00B2010C00 [2S]
0029 INFO Recv: 9000 702361214F07A0000000421010500243(...) [Normal processing]
0030 INFO PSE contains application #A0000000421010
0031 INFO send: 00B2020C00 [2S]
0032 INFO Recv: 9000 702761254F07A0000000041010500A4D(...) [Normal processing]
0033 INFO PSE contains application #A0000000041010
0034 INFO send: 00B2030C00 [2S]
0035 INFO Recv: 6A83 [Wrong parameter(s) P1-P2 - Record not found]
0036 INFO Reconnected reader
0037 INFO ATR is 17 bytes: 3B8C80015000253215000000008081712F
0038 INFO Processing application #A0000000421010
0039 INFO send: 00A4040007A000000042101000 [4S]
0040 INFO Recv: 9000 6F358407A0000000421010A52A500243(...) [Normal processing]
0041 INFO Attempting GPO
0042 INFO send: 80A8000002830000 [4S]
0043 INFO Recv: 9000 771282021980940C1001010118010100(...) [Normal processing]
0044 INFO send: 80CA9F3600 [2S]
0045 INFO Recv: 6A88 [Wrong parameter(s) P1-P2 - Referenced data not found]
0046 INFO send: 80CA9F1300 [2S]
0047 INFO Recv: 6A88 [Wrong parameter(s) P1-P2 - Referenced data not found]
0048 INFO send: 80CA9F1700 [2S]
0049 INFO Recv: 9000 9F170103 [Normal processing]
0050 INFO send: 80CA9F4D00 [2S]
0051 INFO Recv: 6A88 [Wrong parameter(s) P1-P2 - Referenced data not found]
0052 INFO send: 80CA9F4F00 [2S]
0053 INFO Recv: 9000 9F4F109F02069F27019F1A025F2A029A(...) [Normal processing]
0054 INFO send: 80CA9F4D00 [2S]
0055 INFO Recv: 6A88 [Wrong parameter(s) P1-P2 - Referenced data not found]
0056 INFO send: 80CADF6000 [2S]
0057 INFO Recv: 6A88 [Wrong parameter(s) P1-P2 - Referenced data not found]
0058 INFO No transaction log indicator
0059 INFO Reading SFI 1, record 1
0060 INFO send: 00B2010C00 [2S]
0061 INFO Recv: 6A82 [Wrong parameter(s) P1-P2 - File not found]
0062 WARNING Read record failed for SFI 1, record 1
0063 INFO Reading SFI 1, record 2
0064 INFO send: 00B2020C00 [2S]
0065 INFO Recv: 6A82 [Wrong parameter(s) P1-P2 - File not found]
0066 WARNING Read record failed for SFI 1, record 2
0067 INFO Reading SFI 1, record 3
0068 INFO send: 00B2030C00 [2S]
0069 INFO Recv: 6A82 [Wrong parameter(s) P1-P2 - File not found]
0070 WARNING Read record failed for SFI 1, record 3
0071 INFO Reading SFI 1, record 4
0072 INFO send: 00B2040C00 [2S]
0073 INFO Recv: 6A82 [Wrong parameter(s) P1-P2 - File not found]
0074 WARNING Read record failed for SFI 1, record 4
0075 INFO Reading SFI 1, record 5
0076 INFO send: 00B2050C00 [2S]
0077 INFO Recv: 6A82 [Wrong parameter(s) P1-P2 - File not found]
0078 WARNING Read record failed for SFI 1, record 5
0079 INFO Reading SFI 1, record 6
0080 INFO send: 00B2060C00 [2S]
0081 INFO Recv: 6A82 [Wrong parameter(s) P1-P2 - File not found]
0082 WARNING Read record failed for SFI 1, record 6
0083 INFO Reading SFI 2, record 1
0084 INFO send: 00B2011400 [2S]
0085 INFO Recv: 9000 70819C57135132620058350435D17052(...) [Normal processing]
0086 INFO Reading SFI 2, record 2
0087 INFO send: 00B2021400 [2S]
0088 INFO Recv: 6A83 [Wrong parameter(s) P1-P2 - Record not found]
0089 WARNING Read record failed for SFI 2, record 2
0090 INFO Reading SFI 2, record 3
0091 INFO send: 00B2031400 [2S]
0092 INFO Recv: 6A83 [Wrong parameter(s) P1-P2 - Record not found]
0093 WARNING Read record failed for SFI 2, record 3
0094 INFO Reading SFI 2, record 4
0095 INFO send: 00B2041400 [2S]
0096 INFO Recv: 6A83 [Wrong parameter(s) P1-P2 - Record not found]
0097 WARNING Read record failed for SFI 2, record 4
0098 INFO Reading SFI 2, record 5
0099 INFO send: 00B2051400 [2S]
0100 INFO Recv: 6A83 [Wrong parameter(s) P1-P2 - Record not found]
0101 WARNING Read record failed for SFI 2, record 5
0102 INFO Reading SFI 2, record 6
0103 INFO send: 00B2061400 [2S]
0104 INFO Recv: 6A83 [Wrong parameter(s) P1-P2 - Record not found]
0105 WARNING Read record failed for SFI 2, record 6
0106 INFO Reading SFI 3, record 1
0107 INFO send: 00B2011C00 [2S]
0108 INFO Recv: 9000 7081E08F01079F320103922457B35593(...) [Normal processing]
0109 INFO Reading SFI 3, record 2
0110 INFO send: 00B2021C00 [2S]
0111 INFO Recv: 6A83 [Wrong parameter(s) P1-P2 - Record not found]
0112 WARNING Read record failed for SFI 3, record 2
0113 INFO Reading SFI 3, record 3
0114 INFO send: 00B2031C00 [2S]
...and so on
Mastercard on the PN532: Nothing. Card is not even detected.
Under lsnfc:
lsnfc - NFC device: pn532_uart:/dev/ttyAMA0
ISO14443B: PUPI: 00253215
Application Data: 00000000
Protocol Info: 808171
1 tag(s) on device.
pcsc_scan
PC/SC device scanner
V 1.4.25 (c) 2001-2011, Ludovic Rousseau <ludovic.rousseau@free.fr>
Compiled with PC/SC lite version: 1.8.15
Using reader plug'n play mechanism
Scanning present readers...
0: PN532 board on UART 00 00
Wed Feb 3 23:39:58 2016
Reader 0: PN532 board on UART 00 00
Card state: Card removed,
So it gets more and more curious...
@L1L1 Do you have any idea where we could progress from here?
Have you tried updating your scripts? I run into the same issue and I'm not sure if the server is down right now or communications between the program and its servers are being blocked by my firewall.
Edit: Also, if anybody knows how to update the scripts manually please let me know as I havent figured that out myself yet.
When running on an ACR-122u system w/ an AMEX card via PCSC USB, I get:
However, the same card on an UART PN532 Reader, using pcsc-lite and idfnfc-activate, I get:
If I run the successful commands (from the first instance) manually, I get a successful output:
Without diving into the code, the initial problem may be the routine searching for the application record - which may be a problem further down in idfnfc / pcsc-lite, or perhaps in cardpeek.
Any insight would be appreciated.
Cardpeek -v gives:
For my project, unfortunately we are invested in using the PN532 interface..