Hi Jerry:
I check with Arducam team. Below is their response:
My questions to Arducam:
When I connect one IMX219 autofocus camera to Jetson Xavier NX, whether to camera port 0 or camera port 1, the supplied sensor_id must C:\Users\wong\AppData\Roaming\Foxmail7\Temp-7652-20210210103828\be 0. Namely, if connecting camera to Port 0, I can use “$ gst-launch-1.0 nvarguscamerasrc sensor_id=0 ! nvoverlaysink” to get it work (this is correct); but if connecting camera to Port 1, this command “$ gst-launch-1.0 nvarguscamerasrc sensor_id=1 ! nvoverlaysink” does not work, I have to use “$ gst-launch-1.0 nvarguscamerasrc sensor_id=0 ! nvoverlaysink” again to get the camera work.
When I connect two cameras to NX, this command “$ gst-launch-1.0 nvarguscamerasrc sensor_id=0 ! nvoverlaysink” makes camera of Port 1 working, while “$ gst-launch-1.0 nvarguscamerasrc sensor_id=1 ! nvoverlaysink” makes camera of Port 0 working.
Where one or two cameras are used, in order to adjust the camera focus, the I2C bus # must be 10 for the camera of Port 0 and 9 for the camera of Port 1.
Above situations make us confused, and also make the programming very complex.
Response from Arducam:
"When I connect an IMX219 autofocus camera to Jetson Xavier NX, whether it is camera port 0 or camera port 1, the sensor_id provided must be 0. That is, if the camera is connected to port 0, I can use “$ gst- launch-1.0 nvarguscamerasrc sensor_id = 0! Nvoverlaysink” to make it work (this is correct); but if the camera is connected to port 1, this command “$ gst-launch-1.0 nvarguscamerasrc sensor_id = 1! Nvoverlaysink” does not work, I have to use “$ gst-launch- 1.0 nvarguscamerasrc sensor_id = 0! nvoverlaysink” to make the camera work normally again.
"
This is a problem with the NVIDIA driver. Sensor_id=1 is only useful when both interfaces have cameras. Otherwise, no matter which interface is connected, sensor_id=0, but the I2C channel will not change.
” When I connect two cameras to NX, this command “$ gst-launch-1.0 nvarguscamerasrc sensor_id=0! Nvoverlaysink” makes camera of Port 1 working, while “$ gst-launch-1.0 nvarguscamerasrc sensor_id=1! Nvoverlaysink” makes camera of Port 0 working."
On NX, the label on the interface is the opposite of the actual one. This is also a problem with NVIDIA, because we did not modify the IMX219 driver and device tree.
When programming, you can follow the following principles:
-
The I2C bus of the interface is determined and it will not be changed.
-
You can use sensor_id=1 to identify the camera on the second camera interface only when two cameras exist at the same time.
Jerry, can you please help clarify if Arducam’s response is correct?