Skip to content
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

Problem connecting to virtual reader #265

Closed
Yellow-Flash-1 opened this issue Feb 13, 2024 · 12 comments
Closed

Problem connecting to virtual reader #265

Yellow-Flash-1 opened this issue Feb 13, 2024 · 12 comments

Comments

@Yellow-Flash-1
Copy link

Expected behaviour

i finally installed BixVReader on windows 11 and then i run vicc and press test with dummy card in smart card reader app. i also scanned the qr code for configuring the mobile app

Actual behaviour

the terminal that pops up stays blank and the app displays timeout

System

windows 11
android

@frankmorgner
Copy link
Owner

did you install the certificate as described here
http://frankmorgner.github.io/vsmartcard/virtualsmartcard/README.html#istalling-vpcd-on-windows

@Yellow-Flash-1
Copy link
Author

not exactly i just double clicked the certificate and then clicked install. but BixVReader shows in device manager so i dont think thats the problem.
i followed this to install #243 (comment)

@frankmorgner
Copy link
Owner

you can download the vicc binary to your pc and check whether it can connect to the local reader instead of using the android app to confirm

@Yellow-Flash-1
Copy link
Author

By vicc binary you mean the file vicc.exe right? when i execute it i hear the sound that windows makes when you connect a peripheral but the terminal that it creates stays blank

@frankmorgner
Copy link
Owner

vicc -vvv should print some output if the connection is good

@Yellow-Flash-1
Copy link
Author

i got this
virtualsmartcard-0.8_win64> ./vicc -vvv
15.02.2024 09:41:18 [WARNING] Using default SAM parameters. PIN=b'1234', Card Nr=b'1234567890'
15.02.2024 09:41:20 [ERROR] Failed to open socket: [WinError 10061] No connection could be made because the target machine actively refused it
15.02.2024 09:41:20 [ERROR] Is pcscd running at localhost? Is vpcd loaded? Is a firewall blocking port 35963?

@frankmorgner
Copy link
Owner

check the windows firewall as suggested

@Yellow-Flash-1
Copy link
Author

Yellow-Flash-1 commented Feb 15, 2024

im checking it. sorry i replied without reading the output. now it doesnt stay blank indefinitely as before its stays for a short while then closes. before you told me to type that command i found that -v is for verbose and adding more v means more verbosity but when i used it before this time it stayed blank too. but this time it gave that output and closed. just before this three days ago i disabled then re-enabled the device in device manager maybe its relevant

@Yellow-Flash-1 Yellow-Flash-1 changed the title Ptoblem connecting to virtual reader Problem connecting to virtual reader Feb 15, 2024
@Yellow-Flash-1
Copy link
Author

so apparently hyper-v took that port. i followed this reply on stackoverflow https://stackoverflow.com/a/71190095/20677336 and now i got this output

./vicc.exe -vvvv
15.02.2024 11:10:10 [WARNING] Using default SAM parameters. PIN=b'1234', Card Nr=b'1234567890'
15.02.2024 11:10:10 [INFO] Connected to virtual PCD at localhost:35963
15.02.2024 11:10:10 [INFO] Reset
15.02.2024 11:10:10 [INFO] Reset
15.02.2024 11:10:10 [INFO] Reset
15.02.2024 11:10:10 [INFO] Command APDU (16 bytes):
0000: 00 A4 04 00 0B A0 00 00 03 97 43 49 44 5F 01 00 ................
15.02.2024 11:10:10 [DEBUG] C_APDU(CLA=0x00, INS=0xA4, P1=0x04, P2=0x00, Lc=0x0B):
0000: A0 00 00 03 97 43 49 44 5F 01 00 ...........
15.02.2024 11:10:10 [DEBUG] Traceback (most recent call last):
File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
File "virtualsmartcard\SmartcardFilesystem.py", line 735, in selectFile
File "virtualsmartcard\SmartcardFilesystem.py", line 713, in _selectFile
File "virtualsmartcard\SmartcardFilesystem.py", line 522, in select
virtualsmartcard.SWutils.SwError: 27266
15.02.2024 11:10:10 [INFO] Checking error (Wrong parameters P1-P2): File or application not found
15.02.2024 11:10:10 [INFO] Response APDU (2 bytes):
0000: 6A 82 ..

15.02.2024 11:10:10 [INFO] Command APDU (5 bytes):
0000: 00 CA 7F 68 00 .....
15.02.2024 11:10:10 [DEBUG] C_APDU(CLA=0x00, INS=0xCA, P1=0x7F, P2=0x68, Le=0x00)
15.02.2024 11:10:10 [DEBUG] Traceback (most recent call last):
File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
File "virtualsmartcard\SmartcardFilesystem.py", line 1247, in getDataPlain
File "virtualsmartcard\SmartcardFilesystem.py", line 321, in getdata
virtualsmartcard.SWutils.SwError: 27265
15.02.2024 11:10:10 [INFO] Checking error (Wrong parameters P1-P2): Function not supported
15.02.2024 11:10:10 [INFO] Response APDU (2 bytes):
0000: 6A 81 ..

15.02.2024 11:10:10 [INFO] Command APDU (14 bytes):
0000: 00 A4 04 00 09 A0 00 00 03 08 00 00 10 00 ..............
15.02.2024 11:10:10 [DEBUG] C_APDU(CLA=0x00, INS=0xA4, P1=0x04, P2=0x00, Lc=0x09):
0000: A0 00 00 03 08 00 00 10 00 .........
15.02.2024 11:10:10 [DEBUG] Traceback (most recent call last):
File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
File "virtualsmartcard\SmartcardFilesystem.py", line 735, in selectFile
File "virtualsmartcard\SmartcardFilesystem.py", line 713, in _selectFile
File "virtualsmartcard\SmartcardFilesystem.py", line 522, in select
virtualsmartcard.SWutils.SwError: 27266
15.02.2024 11:10:10 [INFO] Checking error (Wrong parameters P1-P2): File or application not found
15.02.2024 11:10:10 [INFO] Response APDU (2 bytes):
0000: 6A 82 ..

