nvarguscamerasrc: 521 no cameras available?

I’ve got an ar0233 sensor that we’ve developed drivers for. Dealing with L4T r32.1. The v4l2-ctl capture works flawlessly. I’m trying to see what it takes to take advantage of the ISP. When I execute the following, I get a “521 No cameras available” error:

nvidia@tegra-ubuntu:~$ gst-launch-1.0 nvarguscamerasrc ! fakesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:521 No cameras available
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:03.943904801
Setting pipeline to PAUSED ...
Setting pipeline to READY ...

To debug things, I perform the following:

nvidia@tegra-ubuntu:~$ sudo service nvargus-daemon stop
nvidia@tegra-ubuntu:~$ sudo enableCamPclLogs=5 nvargus-daemon

I then launch another capture using the same “gst-launch-1.0” command. Here’s the result I see:

=== NVIDIA Libargus Camera Service (0.97.3)=== Listening for connections...=== gst-launch-1.0[8984]: Connection established (7F8B3781D0)NvPclSetHotplugCallback: ++++++++++++++++++++++
---- Imager: Calibration blob file handling supported in this build ----
NvPclHwGetModuleList: OFParserListModules Succeeded
NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
NvPclHwGetModuleList: No module data found
NvPclHwPrintModuleDefinition -- Name: jb_topleft_brtar0233
NvPclHwPrintModuleDefinition -- Position: 3
NvPclHwPrintModuleDefinition -- CalibrationData Found: 1
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].Name: v4l2_sensor
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].DevName: jbar0233 2-0010
NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
NvPclHwGetModuleList: No module data found
NvPclHwPrintModuleDefinition -- Name: jb_topright_brtar0233
NvPclHwPrintModuleDefinition -- Position: 5
NvPclHwPrintModuleDefinition -- CalibrationData Found: 1
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].Name: v4l2_sensor
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].DevName: jbar0233 8-0010
NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
NvPclHwGetModuleList: No module data found
NvPclHwPrintModuleDefinition -- Name: jb_bottomright_brtar0233
NvPclHwPrintModuleDefinition -- Position: 4
NvPclHwPrintModuleDefinition -- CalibrationData Found: 1
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].Name: v4l2_sensor
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].DevName: jbar0233 1-0010
NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
NvPclHwGetModuleList: No module data found
NvPclHwPrintModuleDefinition -- Name: jb_bottomleft_brtar0233
NvPclHwPrintModuleDefinition -- Position: 0
NvPclHwPrintModuleDefinition -- CalibrationData Found: 1
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].Name: v4l2_sensor
NvPclHwPrintCameraSubModule -- HwCamSubModule[0].DevName: jbar0233 7-0010
NvPclHwGetModuleList: OFParserListModules Succeeded
NvPclModuleListInitialize: NvPclModule list[0]: jb_topleft_brtar0233 position3
NvPclModuleListInitialize: NvPclModule list[1]: jb_topright_brtar0233 position5
NvPclModuleListInitialize: NvPclModule list[2]: jb_bottomright_brtar0233 position4
NvPclModuleListInitialize: NvPclModule list[3]: jb_bottomleft_brtar0233 position0
NvPclHwScanExternalCameras -- adding video3 to discover list
NvPclHwScanExternalCameras -- adding video2 to discover list
NvPclHwScanExternalCameras -- adding video1 to discover list
NvPclHwScanExternalCameras -- adding video0 to discover list
NvPclHwScanExternalCameras -- adding video3 to discover list
NvPclHwScanExternalCameras -- adding video2 to discover list
NvPclHwScanExternalCameras -- adding video1 to discover list
NvPclHwScanExternalCameras -- adding video0 to discover list
NvPclHwScanExternalCameras -- adding video3 to discover list
NvPclHwScanExternalCameras -- adding video2 to discover list
NvPclHwScanExternalCameras -- adding video1 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 3 match at index[0]
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f84564170
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f845dd760
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f845724e0
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f84212860
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f846a60f0
NvPclHwInitializeModule: allocate overrides pathname @ 0x7f846a5f70
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/jb_topleft_brtar0233.isp] 6/16
CheckOverridesPermissions: stat(/data/vendor/nvcam/settings/jb_topleft_brtar0233.isp) call failed
LoadOverridesFile: looking for override file [/opt/nvidia/nvcam/settings/jb_topleft_brtar0233.isp] 7/16
CheckOverridesPermissions: stat(/opt/nvidia/nvcam/settings/jb_topleft_brtar0233.isp) call failed
LoadOverridesFile: looking for override file [/var/nvidia/nvcam/settings/jb_topleft_brtar0233.isp] 8/16
CheckOverridesPermissions: stat(/var/nvidia/nvcam/settings/jb_topleft_brtar0233.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/jb_topleft_brtar0233.bin] 2/16
Imager: looking for override file [/opt/nvidia/nvcam/settings/jb_topleft_brtar0233.bin] 3/16
Imager: looking for override file [/var/nvidia/nvcam/settings/jb_topleft_brtar0233.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 [devnode-bus]
OFDPropertyGetString: could not read property [use_decibel_gain]
OFDPropertyGetString: could not read property [delayed_gain]
OFDPropertyCopyToLong: could not read property [has-eeprom]
(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 241)
(NvOdmDevice) Error BadParameter:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function initialize(), line 115)
NvPclDriverInitializeData: Unable to initialize driver v4l2_sensor
NvPclInitializeDrivers: error: Failed to init camera sub module v4l2_sensor
NvPclStartPlatformDrivers: Failed to start module drivers
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f84212860
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f846a60f0
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f846a5f70
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f84564170
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f845dd760
NvPclCloseModuleDrivers: deallocate/free overrides pathname @ 0x7f845724e0
NvPclStateControllerOpen: Failed ImagerGUID 3. (error 0x4)
NvPclStateControllerClose: Module jb_topleft_brtar0233 closed
NvPclOpen: PCL Open Failed. Error: 0xf
NvPclClose: ++++++++++++++++++++++
NvPclClose: ----------------------

