如何将RD202BL HF/UHF RFID图书馆员工工作站与Python通信

2024-06-08 23:16:18 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试使用以下代码使用ctype访问.dll驱动程序(rfidlib_aip_iso15693.dll)与python进行通信

hllDll = ctypes.LibraryLoader("rfidlib_aip_iso15693.dll")

connecstr="M201;COM;COM6;38400;8E1;255;"

tes = hllDll.RDR_Open(ctypes.c_string(connecstr),"ANRD201")

但是当代码运行时,我发现了一个错误

C:\Python27\tex\tes>python py.py Traceback (most recent call last):

File "py.py", line 21, in

tes = hllDll.RDR_Open(ctypes.c_string(connecstr))   File "C:\Python27\lib\ctypes\_init.py", line 436, in __getattr_

dll = self._dlltype(name) TypeError: 'str' object is not callable

非常感谢你的帮助

问候,, 穆尔坎


Tags: pystringlineopenctypestesfiledll