TX2 Jetpack 4.2 Argus Error

Hello,

I’ve got a sensor working with V4L2 but I want to get it working with Argus and am running into issues.

Here is the log when trying to access the camera:

0)Thread 1 getting next capture
Thread 1 is waiting
Thread 2 getting next capture
Thread 2 is waiting
Thread 3 getting next capture
Thread 3 is waiting
Thread 4 getting next capture
Thread 4 is waiting
Thread 5 getting next capture
Thread 5 is waiting
Thread 6 getting next capture
Thread 6 is waiting
Thread 7 getting next capture
Thread 7 is waiting
Thread 8 getting next capture
Thread 8 is waiting
Thread 9 getting next capture
Thread 9 is waiting
Thread 10 getting next capture
Thread 10 is waiting
Thread 11 getting next capture
Thread 11 is waiting
Thread 12 getting next capture
Thread 12 is waiting
Starting services...
Worker thread IspHw statsComplete start
Worker thread IspHw frameComplete start
Worker thread CaptureScheduler checkFramePending start
Worker thread CaptureScheduler frameStart start
Worker thread V4L2CaptureScheduler checkCaptureComplete start
Worker thread V4L2CaptureScheduler issueCaptures start
Worker thread PS handleRequests start
getInstance: s_instance(0x7f7868da20)
getInstance: s_instance(0x7f7868da20)
subscribe: SensorType(gyroscope)
subscribe: create SensorType(gyroscope) sensor(0x7f78690020)
subscribe: SensorType(accelerometer)
subscribe: create SensorType(accelerometer) sensor(0x7f78695580)
AC plugin not present: dlopen "acplugin.so", acplugin.so: cannot open shared object file: No such file or directory
Services are started
NvPclSetHotplugCallback: ++++++++++++++++++++++
---- Imager: Calibration blob file handling supported in this build ----
NvPclHwGetModuleList: OFParserListModules Succeeded
NvPclHwGetModuleCalib: Error: Invalid module badge info
NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
NvPclHwGetModuleList: No module data found
NvPclHwPrintModuleDefinition -- Name: test_sensor
NvPclHwPrintModuleDefinition -- Position: 1
NvPclHwPrintModuleDefinition -- CalibrationData Found: 0
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].Name: v4l2_sensor
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].DevName: test_sensor 0-000e
NvPclHwGetModuleList: OFParserListModules Succeeded
NvPclModuleListInitialize: NvPclModule list[0]: test_sensor position1
NvPclHwScanExternalCameras -- adding video0 to discover list
NvPclHwScanExternalCameras -- adding video0 to discover list
NvPclHwScanExternalCameras -- adding video0 to discover list
getHotplugMonitor: Getting hotplug monitor instance
 initializeHotplug++
 hotPlugfunc ++ 
 addWatch: Watch added wd='1'
CheckProcDTExists: INFO: accessing /proc/device-tree/tegra-virtual-camera-platform/modules; No such file or directory
OFParserGetVirtualDevice: NVIDIA Camera virtual enumerator not found in proc device-tree
setHotplugCallback: Registered new callback client
NvPclSetHotplugCallback: ----------------------
 hotPlugfunc: reading from inotify FD, Thread waiting 
