create
Creates a USB CCID NfcTagReaderUsb targeting an attached USB reader matching vendorId and productId.
The USB device is opened lazily when NfcTagReaderUsb.scan is called, so the returned NfcTagReaderUsb automatically survives USB resets and hotplug re-enumeration between scans. Call NfcTagReaderUsb.close when the reader is no longer needed.
Return
a closeable NfcTagReaderUsb ready to scan tags via NfcTagReaderUsb.scan.
Parameters
the 16-bit USB vendor ID (0x0000..0xFFFF), for example 0x072F (ACS).
the 16-bit USB product ID (0x0000..0xFFFF), for example 0x223B (ACR1252U).
the USB bInterfaceNumber of the CCID interface to claim, or null (the default) to automatically select the first contactless NFC CCID interface (skipping SAM/SIM and mechanical contact card slots).
how long to keep the USB interface claimed after a completed scan and tag removal before releasing it (defaults to 5.seconds).
Throws
if vendorId, productId, interfaceIndex, or disconnectDelay is out of range.
Creates a USB CCID NfcTagReaderUsb targeting a specific Linux USB device node, udev symlink, or physical sysfs USB port path.
Supported devicePath formats (resolved freshly each time NfcTagReaderUsb.scan opens the underlying USB transport, so udev symlinks and sysfs port paths survive USB hotplugs and re-enumeration):
A
usbfsdevice node path, such as"/dev/bus/usb/001/004".A
udevsymlink pointing to a/dev/bus/usb/BBB/DDDnode orsysfsUSB device directory, such as"/dev/nfc-reader-front"(resolved viaPath.toRealPath()).A Linux
sysfsUSB port directory path or bare port name, such as"/sys/bus/usb/devices/1-1.2"or"1-1.2", which pins the reader to a physical USB socket even when multiple attached readers share identicalVID:PIDvalues and lack serial numbers.
Call NfcTagReaderUsb.close when the reader is no longer needed.
Return
a closeable NfcTagReaderUsb ready to scan tags via NfcTagReaderUsb.scan.
Parameters
the Linux usbfs device node path, udev symlink path, or sysfs USB port path/name.
the USB bInterfaceNumber of the CCID interface to claim, or null (the default) to automatically select the first contactless NFC CCID interface (skipping SAM/SIM and mechanical contact card slots).
how long to keep the USB interface claimed after a completed scan and tag removal before releasing it (defaults to 5.seconds).
Throws
if devicePath is blank or interfaceIndex / disconnectDelay is out of range.