15.02.2024 11:10:10 [INFO] Command APDU (14 bytes):
0000: 00 A4 04 00 09 A0 00 00 03 97 42 54 46 59 ..............
15.02.2024 11:10:10 [DEBUG] C_APDU(CLA=0x00, INS=0xA4, P1=0x04, P2=0x00, Lc=0x09):
0000: A0 00 00 03 97 42 54 46 59 .........
15.02.2024 11:10:10 [DEBUG] Traceback (most recent call last):
File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
File "virtualsmartcard\SmartcardFilesystem.py", line 735, in selectFile
File "virtualsmartcard\SmartcardFilesystem.py", line 713, in _selectFile
File "virtualsmartcard\SmartcardFilesystem.py", line 522, in select
virtualsmartcard.SWutils.SwError: 27266
15.02.2024 11:10:10 [INFO] Checking error (Wrong parameters P1-P2): File or application not found
15.02.2024 11:10:10 [INFO] Response APDU (2 bytes):
0000: 6A 82 ..

15.02.2024 11:10:10 [INFO] Command APDU (16 bytes):
0000: 00 A4 04 00 0B A0 00 00 03 97 43 49 44 5F 01 00 ................
15.02.2024 11:10:10 [DEBUG] C_APDU(CLA=0x00, INS=0xA4, P1=0x04, P2=0x00, Lc=0x0B):
0000: A0 00 00 03 97 43 49 44 5F 01 00 ...........
15.02.2024 11:10:10 [DEBUG] Traceback (most recent call last):
File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
File "virtualsmartcard\SmartcardFilesystem.py", line 735, in selectFile
File "virtualsmartcard\SmartcardFilesystem.py", line 713, in _selectFile
File "virtualsmartcard\SmartcardFilesystem.py", line 522, in select
virtualsmartcard.SWutils.SwError: 27266
15.02.2024 11:10:10 [INFO] Checking error (Wrong parameters P1-P2): File or application not found
15.02.2024 11:10:10 [INFO] Response APDU (2 bytes):
0000: 6A 82 ..

15.02.2024 11:10:10 [INFO] Command APDU (5 bytes):
0000: 00 CA 7F 68 00 .....
15.02.2024 11:10:10 [DEBUG] C_APDU(CLA=0x00, INS=0xCA, P1=0x7F, P2=0x68, Le=0x00)
15.02.2024 11:10:10 [DEBUG] Traceback (most recent call last):
File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
File "virtualsmartcard\SmartcardFilesystem.py", line 1247, in getDataPlain
File "virtualsmartcard\SmartcardFilesystem.py", line 321, in getdata
virtualsmartcard.SWutils.SwError: 27265
15.02.2024 11:10:10 [INFO] Checking error (Wrong parameters P1-P2): Function not supported
15.02.2024 11:10:10 [INFO] Response APDU (2 bytes):
0000: 6A 81 ..

15.02.2024 11:10:10 [INFO] Command APDU (14 bytes):
0000: 00 A4 04 00 09 A0 00 00 03 08 00 00 10 00 ..............
15.02.2024 11:10:10 [DEBUG] C_APDU(CLA=0x00, INS=0xA4, P1=0x04, P2=0x00, Lc=0x09):
0000: A0 00 00 03 08 00 00 10 00 .........
15.02.2024 11:10:10 [DEBUG] Traceback (most recent call last):
File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
File "virtualsmartcard\SmartcardFilesystem.py", line 735, in selectFile
File "virtualsmartcard\SmartcardFilesystem.py", line 713, in _selectFile
File "virtualsmartcard\SmartcardFilesystem.py", line 522, in select
virtualsmartcard.SWutils.SwError: 27266
15.02.2024 11:10:10 [INFO] Checking error (Wrong parameters P1-P2): File or application not found
15.02.2024 11:10:10 [INFO] Response APDU (2 bytes):
0000: 6A 82 ..

15.02.2024 11:10:10 [INFO] Command APDU (14 bytes):
0000: 00 A4 04 00 09 A0 00 00 03 97 42 54 46 59 ..............
15.02.2024 11:10:10 [DEBUG] C_APDU(CLA=0x00, INS=0xA4, P1=0x04, P2=0x00, Lc=0x09):
0000: A0 00 00 03 97 42 54 46 59 .........
15.02.2024 11:10:10 [DEBUG] Traceback (most recent call last):
File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
File "virtualsmartcard\SmartcardFilesystem.py", line 735, in selectFile
File "virtualsmartcard\SmartcardFilesystem.py", line 713, in _selectFile
File "virtualsmartcard\SmartcardFilesystem.py", line 522, in select
virtualsmartcard.SWutils.SwError: 27266
15.02.2024 11:10:10 [INFO] Checking error (Wrong parameters P1-P2): File or application not found
15.02.2024 11:10:10 [INFO] Response APDU (2 bytes):
0000: 6A 82 ..

