-
Notifications
You must be signed in to change notification settings - Fork 197
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
[Help Wanted] Relaying PC/SC to a PN532 NFC controller? #140
Comments
gpg uses PC/SC to access smart cards. You should try https://github.com/nfc-tools/ifdnfc, which makes the libnfc device (PN532) available via PC/SC. |
@frankmorgner Yup, I just installed ifdnfc and finally GPG can detect my YubiKey now! Thanks for your help! |
Does it also work with pn532 connected via SPI port ? If yes, how to configure ? |
I did configure pn532_uart. Now main issue is that pcsc_scan detects the card but the ATR response is not complete. ATR response is partial 5 bytes for a Mifare 4k+ card |
Mifare 4k is not a smart card. It is more like a memory card with some broken home grown crypto. You don't want to use that in gpg or any other security related context |
I am trying to read sample cards. I also have ACR122U reader and it is giving full ATR but the PN532 based on IFDNFC gives only first 5 bytes and then stops. It is not getting read by smartcardio library java. But the ACR122U is working fine. |
What device are you using? does it also have contacts? What is its ATR using? On Ubuntu, when installing I use this to turn off libnfs:
Contactless (NFC) devices do not return an ATR. PCSC, CCID or IFD will makeup an ATR so calling middleware will have something to work with. The first few bytes have iso 7816 voltage and timing info, which are not not needed for NFC. PN532 may be doing something similar but presenting it as Mifair device. Using a dual contact smartcard with ACR122U returns ATR: Using a contact reader with same card returns ATR:
|
I am using PN532 with USB to UART converter. It's NFC reader. Any tips ? I have installed libnfc and ifdnfc as pcsc handler for libnfc. |
I would use the ACR122U and don't use pn533 at all. You still did not say what what card/token you are using. Is it really smart card? See what: https://smartcard-atr.apdu.fr |
I am using Mifare 4k+ cards with a pn532 reader connected through usb to UART converter |
A Mifare card is not a smart card. OpenSC only supports smartcards. I can not help. Sorry. |
I've got an ITEAD PN532 NFC controller, which is compatible with
libnfc
, to communicate with my YubiKey. But since PC/SC doesn't recognise the controller by default, I'm wondering whether it's possible to usepcsc-relay
to relay the APDUs so that GnuPG can detect YubiKey in the end.I've installed both
virtualsmartcard
andpcsc-relay
but couldn't get it to work. Tbh I'm still a bit confused about the concepts here so it would be greatly appreciated if you guys can explain it to me.Here are the commands I ran and the outputs. I actually wonder whether I need to run
vicc
as well?The text was updated successfully, but these errors were encountered: