libnfc和NFC读卡器MF522-AN出现奇怪错误

时间:2015-11-21 16:39:16

标签: python nfc spi

我有一个NFC阅读器通过SPI连接到RaspberryPi,并配置了本教程:https://www.firefart.at/how-to-crack-mifare-classic-cards/

问题是当我运行命令nfc-list时出现此错误:

pi@MYPI ~ $ nfc-list
nfc-list uses libnfc 1.7.1
error   libnfc.driver.pn532_spi Unable to wait for SPI data. (RX)
error   libnfc.driver.pn532_spi Unable to wait for SPI data. (RX)
No NFC device found.

我找不到错误,但奇怪的是,同样的NFC阅读器正在使用这个Python库,通过SPI查找:https://github.com/mxgxw/MFRC522-python

您可以看到使用以下参数:

def __init__(self, dev='**/dev/spidev0.0**', spd=**1000000**):
    spi.openSPI(device=dev,speed=spd)
    GPIO.setmode(GPIO.BOARD)
    GPIO.setup(22, GPIO.OUT)
    GPIO.output(self.NRSTPD, 1)
    self.MFRC522_Init()

有什么想法吗?

更多信息:

这是我的/etc/nfc/libnfc.conf配置,它失败了:

allow_intrusive_scan=true
name = "Breakout Board"
LIBNFC_LOG_LEVEL=3
connstring = pn532_spi:/dev/spidev0.0:1000000

感谢。

0 个答案:

没有答案