Can get images using v4l2-ctl but not with nvarguscamerasrc

Hi all,

We’ve developed a driver for our sensor on the Jetson Nano and v4l2-ctrl works perfectly fine to save images. But the gstreamer command gst-launch-1.0 -v nvarguscamerasrc ! fakesink shows the error :

Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:557 No cameras available

nvargus-daemon gives the following logs :

=== NVIDIA Libargus Camera Service (0.97.3)=== Listening for connections...=== gst-launch-1.0[8663]: Connection established (7F9090E1D0)OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module0
NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
NvPclHwGetModuleList: No module data found
OFParserGetVirtualDevice: NVIDIA Camera virtual enumerator not found in proc device-tree
---- imager: No override file found. ----
(NvCamV4l2) Error BadParameter: Control 0 not found (in /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function findControlById(), line 1874)
(NvCamV4l2) Error BadParameter:  (propagating from /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function getControlRange(), line 331)
(NvOdmDevice) Error BadParameter:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function initializeV4L2Items(), line 242)
(NvOdmDevice) Error BadParameter:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function initialize(), line 116)
NvPclDriverInitializeData: Unable to initialize driver v4l2_sensor
NvPclInitializeDrivers: error: Failed to init camera sub module v4l2_sensor
NvPclStartPlatformDrivers: Failed to start module drivers
NvPclStateControllerOpen: Failed ImagerGUID 1. (error 0x4)
NvPclOpen: PCL Open Failed. Error: 0xf
SCF: Error BadParameter: Sensor could not be opened. (in src/services/capture/CaptureServiceDeviceSensor.cpp, function getSourceFromGuid(), line 582)
SCF: Error BadParameter:  (propagating from src/services/capture/CaptureService.cpp, function addSourceByGuid(), line 437)
SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function addSourceByIndex(), line 295)
SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function getSource(), line 458)
Acquiring SCF Camera device source via index 0 has failed. === gst-launch-1.0[8663]: CameraProvider initialized (0x7f8c928a10)=== gst-launch-1.0[8663]: CameraProvider destroyed (0x7f8c928a10)=== gst-launch-1.0[8663]: Connection closed (7F9090E1D0)=== gst-launch-1.0[8663]: Connection cleaned up (7F9090E1D0)

I’ve tried following some advice found in the forum but to no avail.

This usually indicates that something isn’t correct in the tegra-camera-platform section of the device tree. Pay careful attention to devname and proc-device-tree. Devname must match, exactly, the device name (case matters!). For proc device tree I usually navigate to the node in /proc/device-tree and then execute cd $(cat proc-device-tree) to be absolutely certain I have it correct.

Hi D3_growe,

Thanks for your answer!

Running v4l2-ctl --list-devices shows that the device name is the same as devname

vi-output, snappy 6-003d (platform:54080000.vi:0):
/dev/video0

"/ {
        tcp: tegra-camera-platform {
                compatible = "nvidia, tegra-camera-platform";


                num_csi_lanes = <2>;
                max_lane_speed = <1500000>;
                min_bits_per_pixel = <10>;
                vi_peak_byte_per_pixel = <2>;
                vi_bw_margin_pct = <25>;
                max_pixel_rate = <240000>;
                isp_peak_byte_per_pixel = <5>;
                isp_bw_margin_pct = <25>;


                modules {
                        cam_module0: module0 {
                                position = "front";
                                badge = "porg_front_0300-T";
                                orientation = "1";
                                cam_module0_drivernode0: drivernode0 {
                                        pcl_id = "v4l2_sensor";
                                        devname = "snappy 6-003d";
                                        proc-device-tree = "/proc/device-tree/host1x/i2c@546c0000/snappy_a@3d";
                                };
                        };
                };
        };
};"

And running

cd /proc/device-tree/tegra-camera-platform/modules/module0/drivernode0
cd $(cat proc-device-tree)

Sends me to /proc/device-tree/host1x/i2c@546c0000/snappy_a@3d, so I believe the problem’s coming from elsewhere.

