Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

udev string ID_SERIAL_SHORT might not be available #69

Closed
NiklasNeugebauer opened this issue Jan 11, 2024 · 2 comments · Fixed by #74
Closed

udev string ID_SERIAL_SHORT might not be available #69

NiklasNeugebauer opened this issue Jan 11, 2024 · 2 comments · Fixed by #74
Assignees

Comments

@NiklasNeugebauer
Copy link
Contributor

The new USB Camera Module uses udev strings to assign a unique id to each camera.
For that it currently combines ID_VENDOR_ID, ID_MODEL_ID and ID_SERIAL_SHORT.

We have seen one instance of a camera not providing ID_SERIAL_SHORT.

Note: ID_SERIAL does not come directly from the USB device descriptor, but is constructed from multiple strings like we do. It might be a better fit if it is always available.

@NiklasNeugebauer
Copy link
Contributor Author

NiklasNeugebauer commented Jan 11, 2024

An indirect issue here is that this camera will not have a unique identifier, which should be guaranteed.
Its ID_SERIAL is HD_USB_Camera_HD_USB_Camera.

$ udevadm info -q all -n dump:

P: /devices/platform/3610000.xhci/usb1/1-2/1-2.1/1-2.1:1.0/video4linux/video1
N: video1
L: 0
S: v4l/by-path/platform-3610000.xhci-usb-0:2.1:1.0-video-index1
S: v4l/by-id/usb-HD_USB_Camera_HD_USB_Camera-video-index1
E: DEVPATH=/devices/platform/3610000.xhci/usb1/1-2/1-2.1/1-2.1:1.0/video4linux/video1
E: DEVNAME=/dev/video1
E: MAJOR=81
E: MINOR=1
E: SUBSYSTEM=video4linux
E: USEC_INITIALIZED=12827015
E: ID_V4L_VERSION=2
E: ID_V4L_PRODUCT=HD USB Camera: HD USB Camera
E: ID_V4L_CAPABILITIES=:
E: ID_VENDOR=HD_USB_Camera
E: ID_VENDOR_ENC=HD\x20USB\x20Camera
E: ID_VENDOR_ID=32e4
E: ID_MODEL=HD_USB_Camera
E: ID_MODEL_ENC=HD\x20USB\x20Camera
E: ID_MODEL_ID=9230
E: ID_REVISION=0100
E: ID_SERIAL=HD_USB_Camera_HD_USB_Camera
E: ID_TYPE=video
E: ID_BUS=usb
E: ID_USB_INTERFACES=:0e0100:0e0200:
E: ID_USB_INTERFACE_NUM=00
E: ID_USB_DRIVER=uvcvideo
E: ID_PATH=platform-3610000.xhci-usb-0:2.1:1.0
E: ID_PATH_TAG=platform-3610000_xhci-usb-0_2_1_1_0
E: ID_FOR_SEAT=video4linux-platform-3610000_xhci-usb-0_2_1_1_0
E: COLORD_DEVICE=1
E: COLORD_KIND=camera
E: DEVLINKS=/dev/v4l/by-path/platform-3610000.xhci-usb-0:2.1:1.0-video-index1 /dev/v4l/by-id/usb-HD_USB_Camera_HD_USB_Camera-video-index1
E: TAGS=:uaccess:seat:

@rodja
Copy link
Member

rodja commented Jan 12, 2024

Maybe we could fallback to DEVNAME or DEVPATH if ID_SERIAL_SHORT is not available. That would still allow us to identify different cameras and only lose the ability to freely chose the usb port.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants