0

I'm using raspberry pi b+ and trying to implement a USB code using udev. When I give 'dmesg' command in linux, i get

[1297970.514980] usb 1-14.1: New USB device found, idVendor=0951, idProduct=1666, bcdDevice= 1.10 [1297970.514986] usb 1-14.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [1297970.514989] usb 1-14.1: Product: DataTraveler 3.0 [1297970.514993] usb 1-14.1: Manufacturer: Kingston

how to read "usb 1-14.1"? is there a way to get these numbers using 'udev_device_get_sysattr_value'?

  • `1-14.1` is part of device path. You can see device's properties with `udevadm info /sys/bus/usb/devices/1-14.1`. Probably you need `udev_device_get_property_value()` to access it with libudev. – dimich Oct 08 '22 at 09:30

0 Answers0