15.02.2024 11:10:10 [INFO] Command APDU (16 bytes):
0000: 00 A4 04 00 0B A0 00 00 03 97 43 49 44 5F 01 00 ................
15.02.2024 11:10:10 [DEBUG] C_APDU(CLA=0x00, INS=0xA4, P1=0x04, P2=0x00, Lc=0x0B):
0000: A0 00 00 03 97 43 49 44 5F 01 00 ...........
15.02.2024 11:10:10 [DEBUG] Traceback (most recent call last):
File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
File "virtualsmartcard\SmartcardFilesystem.py", line 735, in selectFile
File "virtualsmartcard\SmartcardFilesystem.py", line 713, in _selectFile
File "virtualsmartcard\SmartcardFilesystem.py", line 522, in select
virtualsmartcard.SWutils.SwError: 27266
15.02.2024 11:10:10 [INFO] Checking error (Wrong parameters P1-P2): File or application not found
15.02.2024 11:10:10 [INFO] Response APDU (2 bytes):
0000: 6A 82 ..

15.02.2024 11:10:10 [INFO] Command APDU (5 bytes):
0000: 00 CA 7F 68 00 .....
15.02.2024 11:10:10 [DEBUG] C_APDU(CLA=0x00, INS=0xCA, P1=0x7F, P2=0x68, Le=0x00)
15.02.2024 11:10:10 [DEBUG] Traceback (most recent call last):
File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
File "virtualsmartcard\SmartcardFilesystem.py", line 1247, in getDataPlain
File "virtualsmartcard\SmartcardFilesystem.py", line 321, in getdata
virtualsmartcard.SWutils.SwError: 27265
15.02.2024 11:10:10 [INFO] Checking error (Wrong parameters P1-P2): Function not supported
15.02.2024 11:10:10 [INFO] Response APDU (2 bytes):
0000: 6A 81 ..

15.02.2024 11:10:10 [INFO] Command APDU (14 bytes):
0000: 00 A4 04 00 09 A0 00 00 03 08 00 00 10 00 ..............
15.02.2024 11:10:10 [DEBUG] C_APDU(CLA=0x00, INS=0xA4, P1=0x04, P2=0x00, Lc=0x09):
0000: A0 00 00 03 08 00 00 10 00 .........
15.02.2024 11:10:10 [DEBUG] Traceback (most recent call last):
File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
File "virtualsmartcard\SmartcardFilesystem.py", line 735, in selectFile
File "virtualsmartcard\SmartcardFilesystem.py", line 713, in _selectFile
File "virtualsmartcard\SmartcardFilesystem.py", line 522, in select
virtualsmartcard.SWutils.SwError: 27266
15.02.2024 11:10:10 [INFO] Checking error (Wrong parameters P1-P2): File or application not found
15.02.2024 11:10:10 [INFO] Response APDU (2 bytes):
0000: 6A 82 ..

15.02.2024 11:10:10 [INFO] Command APDU (14 bytes):
0000: 00 A4 04 00 09 A0 00 00 03 97 42 54 46 59 ..............
15.02.2024 11:10:10 [DEBUG] C_APDU(CLA=0x00, INS=0xA4, P1=0x04, P2=0x00, Lc=0x09):
0000: A0 00 00 03 97 42 54 46 59 .........
15.02.2024 11:10:10 [DEBUG] Traceback (most recent call last):
File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
File "virtualsmartcard\SmartcardFilesystem.py", line 735, in selectFile
File "virtualsmartcard\SmartcardFilesystem.py", line 713, in _selectFile
File "virtualsmartcard\SmartcardFilesystem.py", line 522, in select
virtualsmartcard.SWutils.SwError: 27266
15.02.2024 11:10:10 [INFO] Checking error (Wrong parameters P1-P2): File or application not found
15.02.2024 11:10:10 [INFO] Response APDU (2 bytes):
0000: 6A 82 ..

15.02.2024 11:10:10 [INFO] Command APDU (16 bytes):
0000: 00 A4 04 00 0B A0 00 00 03 97 43 49 44 5F 01 00 ................
15.02.2024 11:10:10 [DEBUG] C_APDU(CLA=0x00, INS=0xA4, P1=0x04, P2=0x00, Lc=0x0B):
0000: A0 00 00 03 97 43 49 44 5F 01 00 ...........
15.02.2024 11:10:10 [DEBUG] Traceback (most recent call last):
File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
File "virtualsmartcard\SmartcardFilesystem.py", line 735, in selectFile
File "virtualsmartcard\SmartcardFilesystem.py", line 713, in _selectFile
File "virtualsmartcard\SmartcardFilesystem.py", line 522, in select
virtualsmartcard.SWutils.SwError: 27266
15.02.2024 11:10:10 [INFO] Checking error (Wrong parameters P1-P2): File or application not found
15.02.2024 11:10:10 [INFO] Response APDU (2 bytes):
0000: 6A 82 ..

15.02.2024 11:10:10 [INFO] Command APDU (5 bytes):
0000: 00 CA 7F 68 00 .....
15.02.2024 11:10:10 [DEBUG] C_APDU(CLA=0x00, INS=0xCA, P1=0x7F, P2=0x68, Le=0x00)
15.02.2024 11:10:10 [DEBUG] Traceback (most recent call last):
File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
File "virtualsmartcard\SmartcardFilesystem.py", line 1247, in getDataPlain
File "virtualsmartcard\SmartcardFilesystem.py", line 321, in getdata
virtualsmartcard.SWutils.SwError: 27265
15.02.2024 11:10:10 [INFO] Checking error (Wrong parameters P1-P2): Function not supported
15.02.2024 11:10:10 [INFO] Response APDU (2 bytes):
0000: 6A 81 ..