NvPclOpen: ++++++++++++++++++++++
NvPclStateControllerOpen: Found GUID 1 match at index[0]
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f786de280
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f785d4140
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f78622c00
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f785db500
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f78358e20
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f785e02a0
LoadOverridesFile: looking for override file [/Calib/camera_override.isp] 1/16
CheckOverridesPermissions: stat(/Calib/camera_override.isp) call failed
LoadOverridesFile: looking for override file [/data/vendor/nvcam/settings/camera_overrides.isp] 2/16
CheckOverridesPermissions: stat(/data/vendor/nvcam/settings/camera_overrides.isp) call failed
LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/camera_overrides.isp] 3/16
CheckOverridesPermissions: stat(/opt/nvidia/nvcam/settings/camera_overrides.isp) call failed
LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/camera_overrides.isp] 4/16
CheckOverridesPermissions: stat(/var/nvidia/nvcam/settings/camera_overrides.isp) call failed
LoadOverridesFile: looking for override file [/data/vendor/nvcam/camera_overrides.isp] 5/16
CheckOverridesPermissions: stat(/data/vendor/nvcam/camera_overrides.isp) call failed
LoadOverridesFile: looking for override file [/data/vendor/nvcam/settings/test_sensor.isp] 6/16
CheckOverridesPermissions: stat(/data/vendor/nvcam/settings/test_sensor.isp) call failed
LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/test_sensor.isp] 7/16
CheckOverridesPermissions: stat(/opt/nvidia/nvcam/settings/test_sensor.isp) call failed
LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/test_sensor.isp] 8/16
CheckOverridesPermissions: stat(/var/nvidia/nvcam/settings/test_sensor.isp) call failed
---- imager: No override file found. ----
Imager: looking for override file [/mnt/factory/camera/factory.bin] 1/16
Imager: looking for override file [/Calib/factory.bin] 2/16
Imager: looking for override file [/Calib/calibration.bin] 3/16
Imager: looking for override file [(null)] 4/16
Imager: looking for override file [(null)] 5/16
Imager: looking for override file [(null)] 6/16
Imager: looking for override file [(null)] 7/16
Imager: looking for override file [(null)] 8/16
Imager: looking for override file [(null)] 9/16
Imager: looking for override file [(null)] 10/16
Imager: looking for override file [(null)] 11/16
Imager: looking for override file [(null)] 12/16
Imager: looking for override file [(null)] 13/16
Imager: looking for override file [(null)] 14/16
Imager: looking for override file [(null)] 15/16
Imager: looking for override file [(null)] 16/16
Imager: looking for override file [/data/vendor/nvcam/settings/factory.bin] 1/16
Imager: looking for override file [/data/vendor/nvcam/settings/test_sensor.bin] 2/16
Imager: looking for override file [/opt/nvidia/nvcam/settings/test_sensor.bin] 3/16
Imager: looking for override file [/var/nvidia/nvcam/settings/test_sensor.bin] 4/16
Imager: looking for override file [(null)] 5/16
Imager: looking for override file [(null)] 6/16
Imager: looking for override file [(null)] 7/16
Imager: looking for override file [(null)] 8/16
Imager: looking for override file [(null)] 9/16
Imager: looking for override file [(null)] 10/16
Imager: looking for override file [(null)] 11/16
Imager: looking for override file [(null)] 12/16
Imager: looking for override file [(null)] 13/16
Imager: looking for override file [(null)] 14/16
Imager: looking for override file [(null)] 15/16
Imager: looking for override file [(null)] 16/16
NvPclCreateDriver: Found NvPcl Driver Hal dev_name match (v4l2_sensor)
NvPclCreateDriver: Found a Driver name match (v4l2_sensor)
NvPclConnectDrivers: hImager was NULL, creating new imager
NvPclInitializeDrivers: v4l2_sensor ++++++++++++++++++
OFDPropertyGetString: could not read property [use_decibel_gain]
OFDPropertyGetString: could not read property [use_sensor_mode_id]
OFDPropertyGetString: could not read property [delayed_gain]
OFDPropertyGetString: could not read property [type]
loadSubType: Sensor type missing in DT, 206
OFDPropertyCopyToLong: could not read property [mode0.vc_id]
OFDPropertyCopyToLongLong: could not read property [mode0.exp_time_1h]
OFDPropertyCopyToFloat: could not read property [mode0.gain_step_pitch]
OFDPropertyGetString: could not read property [mode0.x_start]
OFDPropertyGetString: could not read property [mode0.y_start]
OFDPropertyGetString: could not read property [mode0.x_end]
OFDPropertyGetString: could not read property [mode0.y_end]
OFDPropertyGetString: could not read property [mode0.h_scaling]
OFDPropertyGetString: could not read property [mode0.v_scaling]
initialize: Loaded Driver: 1 Modes Available--------------
NvPclInitializeDrivers: v4l2_sensor ------------------
NvPclOpen: ----------------------
Config Error: sensor load cfg: 0, cfg check: 1
SCF: Error BadParameter: NvCameraIspInitialize failed (in src/services/autocontrol/NvCameraIspDriver.cpp, function initialize(), line 158)
SCF: Error BadParameter:  (propagating from src/services/autocontrol/NvCameraIspDriver.cpp, function fillStaticProps(), line 1968)
SCF: Error BadParameter:  (propagating from src/services/autocontrol/AutocontrolService.cpp, function fillStaticProps(), line 176)
SCF: Error BadParameter:  (propagating from src/api/Source.cpp, function initialize(), line 133)
SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function replaceSourceInList(), line 372)
SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function addSourceByIndex(), line 297)
SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function getSource(), line 458)
Acquiring SCF Camera device source via index 0 has failed. === display_video[7495]: CameraProvider initialized (0x7f786e1a30)=== display_video[7495]: CameraProvider destroyed (0x7f786e1a30)Stopping services...
Worker thread CaptureScheduler frameStart stop
Worker thread CaptureScheduler checkFramePending stop
Worker thread IspHw statsComplete stop
Worker thread IspHw frameComplete stop
Worker thread V4L2CaptureScheduler issueCaptures stop
Worker thread V4L2CaptureScheduler checkCaptureComplete stop
NvPclClose: ++++++++++++++++++++++
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f785db500
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f78358e20
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f785e02a0
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f786de280
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f785d4140
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f78622c00
NvPclStateControllerClose: Module test_sensor closed
NvPclClose: ----------------------