As far as I can tell, my driver is at least getting invoked. I’m not sure what the “BadParameter” messages above refer to, but assume that’s where things are fouling up.

I annotated my driver and I’m seeing my “_power_on” and “_power_off” functions being executed. So, it’s able to locate things and try to perform a capture. Example:

[  617.765207] jbar0233 7-0010: ar0233_open:++
[  617.765223] jbar0233 7-0010: ar0233_open:--
[  617.765716] jbar0233 1-0010: ar0233_open:++
[  617.765722] jbar0233 1-0010: ar0233_open:--
[  617.766356] jbar0233 2-0010: ar0233_open:++
[  617.766361] jbar0233 2-0010: ar0233_open:--
[  617.766972] jbar0233 8-0010: ar0233_open:++
[  617.766978] jbar0233 8-0010: ar0233_open:--
[  617.770639] jbar0233 7-0010: ar0233_power_on++ 
[  617.770653] jbar0233 7-0010: ar0233_power_on-- 
[  617.773688] jbar0233 7-0010: ar0233_power_off++ 
[  617.775989] jbar0233 1-0010: ar0233_power_on++ 
[  617.776035] jbar0233 1-0010: ar0233_power_on-- 
[  617.776482] jbar0233 1-0010: ar0233_power_off++ 
[  617.778417] jbar0233 2-0010: ar0233_power_on++ 
[  617.778422] jbar0233 2-0010: ar0233_power_on-- 
[  617.779208] jbar0233 2-0010: ar0233_power_off++ 
[  617.781140] jbar0233 8-0010: ar0233_power_on++ 
[  617.781150] jbar0233 8-0010: ar0233_power_on-- 
[  617.781259] jbar0233 8-0010: ar0233_power_off++

Any ideas what may be causing the issue?

Thanks!
–tim

Hi Tim,

Getting cameras to work on Xavier through Argus can often be a bit of a challenge. I have a few ideas:

  • What do you see if you enable tracing? (see the script I have attached)
  • Have you set serdes_pix_clk_hz in your mode in the device tree?
  • Any hints in dmesg? Do you see "no reply from camera processor"?
  • In one case I can only stream through the ISP if I (incorrectly) start the sensor streaming from _probe() instead of from _s_stream(). Basically I have to leave it streaming continuously. We haven't solved why that is yet. For that sensor it's fine when using v4l2.

Regards,
Greg

enable-trace.txt (717 Bytes)

Greg,

Thanks for the follow-up.

I’ll enable tracing and post results.

I did not have serdes_pix_clk_hz set in the modes of the device tree. I added that. No change in behavior – still see the “521 No cameras available” error.

Only hint I see in dmesg:

[RCE] WARNING: t194/isp5.c:901 [config_channel] "All error notifications not enabled: correctable=0x00 uncorrectable=0x00"

Interesting to know about the streaming issue you highlighted. I’ll look into that.

Thanks again!
–tim

What did you set serdes_pix_clk_hz to? Make sure it’s the pixel rate of the CSI output of your deserializer.

Another post just jogged my memory: do you have any embedded data lines coming from the sensor? The trace log should provide clues here.