15.02.2024 11:10:10 [INFO] Command APDU (14 bytes):
0000: 00 A4 04 00 09 A0 00 00 03 08 00 00 10 00 ..............
15.02.2024 11:10:10 [DEBUG] C_APDU(CLA=0x00, INS=0xA4, P1=0x04, P2=0x00, Lc=0x09):
0000: A0 00 00 03 08 00 00 10 00 .........
15.02.2024 11:10:10 [DEBUG] Traceback (most recent call last):
File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
File "virtualsmartcard\SmartcardFilesystem.py", line 735, in selectFile
File "virtualsmartcard\SmartcardFilesystem.py", line 713, in _selectFile
File "virtualsmartcard\SmartcardFilesystem.py", line 522, in select
virtualsmartcard.SWutils.SwError: 27266
15.02.2024 11:10:10 [INFO] Checking error (Wrong parameters P1-P2): File or application not found
15.02.2024 11:10:10 [INFO] Response APDU (2 bytes):
0000: 6A 82 ..

15.02.2024 11:10:10 [INFO] Command APDU (14 bytes):
0000: 00 A4 04 00 09 A0 00 00 03 97 42 54 46 59 ..............
15.02.2024 11:10:10 [DEBUG] C_APDU(CLA=0x00, INS=0xA4, P1=0x04, P2=0x00, Lc=0x09):
0000: A0 00 00 03 97 42 54 46 59 .........
15.02.2024 11:10:10 [DEBUG] Traceback (most recent call last):
File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
File "virtualsmartcard\SmartcardFilesystem.py", line 735, in selectFile
File "virtualsmartcard\SmartcardFilesystem.py", line 713, in _selectFile
File "virtualsmartcard\SmartcardFilesystem.py", line 522, in select
virtualsmartcard.SWutils.SwError: 27266
15.02.2024 11:10:10 [INFO] Checking error (Wrong parameters P1-P2): File or application not found
15.02.2024 11:10:10 [INFO] Response APDU (2 bytes):
0000: 6A 82 ..

15.02.2024 11:10:10 [INFO] Command APDU (16 bytes):
0000: 00 A4 04 00 0B A0 00 00 03 97 43 49 44 5F 01 00 ................
15.02.2024 11:10:10 [DEBUG] C_APDU(CLA=0x00, INS=0xA4, P1=0x04, P2=0x00, Lc=0x0B):
0000: A0 00 00 03 97 43 49 44 5F 01 00 ...........
15.02.2024 11:10:10 [DEBUG] Traceback (most recent call last):
File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
File "virtualsmartcard\SmartcardFilesystem.py", line 735, in selectFile
File "virtualsmartcard\SmartcardFilesystem.py", line 713, in _selectFile
File "virtualsmartcard\SmartcardFilesystem.py", line 522, in select
virtualsmartcard.SWutils.SwError: 27266
15.02.2024 11:10:10 [INFO] Checking error (Wrong parameters P1-P2): File or application not found
15.02.2024 11:10:10 [INFO] Response APDU (2 bytes):
0000: 6A 82 ..

15.02.2024 11:10:10 [INFO] Command APDU (5 bytes):
0000: 00 CA 7F 68 00 .....
15.02.2024 11:10:10 [DEBUG] C_APDU(CLA=0x00, INS=0xCA, P1=0x7F, P2=0x68, Le=0x00)
15.02.2024 11:10:10 [DEBUG] Traceback (most recent call last):
File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
File "virtualsmartcard\SmartcardFilesystem.py", line 1247, in getDataPlain
File "virtualsmartcard\SmartcardFilesystem.py", line 321, in getdata
virtualsmartcard.SWutils.SwError: 27265
15.02.2024 11:10:10 [INFO] Checking error (Wrong parameters P1-P2): Function not supported
15.02.2024 11:10:10 [INFO] Response APDU (2 bytes):
0000: 6A 81 ..

15.02.2024 11:10:10 [INFO] Command APDU (14 bytes):
0000: 00 A4 04 00 09 A0 00 00 03 08 00 00 10 00 ..............
15.02.2024 11:10:10 [DEBUG] C_APDU(CLA=0x00, INS=0xA4, P1=0x04, P2=0x00, Lc=0x09):
0000: A0 00 00 03 08 00 00 10 00 .........
15.02.2024 11:10:10 [DEBUG] Traceback (most recent call last):
File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
File "virtualsmartcard\SmartcardFilesystem.py", line 735, in selectFile
File "virtualsmartcard\SmartcardFilesystem.py", line 713, in _selectFile
File "virtualsmartcard\SmartcardFilesystem.py", line 522, in select
virtualsmartcard.SWutils.SwError: 27266
15.02.2024 11:10:10 [INFO] Checking error (Wrong parameters P1-P2): File or application not found
15.02.2024 11:10:10 [INFO] Response APDU (2 bytes):
0000: 6A 82 ..

15.02.2024 11:10:10 [INFO] Command APDU (14 bytes):
0000: 00 A4 04 00 09 A0 00 00 03 97 42 54 46 59 ..............
15.02.2024 11:10:10 [DEBUG] C_APDU(CLA=0x00, INS=0xA4, P1=0x04, P2=0x00, Lc=0x09):
0000: A0 00 00 03 97 42 54 46 59 .........
15.02.2024 11:10:10 [DEBUG] Traceback (most recent call last):
File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
File "virtualsmartcard\SmartcardFilesystem.py", line 735, in selectFile
File "virtualsmartcard\SmartcardFilesystem.py", line 713, in _selectFile
File "virtualsmartcard\SmartcardFilesystem.py", line 522, in select
virtualsmartcard.SWutils.SwError: 27266
15.02.2024 11:10:10 [INFO] Checking error (Wrong parameters P1-P2): File or application not found
15.02.2024 11:10:10 [INFO] Response APDU (2 bytes):
0000: 6A 82 ..

