frankmorgner / vsmartcard

umbrella project for emulation of smart card readers or smart cards
http://frankmorgner.github.io/vsmartcard/
724 stars 204 forks source link

Problem connecting to virtual reader #265

Closed Yellow-Flash-1 closed 6 months ago

Yellow-Flash-1 commented 9 months ago

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 commented 9 months ago

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

Yellow-Flash-1 commented 9 months ago

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 https://github.com/frankmorgner/vsmartcard/issues/243#issuecomment-1378005486

frankmorgner commented 9 months ago

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 commented 9 months ago

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 commented 9 months ago

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

Yellow-Flash-1 commented 9 months ago

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 commented 9 months ago

check the windows firewall as suggested

Yellow-Flash-1 commented 9 months ago

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 commented 9 months ago

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 commented 9 months ago

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

Yellow-Flash-1 commented 9 months ago

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 commented 9 months ago

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.