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

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -