我正在尝试在 Windows 7 64 位上将 RFIDIOt 与 libnfc-1.7.0-rc7 一起使用。我从源代码编译了 dll,它与 nfc-poll.exe 等程序完美配合。
但现在我想用 libNFC 在 python 2.7 上编写一个程序。我想使用 RFIDIOt 与我的 PN532_uart 阅读器通信,但我无法在 Windows 上运行示例程序。
当我尝试运行时:python cardselect.py -R RFIDIOt.rfidiot.READER_LIBNFC
我得到一个错误:
Traceback (most recent call last):
File "cardselect.py", line 25, in <module>
import rfidiot
File "C:\Users\User\Desktop\Python\RFIDIOt-master\rfidiot\__init__.py", line 1
94, in <module>
card= RFIDIOt.rfidiot(readernum,readertype,line,speed,timeout,rfidiotglobals
.Debug,noinit,nfcreader)
File "C:\Users\User\Desktop\Python\RFIDIOt-master\rfidiot\RFIDIOt.py", line 16
3, in __init__
self.nfc = pynfc.NFC(self.NFCReader)
File "C:\Users\User\Desktop\Python\RFIDIOt-master\rfidiot\pynfc.py", line 283,
in __init__
self.configure(nfcreader)
File "C:\Users\User\Desktop\Python\RFIDIOt-master\rfidiot\pynfc.py", line 352,
in configure
self.LIBNFC_READER= self.libnfc.nfc_device_get_name(self.device)
ValueError: invalid string pointer 0x00000010
我不知道如何解决它...请任何人帮助我!这个问题只在 Windows 上,在 Linux 上都很好用,但我想在 Windows 上使用我的程序。
如何修复此错误?
我在 COM1 上使用 python 2.7、libNFC-1.7.0-rc7、Windows 7 x64 和 pn532_uart 阅读器。