We’re working with a bayer sensor so we have to pass through the ISP. So, it looks like something’s missing in our driver/device-tree. Both our driver and device tree were inspired by the imx219 ones, so we have no idea what we’re missing.

I guess the source code of “…/nvcamv4l2/v4l2_device.cpp” and co isn’t public? We’d like to know what the “Control 0 not found” error means.

Hi all,

We’ve corrected the “no cameras available” error, but now we’re getting the following error :

=== NVIDIA Libargus Camera Service (0.97.3)=== Listening for connections...=== gst-launch-1.0[8915]: Connection established (7FA886A1D0)OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module0
NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
NvPclHwGetModuleList: No module data found
OFParserGetVirtualDevice: NVIDIA Camera virtual enumerator not found in proc device-tree
---- imager: No override file found. ----
LSC: LSC surface is not based on full res!
=== gst-launch-1.0[8915]: CameraProvider initialized (0x7fa47e21f0)LSC: LSC surface is not based on full res!
SCF: Error Timeout: ISP port 0 timed out! (in src/services/capture/NvIspHw.cpp, function waitIspFrameEnd(), line 478)
SCF: Error Timeout:  (propagating from src/services/capture/NvIspHw.cpp, function waitIspFrameEnd(), line 519)
SCF: Error Timeout:  (propagating from src/common/Utils.cpp, function workerThread(), line 116)
SCF: Error Timeout: ISP Stats timed out! (in src/services/capture/NvIspHw.cpp, function waitIspStatsFinished(), line 561)
SCF: Error Timeout: Worker thread IspHw frameComplete failed (in src/common/Utils.cpp, function workerThread(), line 133)
Error: waitCsiFrameStart timeout guid 1
************VI/CSI Debug Registers**********
VI_CFG_INTERRUPT_MASK_0 = 0x00000000
VI_CFG_INTERRUPT_STATUS_0 = 0x00000000
VI_CSI_0_ERROR_STATUS_0 = 0x00000000
VI_CSI_0_ERROR_INT_MASK_0 = 0x0000001f
VI_CSI_1_ERROR_STATUS_0 = 0x00000000
VI_CSI_1_ERROR_INT_MASK_0 = 0x00000000
CSI_CSI_PIXEL_PARSER_A_INTERRUPT_MASK_0 = 0x00000000
CSI_CSI_PIXEL_PARSER_A_STATUS_0 = 0x00000000
CSI_CSI_PIXEL_PARSER_B_INTERRUPT_MASK_0 = 0x00000000
CSI_CSI_PIXEL_PARSER_B_STATUS_0 = 0x00000000
CSI_CSI_CIL_A_INTERRUPT_MASK_0 = 0x00000000
CSI_CSI_CIL_A_STATUS_0 = 0x00000000
CSI_CSI_CILA_STATUS_0 = 0x00000000
CSI_CSI_CIL_B_INTERRUPT_MASK_0 = 0x00000000
CSI_CSI_CIL_B_STATUS_0 = 0x00000000
CSI_CSI_CILB_STATUS_0 = 0x00000000
CSI_CSI_READONLY_STATUS_0 = 0x00000000
CSI_DEBUG_CONTROL_0 = 0x5b2f0e00
CSI_DEBUG_COUNTER_0_0 = 0x00000000
CSI_DEBUG_COUNTER_1_0 = 0x00000000
CSI_DEBUG_COUNTER_2_0 = 0x00000000
*****************************************
Error: waitCsiFrameStart Something went wrong with waiting on frame start
Error: waitCsiFrameStart Something went wrong with waiting on frame start
PowerServiceCore:handleRequests: timePassed = 1518

Where can we get the definition of the debug registers?

Nevermind, by correcting the first error we’ve probably generated some new problems. Everything’s working fine now.

Hi jouaitin,
Could you please descript how to resolve the “no cameras available” issue? I have the same problem, Thanks a lot!

Hi jollen_wang,

I don’t know if you’ve solved the problem since then, but if I remember correctly our problem was that some properties in our device tree were missing. So you should make sure that your device tree is using at least the same properties found in the imx219’s device tree (including physical_w and physical_h even if you don’t know the exact values)