1
votes

I dont know why appear this exception in the execution

javax.smartcardio.CardException: list() failed
        at sun.security.smartcardio.PCSCTerminals.list(PCSCTerminals.java:126)
        at javax.smartcardio.CardTerminals.list(CardTerminals.java:72)
        at prueba.ClaseNFC.doCardReaderCommunication(ClaseNFC.java:41)
        at prueba.Prueba.main(Prueba.java:20)
Caused by: sun.security.smartcardio.PCSCException: SCARD_E_NO_READERS_AVAILABLE
        at sun.security.smartcardio.PCSC.SCardListReaders(Native Method)
        at sun.security.smartcardio.PCSCTerminals.list(PCSCTerminals.java:80)
        ... 3 more

The code is:

        TerminalFactory terminalFactory;
        terminalFactory = TerminalFactory.getDefault();
        System.out.println(terminalFactory);


        List<CardTerminal> terminals = terminalFactory.terminals().list();
        System.out.println("Terminals: " + terminals);
        if (terminals.isEmpty()) {

            throw new Exception("No card terminals available");

        }

Its strange because the RPi recognize the card reader with the command "lsusb" where appear "Bus 001 Device 007: ID 072f:2200 Advanced Card Systems, Ltd".

I have been reading days ago and people talk about install the PC/SC Package from the page of ACR122U - http://www.acs.com.hk/en/products/3/acr122u-usb-nfc-reader/ - and it will solve the problem. Indeed, that package is useful to the amd64 and i386 architecture and the RPi has a ARM architecture with Raspbian (Debian/Linux).

My question is, could you help me in the way to install that package in a ARM architecture? or someway to solve my problem?

Thank you

1
Did you actually solve this issue? I presume you cannot get this to work without a PCSC compatible driver... Unless you write a smartcardio compatible Terminal class yourself of course.Maarten Bodewes
Yes, I solved it, I am going to publish the solutionGeorgevik

1 Answers

1
votes

If you have same issue this is the solution.

  1. First time, you must install the ACR122 drivers. In this case, we hare using a Raspberry, so we must download the next driver: http://www.acs.com.hk/download-driver-unified/6258/ACS-Unified-Driver-Lnx-Mac-108-P.zip.

  2. Unzip the file inside a folder, go to "acsccid-1.X.X" and run "./configure"

  3. Open and edit raspi-blacklist.conf inside of "/etc/modprobe.d/" and add the next two lines at the end:

    blacklist nfc

    blacklist pn533

  4. Reboot raspberry