@frankmorgner
Copy link
Owner

35963 does not seem to be taken by Hyper-V. Anyway, good to hear this works.

@Yellow-Flash-1
Copy link
Author

it was when it asked me if the port is blocked. any way now when i run vicc i get this

> .\vicc.exe -vvvv
18.02.2024 06:35:43  [WARNING] Using default SAM parameters. PIN=b'1234', Card Nr=b'1234567890'
18.02.2024 06:35:43  [INFO] Connected to virtual PCD at localhost:35963
18.02.2024 06:35:43  [INFO] Reset
18.02.2024 06:35:43  [INFO] Reset
18.02.2024 06:35:43  [INFO] Reset
18.02.2024 06:35:43  [INFO] Command APDU (16 bytes):
  0000:  00 A4 04 00 0B A0 00 00 03 97 43 49 44 5F 01 00   ................
18.02.2024 06:35:43  [DEBUG] C_APDU(CLA=0x00, INS=0xA4, P1=0x04, P2=0x00, Lc=0x0B):
  0000:  A0 00 00 03 97 43 49 44 5F 01 00                  ...........
18.02.2024 06:35:43  [DEBUG] Traceback (most recent call last):
  File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
  File "virtualsmartcard\SmartcardFilesystem.py", line 735, in selectFile
  File "virtualsmartcard\SmartcardFilesystem.py", line 713, in _selectFile
  File "virtualsmartcard\SmartcardFilesystem.py", line 522, in select
virtualsmartcard.SWutils.SwError: 27266
18.02.2024 06:35:43  [INFO] Checking error (Wrong parameters P1-P2): File or application not found
18.02.2024 06:35:43  [INFO] Response APDU (2 bytes):
  0000:  6A 82                                             ..

18.02.2024 06:35:43  [INFO] Command APDU (5 bytes):
  0000:  00 CA 7F 68 00                                    .....
18.02.2024 06:35:43  [DEBUG] C_APDU(CLA=0x00, INS=0xCA, P1=0x7F, P2=0x68, Le=0x00)
18.02.2024 06:35:43  [DEBUG] Traceback (most recent call last):
  File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
  File "virtualsmartcard\SmartcardFilesystem.py", line 1247, in getDataPlain
  File "virtualsmartcard\SmartcardFilesystem.py", line 321, in getdata
virtualsmartcard.SWutils.SwError: 27265
18.02.2024 06:35:43  [INFO] Checking error (Wrong parameters P1-P2): Function not supported
18.02.2024 06:35:43  [INFO] Response APDU (2 bytes):
  0000:  6A 81                                             ..

18.02.2024 06:35:43  [INFO] Command APDU (14 bytes):
  0000:  00 A4 04 00 09 A0 00 00 03 08 00 00 10 00         ..............
18.02.2024 06:35:43  [DEBUG] C_APDU(CLA=0x00, INS=0xA4, P1=0x04, P2=0x00, Lc=0x09):
  0000:  A0 00 00 03 08 00 00 10 00                        .........
18.02.2024 06:35:43  [DEBUG] Traceback (most recent call last):
  File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
  File "virtualsmartcard\SmartcardFilesystem.py", line 735, in selectFile
  File "virtualsmartcard\SmartcardFilesystem.py", line 713, in _selectFile
  File "virtualsmartcard\SmartcardFilesystem.py", line 522, in select
virtualsmartcard.SWutils.SwError: 27266
18.02.2024 06:35:43  [INFO] Checking error (Wrong parameters P1-P2): File or application not found
18.02.2024 06:35:43  [INFO] Response APDU (2 bytes):
  0000:  6A 82                                             ..

18.02.2024 06:35:43  [INFO] Command APDU (14 bytes):
  0000:  00 A4 04 00 09 A0 00 00 03 97 42 54 46 59         ..............
18.02.2024 06:35:43  [DEBUG] C_APDU(CLA=0x00, INS=0xA4, P1=0x04, P2=0x00, Lc=0x09):
  0000:  A0 00 00 03 97 42 54 46 59                        .........
18.02.2024 06:35:43  [DEBUG] Traceback (most recent call last):
  File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
  File "virtualsmartcard\SmartcardFilesystem.py", line 735, in selectFile
  File "virtualsmartcard\SmartcardFilesystem.py", line 713, in _selectFile
  File "virtualsmartcard\SmartcardFilesystem.py", line 522, in select
virtualsmartcard.SWutils.SwError: 27266
18.02.2024 06:35:43  [INFO] Checking error (Wrong parameters P1-P2): File or application not found
18.02.2024 06:35:43  [INFO] Response APDU (2 bytes):
  0000:  6A 82                                             ..

18.02.2024 06:35:43  [INFO] Command APDU (16 bytes):
  0000:  00 A4 04 00 0B A0 00 00 03 97 43 49 44 5F 01 00   ................
18.02.2024 06:35:43  [DEBUG] C_APDU(CLA=0x00, INS=0xA4, P1=0x04, P2=0x00, Lc=0x0B):
  0000:  A0 00 00 03 97 43 49 44 5F 01 00                  ...........
18.02.2024 06:35:43  [DEBUG] Traceback (most recent call last):
  File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
  File "virtualsmartcard\SmartcardFilesystem.py", line 735, in selectFile
  File "virtualsmartcard\SmartcardFilesystem.py", line 713, in _selectFile
  File "virtualsmartcard\SmartcardFilesystem.py", line 522, in select
