LudovicRousseau / pcsc-tools

Some tools to be used with smart cards and PC/SC
https://pcsc-tools.apdu.fr/
GNU General Public License v2.0
185 stars 63 forks source link

try setup in raspberry pi #78

Closed khanfar closed 1 year ago

khanfar commented 1 year ago

hi , i try setup in my pi and i got this error : pi@raspberrypi:~ $ git clone https://salsa.debian.org/rousseau/pcsc-tools.git cd pcsc-tools ./bootstrap ./configure make Cloning into 'pcsc-tools'... remote: Enumerating objects: 5389, done. remote: Counting objects: 100% (111/111), done. remote: Compressing objects: 100% (62/62), done. remote: Total 5389 (delta 60), reused 87 (delta 46), pack-reused 5278 Receiving objects: 100% (5389/5389), 1.19 MiB | 928.00 KiB/s, done. Resolving deltas: 100% (3747/3747), done.

khanfar commented 1 year ago

./configure: line 4627: syntax error near unexpected token $datarootdir,' ./configure: line 4627: AX_RECURSIVE_EVAL($datarootdir, datarootdir_exp)' make: *** No targets specified and no makefile found. Stop.

khanfar commented 1 year ago

i try again after install some dependancies in my raspberry . now its look ok ? + test -f Makefile

pcsc-tools has been configured with following options:

pcsc_dir: /usr/local/share/pcsc ATR parser: no

checking that generated files are newer than configure... done configure: creating ./config.status config.status: creating Makefile config.status: creating ATR_analysis config.status: creating ATR_analysis.1p config.status: creating po/Makefile config.status: creating gscriptor.desktop config.status: creating config.h config.status: executing depfiles commands make all-recursive make[1]: Entering directory '/home/pi/pcsc-tools/pcsc-tools' Making all in po make[2]: Entering directory '/home/pi/pcsc-tools/pcsc-tools/po' msgfmt --check --statistics --verbose -o ru.gmo ru.po ru.po: 74 translated messages, 1 untranslated message. msgfmt --check --statistics --verbose -o fr.gmo fr.po fr.po: 61 translated messages, 14 untranslated messages. make[2]: Leaving directory '/home/pi/pcsc-tools/pcsc-tools/po' make[2]: Entering directory '/home/pi/pcsc-tools/pcsc-tools' CC pcsc_scan-pcsc_scan.o CCLD pcsc_scan make[2]: Leaving directory '/home/pi/pcsc-tools/pcsc-tools' make[1]: Leaving directory '/home/pi/pcsc-tools/pcsc-tools'

khanfar commented 1 year ago

i try this : /pcsc_scan PC/SC device scanner V 1.6.2 (c) 2001-2022, Ludovic Rousseau ludovic.rousseau@free.fr Using reader plug'n play mechanism Scanning present readers... 0: ACS ACR 38U-CCID 00 00

Tue Jun 13 16:14:26 2023 Reader 0: ACS ACR 38U-CCID 00 00 Event number: 0 Card state: Card inserted, ATR: 3B 04 A2 13 10 91

khanfar commented 1 year ago

how to read data in card ???

khanfar commented 1 year ago

i try this and get this error : ./scriptor Can't locate Chipcard/PCSC.pm in @INC (you may need to install the Chipcard::PCSC module) (@INC contains: /etc/perl /usr/local/lib/arm-linux-gnueabihf/perl/5.32.1 /usr/local/share/perl/5.32.1 /usr/lib/arm-linux-gnueabihf/perl5/5.32 /usr/share/perl5 /usr/lib/arm-linux-gnueabihf/perl-base /usr/lib/arm-linux-gnueabihf/perl/5.32 /usr/share/perl/5.32 /usr/local/lib/site_perl) at ./scriptor line 22. BEGIN failed--compilation aborted at ./scriptor line 22.

khanfar commented 1 year ago

now i try this and get this error : ./scriptor No reader given: using ACS ACR 38U-CCID 00 00 Can't allocate Chipcard::PCSC::Card object: Card is unresponsive.

khanfar commented 1 year ago

i try this : ./gscriptor Couldn't read from /home/pi/.gscriptor. Using default configuration but gui start . what should i do to read ?

khanfar commented 1 year ago

111

khanfar commented 1 year ago

222

khanfar commented 1 year ago

I check servicees : systemctl status pcscd ● pcscd.service - PC/SC Smart Card Daemon Loaded: loaded (/lib/systemd/system/pcscd.service; indirect; vendor preset> Active: active (running) since Tue 2023-06-13 16:48:47 IDT; 5min ago TriggeredBy: ● pcscd.socket Docs: man:pcscd(8) Main PID: 24328 (pcscd) Tasks: 5 (limit: 1595) CPU: 105ms CGroup: /system.slice/pcscd.service └─24328 /usr/sbin/pcscd --foreground --auto-exit

Jun 13 16:48:47 raspberrypi systemd[1]: Started PC/SC Smart Card Daemon. Jun 13 16:49:35 raspberrypi pcscd[24328]: 00000000 commands.c:2312:SetParameter> Jun 13 16:50:02 raspberrypi pcscd[24328]: 26166172 prothandler.c:86:PHSetProtoc> Jun 13 16:50:14 raspberrypi pcscd[24328]: 12030034 commands.c:2312:SetParameter> Jun 13 16:50:35 raspberrypi pcscd[24328]: 21435381 commands.c:2312:SetParameter> Jun 13 16:50:40 raspberrypi pcscd[24328]: 05289501 commands.c:2312:SetParameter> Jun 13 16:51:14 raspberrypi pcscd[24328]: 33401473 commands.c:2312:SetParameter> Jun 13 16:51:46 raspberrypi pcscd[24328]: 32123432 commands.c:2312:SetParameter> lines 1-19/19 (END)

khanfar commented 1 year ago

i stack on this : gscripter cant connect to reader named ACS ACR 38U-CCID 00 00

khanfar commented 1 year ago

i change the settings of reader in gscryptor gui to RAW . Now i see it connected . now how to read data fom card ?

LudovicRousseau commented 1 year ago

Your problem is NOT with pcsc-tools.

https://blog.apdu.fr/posts/2020/11/how-to-get-smart-card-support/