nfc_reader ========== Probes internal USB NFC reader devices. Function Arguments ------------------ .. list-table:: :widths: 20 10 60 :header-rows: 1 :align: left * - Name - Type - Description * - dir_path - str, None - (optional; default: ``None``) The path used to search for device sysfs data. First all symlinks are resolved, to the the "real" path. Then iteratively search toward parent folder until the remaining path contains the relevent data fields. Description ----------- This function goes through ``/sys/bus/usb/devices/`` to read attributes of each usb device and find out all NFC readers there. Each result must contain these fields: - ``device_path``: Pathname of the sysfs directory. - ``idVendor`` - ``idProduct`` The result might also contain these optional fields if they are exported in the sysfs entry: - ``manufacturer`` - ``product`` - ``bcdDevice`` Because we cannot differentiate between keyboards and nfc readers, we make an explicit list of allowed (vid, pid).