virtualsmartcard.SWutils.SwError: 27266
18.02.2024 06:35:43  [INFO] Checking error (Wrong parameters P1-P2): File or application not found
18.02.2024 06:35:43  [INFO] Response APDU (2 bytes):
  0000:  6A 82                                             ..

18.02.2024 06:35:43  [INFO] Command APDU (5 bytes):
  0000:  00 CA 7F 68 00                                    .....
18.02.2024 06:35:43  [DEBUG] C_APDU(CLA=0x00, INS=0xCA, P1=0x7F, P2=0x68, Le=0x00)
18.02.2024 06:35:43  [DEBUG] Traceback (most recent call last):
  File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
  File "virtualsmartcard\SmartcardFilesystem.py", line 1247, in getDataPlain
  File "virtualsmartcard\SmartcardFilesystem.py", line 321, in getdata
virtualsmartcard.SWutils.SwError: 27265
18.02.2024 06:35:43  [INFO] Checking error (Wrong parameters P1-P2): Function not supported
18.02.2024 06:35:43  [INFO] Response APDU (2 bytes):
  0000:  6A 81                                             ..

18.02.2024 06:35:43  [INFO] Command APDU (14 bytes):
  0000:  00 A4 04 00 09 A0 00 00 03 08 00 00 10 00         ..............
18.02.2024 06:35:43  [DEBUG] C_APDU(CLA=0x00, INS=0xA4, P1=0x04, P2=0x00, Lc=0x09):
  0000:  A0 00 00 03 08 00 00 10 00                        .........
18.02.2024 06:35:43  [DEBUG] Traceback (most recent call last):
  File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
  File "virtualsmartcard\SmartcardFilesystem.py", line 735, in selectFile
  File "virtualsmartcard\SmartcardFilesystem.py", line 713, in _selectFile
  File "virtualsmartcard\SmartcardFilesystem.py", line 522, in select
virtualsmartcard.SWutils.SwError: 27266
18.02.2024 06:35:43  [INFO] Checking error (Wrong parameters P1-P2): File or application not found
18.02.2024 06:35:43  [INFO] Response APDU (2 bytes):
  0000:  6A 82                                             ..

18.02.2024 06:35:43  [INFO] Command APDU (14 bytes):
  0000:  00 A4 04 00 09 A0 00 00 03 97 42 54 46 59         ..............
18.02.2024 06:35:43  [DEBUG] C_APDU(CLA=0x00, INS=0xA4, P1=0x04, P2=0x00, Lc=0x09):
  0000:  A0 00 00 03 97 42 54 46 59                        .........
18.02.2024 06:35:43  [DEBUG] Traceback (most recent call last):
  File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
  File "virtualsmartcard\SmartcardFilesystem.py", line 735, in selectFile
  File "virtualsmartcard\SmartcardFilesystem.py", line 713, in _selectFile
  File "virtualsmartcard\SmartcardFilesystem.py", line 522, in select
virtualsmartcard.SWutils.SwError: 27266
18.02.2024 06:35:43  [INFO] Checking error (Wrong parameters P1-P2): File or application not found
18.02.2024 06:35:43  [INFO] Response APDU (2 bytes):
  0000:  6A 82                                             ..

18.02.2024 06:35:43  [INFO] Command APDU (16 bytes):
  0000:  00 A4 04 00 0B A0 00 00 03 97 43 49 44 5F 01 00   ................
18.02.2024 06:35:43  [DEBUG] C_APDU(CLA=0x00, INS=0xA4, P1=0x04, P2=0x00, Lc=0x0B):
  0000:  A0 00 00 03 97 43 49 44 5F 01 00                  ...........
18.02.2024 06:35:43  [DEBUG] Traceback (most recent call last):
  File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
  File "virtualsmartcard\SmartcardFilesystem.py", line 735, in selectFile
  File "virtualsmartcard\SmartcardFilesystem.py", line 713, in _selectFile
  File "virtualsmartcard\SmartcardFilesystem.py", line 522, in select
virtualsmartcard.SWutils.SwError: 27266
18.02.2024 06:35:43  [INFO] Checking error (Wrong parameters P1-P2): File or application not found
18.02.2024 06:35:43  [INFO] Response APDU (2 bytes):
  0000:  6A 82                                             ..

18.02.2024 06:35:43  [INFO] Command APDU (5 bytes):
  0000:  00 CA 7F 68 00                                    .....
18.02.2024 06:35:43  [DEBUG] C_APDU(CLA=0x00, INS=0xCA, P1=0x7F, P2=0x68, Le=0x00)
18.02.2024 06:35:43  [DEBUG] Traceback (most recent call last):
  File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
  File "virtualsmartcard\SmartcardFilesystem.py", line 1247, in getDataPlain
  File "virtualsmartcard\SmartcardFilesystem.py", line 321, in getdata
virtualsmartcard.SWutils.SwError: 27265
18.02.2024 06:35:43  [INFO] Checking error (Wrong parameters P1-P2): Function not supported
18.02.2024 06:35:43  [INFO] Response APDU (2 bytes):
  0000:  6A 81                                             ..

18.02.2024 06:35:43  [INFO] Command APDU (14 bytes):
  0000:  00 A4 04 00 09 A0 00 00 03 08 00 00 10 00         ..............
18.02.2024 06:35:43  [DEBUG] C_APDU(CLA=0x00, INS=0xA4, P1=0x04, P2=0x00, Lc=0x09):
  0000:  A0 00 00 03 08 00 00 10 00                        .........
