Second imx477 camera doesn't work

I have made followed changes in file tegra210-p3448-0002-p3449-0000-b00.dts:

#include "tegra210-porg-p3448-common.dtsi"
#include "porg-platforms/tegra210-porg-camera-rbpcv3-dual-imx477.dtsi"
//#include "porg-platforms/tegra210-porg-camera-rbpcv2-dual-imx219.dtsi"
#include "porg-platforms/tegra210-porg-pinmux-p3448-0002-b00.dtsi"
#include "porg-platforms/tegra210-porg-gpio-p3448-0002-b00.dtsi"
#include "porg-platforms/tegra210-porg-p3448-emc-a00.dtsi"

and then one camera is working. with second cam is there problem too, when the binary from arducam will apply.

Does the video node created? (/dev/video1)

hello @ShaneCCC,
yes it is there together with video0

Did you check with v4l2-ctl if able capture successfully.

I checked it with gst-launch-1.0 and python script from the Github-Repository JetsonHacksNano.

Please run the v4l2-ctl to make sure the HW and driver without problem.

could you give me a command with this I should do that? I have had problems with this one:

v4l2-ctl --device /dev/video1 --set-fmt-video=width=1920,height=1080,pixelformat=MJPEG --stream-mmap --stream-to=frame.jpg --stream-count=1

Try below

v4l2-ctl --device /dev/video1 --set-fmt-video=width=1920,height=1080 --stream-mmap -c bypass_mode=0

after installing the packet with sudo apt install v4l-utils. I have the output:

wlad@ubuntu:/media/wlad/Copy/CAM$ v4l2-ctl --device /dev/video0 --set-fmt-video=width=1920,height=1080 --stream-mmap -c bypass_mode=0
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.09 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.03 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.02 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<^C
wlad@ubuntu:/media/wlad/Copy/CAM$ make run
v4l2-ctl --device /dev/video1 --set-fmt-video=width=1920,height=1080 --stream-mmap -c bypass_mode=0

last command remain ca. 5 minutes in this state before cancelled.

python output from JetsonNacksNano:

wlad@ubuntu:/media/wlad/Copy/OpenCV/CSI-Camera$ python dual_camera.py 
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3840 x 2160 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 22.250000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 22.250000; Exposure Range min 13000, max 683709000;

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 1 
   Output Stream W = 1920 H = 1080 
   seconds to Run    = 0 
   Frame Rate = 59.999999 
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
[ WARN:0] global /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap_gstreamer.cpp (933) open OpenCV | GStreamer warning: Cannot query video position: status=0, value=-1, duration=-1
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3840 x 2160 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 22.250000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 22.250000; Exposure Range min 13000, max 683709000;

GST_ARGUS: Running with following settings:
   Camera index = 1 
   Camera mode  = 1 
   Output Stream W = 1920 H = 1080 
   seconds to Run    = 0 
   Frame Rate = 59.999999 
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
nvbuf_utils: Can not get HW buffer from FD... Exiting...
CONSUMER: ERROR OCCURRED
[ WARN:0] global /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap_gstreamer.cpp (1757) handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module nvarguscamerasrc1 reported: CANCELLED
GST_ARGUS: Cleaning up
[ WARN:0] global /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap_gstreamer.cpp (886) open OpenCV | GStreamer warning: unable to start pipeline
[ WARN:0] global /home/nvidia/host/build_opencv/nv_opencv/modules/videoio/src/cap_gstreamer.cpp (480) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
Error: Unable to open both cameras
GST_ARGUS: Cleaning up
CONSUMER: Done Success
GST_ARGUS: Done Success

Looks like the script start two cameras simultaneity.
Do you try below command to launch second camera?

gst-launch-1.0 nvarguscamerasrc sensor-id=1 ! "video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080,format=(string)NV12, framerate=(fraction)30/1" ! nvvidconv ! xvimagesink sync=false

yes it is tried with non working camera result. What could it be?

Do you mean above command working for non working camera??

only for one camera, it is working.

OK, didn’t switch the camera port to check if any HW problem cause the issue?

yes I have 4 ports all are checked for function. These are the connections between Jetson nano module and camera:



The AB-Channel is working. Should maybe A and B be different cameras on board?

Hello Shane,
how can I change the number of csi_lines?
I have set already in tegra210-camera-rbpcv3-dual-imx477.dtsi and have had no success with that:

num_lanes = "4";
port-index = <0>;
bus-width = <4>;
port-index = <2>;
bus-width = <4>;
num_csi_lanes = <8>;

It could be include the tegra210-camera-rbpcv3-imx477.dtsi that override it.
Check and remove it to try.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.