linux - Get unique serial number of USB device mounted to /dev folder -
i attach 2 webcam computer , listed in /dev folder: /dev/video0; /dev/video1.
can me write c code serial number of webcam input: /dev/video[0;1]
just ran same problem , took bit find solution. solution starts "just use lsusb" incorrect. can figure out devices serial, none of information provides determine /dev/video links to.
solution:
/bin/udevadm info --name=/dev/video1 | grep serial_short
output:
e: id_serial_short=256dec57
Comments
Post a Comment