admin管理员组

文章数量:1399881

the nfcpy doc describe five way to select a usb nfc reader :

>>> import nfc
>>> clf = nfc.ContactlessFrontend()
>>> assert clf.open('usb:003:009') is True    # open device 9 on bus 3
>>> assert clf.open('usb:054c:02e1') is True  # open first PaSoRi 330
>>> assert clf.open('usb:003') is True        # open first Reader on bus 3
>>> assert clf.open('usb:054c') is True       # open first Sony Reader
>>> assert clf.open('usb') is True            # open first USB Reader
>>> clf.close()  # previous open calls implicitly closed the device

In my case I have four identical nfc readers plugged on four different usb ports. I can't use the idVendor:IdProduct as it is the same for all four devices. and I can't reliably use the bus:device as the device number will change each time I remove/connect the device. And I'm not sure if the device number will stay consistent after a reboot.

Is there a way I can identify a specific device when I have multiple identical devices ?

本文标签: