[英]Raspberry cant communicate with ACR122U
我不知道為什么在執行中出現此異常
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
代碼是:
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");
}
這很奇怪,因為RPi通過命令“ lsusb”識別讀卡器,該命令顯示為“ Bus 001 Device 007:ID 072f:2200 Advanced Card Systems,Ltd”。
我一直在幾天前閱讀和人們談論安裝從ACR122U頁面的PC / SC包- http://www.acs.com.hk/en/products/3/acr122u-usb-nfc-reader/ -和它將解決問題。 實際上,該軟件包對amd64和i386架構很有用,而RPi具有帶有Raspbian(Debian / Linux)的ARM架構。
我的問題是,您能以我的方式在ARM體系結構中安裝該軟件包嗎? 或以某種方式解決我的問題?
謝謝
如果您有相同的問題,這是解決方案。
第一次,您必須安裝ACR122驅動程序。 在這種情況下,我們使用的是Raspberry,因此我們必須下載下一個驅動程序: http : //www.acs.com.hk/download-driver-unified/6258/ACS-Unified-Driver-Lnx-Mac-108- P.zip 。
將文件解壓縮到文件夾中,轉到“ acsccid-1.XX”並運行“ ./configure”
在“ /etc/modprobe.d/”中打開並編輯raspi-blacklist.conf,並在末尾添加以下兩行:
黑名單nfc
黑名單pn533
重新啟動樹莓
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.