Camera does not work as expected with Orin Nano

hello chengang1,

you may refer to developer guide for the Module Properties section.
it uses position property to report the sensor index to user-space,
for example, in the two-cam system, it’s sensor-id=0 for choosing position=rear camera node; and sensor-id=1 for choosing position=front camera node.

But I just have one CSI camera, so, whatever this CSI camera is connected to CAM0 or CAM1, its sensor-id is always 0.

In my practice, the camera sensor-id is 0 whatever it is connected to CAM0 and CAM1.
An error message is reported if I start the following pipeline when the CSI camera is connected to CAM0 or CAM1:

gst-launch-1.0 nvarguscamerasrc sensor-id=1 ! ‘video/x-raw(memory:NVMM),width=1920,height=1080,framerate=60/1,format=NV12’ ! queue ! nvvidconv ! queue ! xvimagesink

The error message:
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:754 Invalid camera device specified 1 specified, 0 max index

Hi Jerry, what log or information you want from me for analyzing this issue?

hello chengang1,

how you switch the camera from CAM0 to CAM1, please note that hot-plug doesn’t supported and it may damage the board.
please also share the kernel logs. $ dmesg > klogs.txt for reference.

anyways…
may I know what’s the real use-case to connect single camera to these two ports for testing?

You are right, when I switch the camera from CAM0 to CAM1, to from CAM1 to CAM0, I do with following steps:

  1. poweroff the Orin Nano;
  2. unplug the power supply;
  3. unplug the CSI camera interface from CAM0/CAM1;
  4. plug the CSI camera interface to CAM1/CAM0;
  5. plug the power supply to power on the Orin Nano.

klogs_cam0.txt (69.7 KB)
This is the log of “dmesg > klogs_cam0.txt” when the CSI camera is attached to CAM0.

klogs_cam1.txt (69.7 KB)
This is the log of “dmesg > klogs_cam1.txt” when the CSI camera is attached to CAM1.

klogs_gst_cam0.txt (70.0 KB)
This is the log of “dmesg > klogs_gst_cam0.txt” when the CSI camera is attached to CAM0 and run the command “gst-launch-1.0 nvarguscamerasrc sensor-id=1 ! ‘video/x-raw(memory:NVMM),width=1920,height=1080,framerate=60/1,format=NV12’ ! queue ! nvvidconv ! queue ! xvimagesink”.

klogs_gst_cam1.txt (69.9 KB)
This is the log of “dmesg > klogs_gst_cam1.txt” when the CSI camera is attached to CAM1 and run the command “gst-launch-1.0 nvarguscamerasrc sensor-id=1 ! ‘video/x-raw(memory:NVMM),width=1920,height=1080,framerate=60/1,format=NV12’ ! queue ! nvvidconv ! queue ! xvimagesink”.

background about this issue:

We have designed and made a carrier board which very similar to the Xavier NX carrier board (P3518), and this carrier board have been applied in several fields with Xavier NX and Jetson Nano (4GB).
Unlike the P3518, there is only one CSI interface on our carrier board, it works fine with Xavier NX and Jetson Nano (4GB).

We are migrating to Orin serials, and our customers are planning to migrate to Orin serials for better performance too.
Our customers have purchased our carrier boards, they want to use these carrier boards with new Orin serials.

I am testing our carrier board with Orin Nano, our carrier board almost works fine with Orin Nano excepts the CSI camera, and I find same behavior when a single CSI camera is attached to CAM1 of P3518 with Orin Nano. I think this could be a reference for asking help from you as P3518 is designed and made by Nvidia.
BTW, I just have one CSI camera on my hand for testing, I could not test 2 CSI cameras are attached to CAM0 and CAM1 on P3518 both.

hello chengang1,

according to kernel logs.
sensor registration is complete either you’ve attach CSI camera to CAM0 or CAM1.
so… I assume you’ve /dev/video0 created for both scenario.
could you please check v4l standard controls,
can this works with CSI camera to either CAM0 or CAM1?
$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=100

if above v4l pipeline works…
this may be an issue with nvarguscamerasrc, which by default launching camera device with position property settings to rear.
for example,

                        module0 {
                                badge = "jakku_front_RBPCV3";
                                position = "front";
                                orientation = "1";
                                drivernode0 {
                                        pcl_id = "v4l2_sensor";
                                        devname = "imx477 9-001a";
                        module1 {
                                badge = "jakku_rear_RBPCV3";
                                position = "rear";
                                orientation = "1";
                                drivernode0 {
                                        pcl_id = "v4l2_sensor";
                                        devname = "imx477 10-001a";

here’s the logs when you attach CSI camera to CAM1,
[ 12.728524] tegra-camrtc-capture-vi tegra-capture-vi: subdev imx477 9-001a bound
it’s actually register a camera module with… position = "front"; to the system.
to workaround this,
you may try hacking the position property as rear to check this could resolve the issue.

with the pipeline

$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=100

  • when the IMX477 CSI camera is connected to interface CAM0, the following messages are printed out, and the pipeline exits automatically:
    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
    <<<<<<<<

  • when the IMX477 CSI camera is connected to interface CAM1, there is no any message from pipeline, and the pipeline does not exit, it is stuck somewhere.

may I know what’s the error logs…

There is no any message from pipeline, so, what log do you want, dmesg?

hello chengang1,

yes, please gather kernel logs.
you may also setup a terminal for running $ dmesg --follow to monitor the kernel reports; you may compare the logs when stream by port CAM0 and CAM1.

This issue is resolved, the problem reason is a wrong dtb file of carrier board is used, the dtb for P3509+P3767should be used, not P3768+P3767 which used by the SDK manager.

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