Find /dev entry with VID/PID of USB device

PinkPR

I'd like to make a program that will detect which /dev/sd* entry is linked to a known USB VID/PID pair.

Do you know how I can get the VID/PID of a USB stick that would appear as /dev/sd*?

ralf htp

you can use udevadm for this

in the output of udevadm info -q property -n /dev/sd* the VID is in the ID_VENDOR_ID field and the PID is in the ID_MODEL_ID field

you can extract this using grep / sed...

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

USB-to-Serial device, why no /dev entry?

From Dev

Mount location by VidPid of a device

From Dev

Kernel recognizes USB device but then I can't find it in /sys or /dev

From Dev

Why does my USB device not appear on /dev?

From Dev

Why does this device_create() call not create a /dev/ entry?

From Dev

Get target device by /dev/dm-X entry

From Dev

Failing to create /dev entry from sysfs, No such device or address

From Dev

Cannot find USB external HDD /dev/sda

From Dev

How do I access a USB serial port without an entry in /dev?

From Dev

Find which TTY device connected over USB

From Dev

Find which TTY device connected over USB

From Dev

Find out if a specific device is an USB mass storage

From Dev

Find out which modules are associated with a usb device?

From Dev

Need to find and open a USB serial device on linux

From Dev

How to modify an USB stick in order to have a device node as /dev/sda1 instead of /dev/sda?

From Dev

Failed to open /dev/bus/usb/001/007: Permission denied for usb device

From Dev

Find out what device /dev/root represents in Linux?

From Dev

How to Find the Device Associated with a Mounted USB Drive in Linux

From Dev

How to find last-added USB device in Windows?

From Dev

How to find out UUID of a non-block USB device?

From Dev

Install zeroshell from usb error "Waiting for root device /dev/sr0"

From Dev

How to get the USB VID, PID and serial number of a device in Ubuntu using C++ from /dev/xxx path

From Dev

Find USB device's directory /sys/bus/usb/devices/ using idVendor/idProduct

From Dev

Find USB device's directory /sys/bus/usb/devices/ using idVendor/idProduct

From Dev

How does Linux find/configure something like 'wlan0' when it is not a device that appears in /dev?

From Dev

Is it possible to make the device filesystem name , /dev/sd?1 , stay constant every time we reconnect the SanDisk USB Cruzer drive?

From Dev

Communicating with a USB device with controlTransfer

From Dev

No boot sector on USB device

From Dev

Virtual USB device for Windows?

Related Related

  1. 1

    USB-to-Serial device, why no /dev entry?

  2. 2

    Mount location by VidPid of a device

  3. 3

    Kernel recognizes USB device but then I can't find it in /sys or /dev

  4. 4

    Why does my USB device not appear on /dev?

  5. 5

    Why does this device_create() call not create a /dev/ entry?

  6. 6

    Get target device by /dev/dm-X entry

  7. 7

    Failing to create /dev entry from sysfs, No such device or address

  8. 8

    Cannot find USB external HDD /dev/sda

  9. 9

    How do I access a USB serial port without an entry in /dev?

  10. 10

    Find which TTY device connected over USB

  11. 11

    Find which TTY device connected over USB

  12. 12

    Find out if a specific device is an USB mass storage

  13. 13

    Find out which modules are associated with a usb device?

  14. 14

    Need to find and open a USB serial device on linux

  15. 15

    How to modify an USB stick in order to have a device node as /dev/sda1 instead of /dev/sda?

  16. 16

    Failed to open /dev/bus/usb/001/007: Permission denied for usb device

  17. 17

    Find out what device /dev/root represents in Linux?

  18. 18

    How to Find the Device Associated with a Mounted USB Drive in Linux

  19. 19

    How to find last-added USB device in Windows?

  20. 20

    How to find out UUID of a non-block USB device?

  21. 21

    Install zeroshell from usb error "Waiting for root device /dev/sr0"

  22. 22

    How to get the USB VID, PID and serial number of a device in Ubuntu using C++ from /dev/xxx path

  23. 23

    Find USB device's directory /sys/bus/usb/devices/ using idVendor/idProduct

  24. 24

    Find USB device's directory /sys/bus/usb/devices/ using idVendor/idProduct

  25. 25

    How does Linux find/configure something like 'wlan0' when it is not a device that appears in /dev?

  26. 26

    Is it possible to make the device filesystem name , /dev/sd?1 , stay constant every time we reconnect the SanDisk USB Cruzer drive?

  27. 27

    Communicating with a USB device with controlTransfer

  28. 28

    No boot sector on USB device

  29. 29

    Virtual USB device for Windows?

HotTag

Archive