18.02.2024 06:35:43  [DEBUG] Traceback (most recent call last):
  File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
  File "virtualsmartcard\SmartcardFilesystem.py", line 735, in selectFile
  File "virtualsmartcard\SmartcardFilesystem.py", line 713, in _selectFile
  File "virtualsmartcard\SmartcardFilesystem.py", line 522, in select
virtualsmartcard.SWutils.SwError: 27266
18.02.2024 06:35:43  [INFO] Checking error (Wrong parameters P1-P2): File or application not found
18.02.2024 06:35:43  [INFO] Response APDU (2 bytes):
  0000:  6A 82                                             ..

18.02.2024 06:35:43  [INFO] Command APDU (14 bytes):
  0000:  00 A4 04 00 09 A0 00 00 03 97 42 54 46 59         ..............
18.02.2024 06:35:43  [DEBUG] C_APDU(CLA=0x00, INS=0xA4, P1=0x04, P2=0x00, Lc=0x09):
  0000:  A0 00 00 03 97 42 54 46 59                        .........
18.02.2024 06:35:43  [DEBUG] Traceback (most recent call last):
  File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
  File "virtualsmartcard\SmartcardFilesystem.py", line 735, in selectFile
  File "virtualsmartcard\SmartcardFilesystem.py", line 713, in _selectFile
  File "virtualsmartcard\SmartcardFilesystem.py", line 522, in select
virtualsmartcard.SWutils.SwError: 27266
18.02.2024 06:35:43  [INFO] Checking error (Wrong parameters P1-P2): File or application not found
18.02.2024 06:35:43  [INFO] Response APDU (2 bytes):
  0000:  6A 82                                             ..

18.02.2024 06:35:43  [INFO] Command APDU (16 bytes):
  0000:  00 A4 04 00 0B A0 00 00 03 97 43 49 44 5F 01 00   ................
18.02.2024 06:35:43  [DEBUG] C_APDU(CLA=0x00, INS=0xA4, P1=0x04, P2=0x00, Lc=0x0B):
  0000:  A0 00 00 03 97 43 49 44 5F 01 00                  ...........
18.02.2024 06:35:43  [DEBUG] Traceback (most recent call last):
  File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
  File "virtualsmartcard\SmartcardFilesystem.py", line 735, in selectFile
  File "virtualsmartcard\SmartcardFilesystem.py", line 713, in _selectFile
  File "virtualsmartcard\SmartcardFilesystem.py", line 522, in select
virtualsmartcard.SWutils.SwError: 27266
18.02.2024 06:35:43  [INFO] Checking error (Wrong parameters P1-P2): File or application not found
18.02.2024 06:35:43  [INFO] Response APDU (2 bytes):
  0000:  6A 82                                             ..

18.02.2024 06:35:44  [INFO] Command APDU (5 bytes):
  0000:  00 CA 7F 68 00                                    .....
18.02.2024 06:35:44  [DEBUG] C_APDU(CLA=0x00, INS=0xCA, P1=0x7F, P2=0x68, Le=0x00)
18.02.2024 06:35:44  [DEBUG] Traceback (most recent call last):
  File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
  File "virtualsmartcard\SmartcardFilesystem.py", line 1247, in getDataPlain
  File "virtualsmartcard\SmartcardFilesystem.py", line 321, in getdata
virtualsmartcard.SWutils.SwError: 27265
18.02.2024 06:35:44  [INFO] Checking error (Wrong parameters P1-P2): Function not supported
18.02.2024 06:35:44  [INFO] Response APDU (2 bytes):
  0000:  6A 81                                             ..

18.02.2024 06:35:44  [INFO] Command APDU (14 bytes):
  0000:  00 A4 04 00 09 A0 00 00 03 08 00 00 10 00         ..............
18.02.2024 06:35:44  [DEBUG] C_APDU(CLA=0x00, INS=0xA4, P1=0x04, P2=0x00, Lc=0x09):
  0000:  A0 00 00 03 08 00 00 10 00                        .........
18.02.2024 06:35:44  [DEBUG] Traceback (most recent call last):
  File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
  File "virtualsmartcard\SmartcardFilesystem.py", line 735, in selectFile
  File "virtualsmartcard\SmartcardFilesystem.py", line 713, in _selectFile
  File "virtualsmartcard\SmartcardFilesystem.py", line 522, in select
virtualsmartcard.SWutils.SwError: 27266
18.02.2024 06:35:44  [INFO] Checking error (Wrong parameters P1-P2): File or application not found
18.02.2024 06:35:44  [INFO] Response APDU (2 bytes):
  0000:  6A 82                                             ..

18.02.2024 06:35:44  [INFO] Command APDU (14 bytes):
  0000:  00 A4 04 00 09 A0 00 00 03 97 42 54 46 59         ..............
18.02.2024 06:35:44  [DEBUG] C_APDU(CLA=0x00, INS=0xA4, P1=0x04, P2=0x00, Lc=0x09):
  0000:  A0 00 00 03 97 42 54 46 59                        .........
18.02.2024 06:35:44  [DEBUG] Traceback (most recent call last):
  File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
  File "virtualsmartcard\SmartcardFilesystem.py", line 735, in selectFile
  File "virtualsmartcard\SmartcardFilesystem.py", line 713, in _selectFile
  File "virtualsmartcard\SmartcardFilesystem.py", line 522, in select
virtualsmartcard.SWutils.SwError: 27266
18.02.2024 06:35:44  [INFO] Checking error (Wrong parameters P1-P2): File or application not found
18.02.2024 06:35:44  [INFO] Response APDU (2 bytes):
  0000:  6A 82                                             ..