Ultimately Argus failes to initialize due to it thinking that no cameras are available.
I am thinking that the cause lies with these errors:

Config Error: sensor load cfg: 0, cfg check: 1
SCF: Error BadParameter: NvCameraIspInitialize failed (in src/services/autocontrol/NvCameraIspDriver.cpp, function initialize(), line 158)
SCF: Error BadParameter:  (propagating from src/services/autocontrol/NvCameraIspDriver.cpp, function fillStaticProps(), line 1968)
SCF: Error BadParameter:  (propagating from src/services/autocontrol/AutocontrolService.cpp, function fillStaticProps(), line 176)
SCF: Error BadParameter:  (propagating from src/api/Source.cpp, function initialize(), line 133)
SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function replaceSourceInList(), line 372)
SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function addSourceByIndex(), line 297)
SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function getSource(), line 458)
Acquiring SCF Camera device source via index 0 has failed. === display_video[7495]: CameraProvider initialized (0x7f786e1a30)=== display_video[7495]: CameraProvider destroyed (0x7f786e1a30)Stopping services...

Is there any documentation that would help debug this log? It is hard tracking down the cause of these errors, especially since some errors/warnings are not critical.

Thanks

It’s could be something wrong it tegra-camera-platform in your DTS file. Please have a review it.

I don’t see anything wrong with my tegra-camera-platform. Can you verify that it is correct?

tegra-camera-platform {
		compatible = "nvidia, tegra-camera-platform";

		num_csi_lanes = <2>;
		max_lane_speed = <1500000>;
		min_bits_per_pixel = <12>;
		vi_peak_byte_per_pixel = <2>;
		vi_bw_margin_pct = <25>;
		max_pixel_rate = <750000>;
		isp_peak_byte_per_pixel = <2>;
		isp_bw_margin_pct = <25>;

		modules {
			module0 {
				badge = "test_sensor_front";
				position = "front";
				orientation = "0";
				
				drivernode0 {
					pcl_id = "v4l2_sensor";
					devname = "test_sensor 0-000e";
					proc-device-tree = "/proc/device-tree/i2c@3160000/test_sensor_a@0e";
				};
			};
		};
	};

Please post the result from v4l2-ctl --list-formats-ext.
And attached others camera DTS

Hi Dylan George,
As Shane suggested, can you share the complete device tree file mainly including the sensor mode (mode0-N) properties of the sensor.

The sensor properties mentioned inside will be used by libArgus and not V4L2 so you may not be finding any issues while streaming via v4l2.

Also can you check the sample hardware/nvidia/platform/t18x/common/kernel-dts/t18x-common-modules/tegra186-camera-e3326-a00.dtsi device tree file for reference.

Kindly check the Sensor Programming Guide for the device tree parameter values and their explanation:
[url]Welcome — Jetson Linux<br/>Developer Guide 34.1 documentation

Thanks for the support everyone. I am assuming you are correct about the device tree being incorrect in some way. At the moment I am no longer pursuing the Argus pipeline, as I’ve managed to get V4L2 working in a way that suits me better and attains low latency. If I ever have reason to try the Argus pipeline again, I will take your advice into account.

Thanks again,

Dylan