Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SCARD_ATTR_CHANNEL_ID: use port number instead of device address
The device address field is a number that is increasing after each USB device plug-in. It is NOT related to a physical USB port. It is the Device: number returned by lsusb(1): Bus 001 Device 021: ID 08e6:3437 Gemalto (was Gemplus) GemPC Twin SmartCard Reader The port number is related to a USB physical port and is stable if you unplug and replug a USB device on the same port. According to libusb_get_port_number() API documentation: Get the number of the port that a device is connected to. Unless the OS does something funky, or you are hot-plugging USB extension cards, the port number returned by this call is usually guaranteed to be uniquely tied to a physical port, meaning that different devices plugged on the same physical port should return the same port number. But outside of this, there is no guarantee that the port number returned by this call will remain the same, or even match the order in which ports have been numbered by the HUB/HCD manufacturer.
- Loading branch information