18.02.2024 06:35:44  [INFO] Command APDU (16 bytes):
  0000:  00 A4 04 00 0B A0 00 00 03 97 43 49 44 5F 01 00   ................
18.02.2024 06:35:44  [DEBUG] C_APDU(CLA=0x00, INS=0xA4, P1=0x04, P2=0x00, Lc=0x0B):
  0000:  A0 00 00 03 97 43 49 44 5F 01 00                  ...........
18.02.2024 06:35:44  [DEBUG] Traceback (most recent call last):
  File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
  File "virtualsmartcard\SmartcardFilesystem.py", line 735, in selectFile
  File "virtualsmartcard\SmartcardFilesystem.py", line 713, in _selectFile
  File "virtualsmartcard\SmartcardFilesystem.py", line 522, in select
virtualsmartcard.SWutils.SwError: 27266
18.02.2024 06:35:44  [INFO] Checking error (Wrong parameters P1-P2): File or application not found
18.02.2024 06:35:44  [INFO] Response APDU (2 bytes):
  0000:  6A 82                                             ..

18.02.2024 06:35:44  [INFO] Command APDU (5 bytes):
  0000:  00 CA 7F 68 00                                    .....
18.02.2024 06:35:44  [DEBUG] C_APDU(CLA=0x00, INS=0xCA, P1=0x7F, P2=0x68, Le=0x00)
18.02.2024 06:35:44  [DEBUG] Traceback (most recent call last):
  File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
  File "virtualsmartcard\SmartcardFilesystem.py", line 1247, in getDataPlain
  File "virtualsmartcard\SmartcardFilesystem.py", line 321, in getdata
virtualsmartcard.SWutils.SwError: 27265
18.02.2024 06:35:44  [INFO] Checking error (Wrong parameters P1-P2): Function not supported
18.02.2024 06:35:44  [INFO] Response APDU (2 bytes):
  0000:  6A 81                                             ..

18.02.2024 06:35:44  [INFO] Command APDU (14 bytes):
  0000:  00 A4 04 00 09 A0 00 00 03 08 00 00 10 00         ..............
18.02.2024 06:35:44  [DEBUG] C_APDU(CLA=0x00, INS=0xA4, P1=0x04, P2=0x00, Lc=0x09):
  0000:  A0 00 00 03 08 00 00 10 00                        .........
18.02.2024 06:35:44  [DEBUG] Traceback (most recent call last):
  File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
  File "virtualsmartcard\SmartcardFilesystem.py", line 735, in selectFile
  File "virtualsmartcard\SmartcardFilesystem.py", line 713, in _selectFile
  File "virtualsmartcard\SmartcardFilesystem.py", line 522, in select
virtualsmartcard.SWutils.SwError: 27266
18.02.2024 06:35:44  [INFO] Checking error (Wrong parameters P1-P2): File or application not found
18.02.2024 06:35:44  [INFO] Response APDU (2 bytes):
  0000:  6A 82                                             ..

18.02.2024 06:35:44  [INFO] Command APDU (14 bytes):
  0000:  00 A4 04 00 09 A0 00 00 03 97 42 54 46 59         ..............
18.02.2024 06:35:44  [DEBUG] C_APDU(CLA=0x00, INS=0xA4, P1=0x04, P2=0x00, Lc=0x09):
  0000:  A0 00 00 03 97 42 54 46 59                        .........
18.02.2024 06:35:44  [DEBUG] Traceback (most recent call last):
  File "virtualsmartcard\VirtualSmartcard.py", line 354, in execute
  File "virtualsmartcard\SmartcardFilesystem.py", line 735, in selectFile
  File "virtualsmartcard\SmartcardFilesystem.py", line 713, in _selectFile
  File "virtualsmartcard\SmartcardFilesystem.py", line 522, in select
virtualsmartcard.SWutils.SwError: 27266
18.02.2024 06:35:44  [INFO] Checking error (Wrong parameters P1-P2): File or application not found
18.02.2024 06:35:44  [INFO] Response APDU (2 bytes):
  0000:  6A 82                                             ..

when testing with dummy card in smart card reader app it gets a timeout after a while and testing the port from terminal

> Test-NetConnection -ComputerName localhost -Port 35963
WARNING: TCP connect to (::1 : 35963) failed
WARNING: TCP connect to (127.0.0.1 : 35963) failed


ComputerName           : localhost
RemoteAddress          : ::1
RemotePort             : 35963
InterfaceAlias         : Loopback Pseudo-Interface 1
SourceAddress          : ::1
PingSucceeded          : True
PingReplyDetails (RTT) : 0 ms
TcpTestSucceeded       : False

i also looked for that port number in netstat

>netstat -ano | find "35963"
  TCP    0.0.0.0:35963          0.0.0.0:0              LISTENING       3496
  TCP    127.0.0.1:35963        127.0.0.1:62047        ESTABLISHED     3496
  TCP    127.0.0.1:35963        127.0.0.1:62074        CLOSE_WAIT      3496
  TCP    127.0.0.1:62047        127.0.0.1:35963        ESTABLISHED     28160
  TCP    127.0.0.1:62074        127.0.0.1:35963        FIN_WAIT_2      25736

@frankmorgner
Copy link
Owner

vpcd can only take one connection at a time on port 35963. You need to stop vicc, which you started for testing porposes on your PC so that the smart card reader app can take its place. If the smart card reader app can still not connect to vpcd, then you need to make sure that phone and pc are on the same network and that they can communicate to each other.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants