smart_card_usb

Probes all USB smart card reader devices.

Function Arguments

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 smart card 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