Different v4l ports on two upboardes
Hello!
I've bought 4 up boards and connected to each one two cameras.
I've tried to read their usb port using "ls -l /dev/v4l/by-path".
Two of the upboard give the same results - i.e the cameras that were connected on the same usb port got the same name, ao the other two it was upside down.
Eventually I have the same code running on the 4 of them and I need one static address for the 4 of them corresponding to the usb port they were connected to.
Does anybody what can it be?
Comments
-
It doesn't depends on the hardware, it is usually random.
I think you can do using udev rules: https://unix.stackexchange.com/questions/66901/how-to-bind-usb-device-under-a-static-name
alternatively you can use a variable for the path to which you assign the value of the output from "ls -l /dev/v4l/by-path"
-
Thank you very much.
I'll look into it -
Can you show us what your current /dev/v4l/by-path directory contains?
I have multiple cameras from the same manufacturer, and they seem to have the names mapped based on the USB port they are plugged in to. For example: /dev/v4l/by-path/pci-0000:00:14.0-usb-0:2:1.0-video-index1, and the 0:2: changes to 0:3:, 0:4:, etc for each camera.