Hi @JerryChang ,
I’m facing same issue like @zzompmzz .
I’m using the Xavier NX SOM (production version) and connect my camera directly to the CAM_I2C pin on my custom carrier board.
Here is my DT (I already change the module to 2-0010 same as driver logs):
#include <dt-bindings/media/camera.h>
/ {
tegra-capture-vi {
num-channels = <1>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
mycamera_vi_in0: endpoint {
port-index = <0>;
bus-width = <4>;
remote-endpoint = <&mycamera_csi_out0>;
};
};
};
};
host1x@13e00000 {
nvcsi@15a00000 {
num-channels = <1>;
#address-cells = <1>;
#size-cells = <0>;
channel@0 {
reg = <0>;
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
mycamera_csi_in0: endpoint@0 {
port-index = <0>;
bus-width = <4>;
remote-endpoint = <&mycamera_out0>;
};
};
port@1 {
reg = <1>;
mycamera_csi_out0: endpoint@1 {
remote-endpoint = <&mycamera_vi_in0>;
};
};
};
};
};
};
i2c@3180000 {
mycamera: mycamera@10 {
compatible = "test,mycamera";
reg = <0x10>;
status = "okay";
/* V4L2 device node location */
devnode = "video0";
/* Physical dimensions of sensor */
physical_w = "3.840";
physical_h = "2.160";
sensor_model = "mycamera";
use_sensor_mode_id = "true";
mode0 {
mclk_khz = "24000";
num_lanes = "4";
tegra_sinterface = "serial_a";
phy_mode = "DPHY";
discontinuous_clk = "no";
dpcm_enable = "false";
cil_settletime = "11";
active_w = "3840";
active_h = "2160";
mode_type = "bayer";
pixel_phase = "rggb";
csi_pixel_bit_depth = "10";
readout_orientation = "90";
line_length = "3840";
inherent_gain = "1";
mclk_multiplier = "80";
pix_clk_hz = "350000000";
gain_factor = "16";
framerate_factor = "1000000";
exposure_factor = "1000000";
min_gain_val = "16"; /* 1.00x */
max_gain_val = "356"; /* 22x */
step_gain_val = "1";
default_gain = "16"; /* 1.00x */
min_hdr_ratio = "1";
max_hdr_ratio = "1";
min_framerate = "2000000"; /* 2.0 fps */
max_framerate = "30000000"; /* 30.0 fps */
step_framerate = "1";
default_framerate = "30000000"; /* 30.0 fps */
min_exp_time = "13"; /* us */
max_exp_time = "683709"; /* us */
step_exp_time = "1";
default_exp_time = "2495"; /* us */
embedded_metadata_height = "2";
};
ports {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
port@0 {
reg = <0>;
mycamera_out0: endpoint {
port-index = <0>;
bus-width = <4>;
remote-endpoint = <&mycamera_csi_in0>;
};
};
};
};
};
};
/ {
tcp: tegra-camera-platform {
compatible = "nvidia, tegra-camera-platform";
num_csi_lanes = <8>;
max_lane_speed = <2500000>;
min_bits_per_pixel = <10>;
vi_peak_byte_per_pixel = <2>;
vi_bw_margin_pct = <25>;
max_pixel_rate = <7500000>;
isp_peak_byte_per_pixel = <5>;
isp_bw_margin_pct = <25>;
modules {
cam_module0: module0 {
badge = "test_front_mycamera";
position = "front";
orientation = "1";
status = "okay";
cam_module0_drivernode0: drivernode0 {
status = "okay";
pcl_id = "v4l2_sensor";
devname = "mycamera 2-0010";
proc-device-tree = "/proc/device-tree/i2c@3180000/mycamera_a@10";
};
};
};
};
};
Here is the dmesg logs:
[ 10.954962] mycamera 2-0010: probing v4l2 sensor at addr 0x10
[ 10.971101] mycamera 2-0010: tegracam sensor driver:mycamera_v2.0.6
[ 11.008709] tegra-camrtc-capture-vi tegra-capture-vi: subdev mycamera 2-0010 bound
[ 11.016105] mycamera 2-0010: detected mycamera sensor
Below are some commands to check and stream (using v4l2-ctrl):
mypc@ubuntu:~$ v4l2-ctl --list-devices
NVIDIA Tegra Video Input Device (platform:tegra-camrtc-ca):
/dev/media0
vi-output, mycamera 2-0010 (platform:tegra-capture-vi:0):
/dev/video0
mypc@ubuntu:~$ v4l2-ctl -d /dev/video0 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture
[0]: 'RG10' (10-bit Bayer RGRG/GBGB)
Size: Discrete 3840x2160
Interval: Discrete 0.033s (30.000 fps)
mypc@ubuntu:~$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=3840,height=2160,pixelformat=RG10 --set-ctrl sensor_mode=0 --stream-mmap --stream-count=50
<<<<<<<<<<<<<<<<<<<<<<<<<< 24.20 fps
<<<<<<<<<<<<<<<<<<< 21.64 fps
<<<<<
mypc@ubuntu:~$
But when I run the nvgstcapture-1.0 command, no camera available shown:
mypc@ubuntu:~$ nvgstcapture-1.0
Encoder null, cannot set bitrate!
Encoder Profile = High
Supported resolutions in case of ARGUS Camera
(2) : 640x480
(3) : 1280x720
(4) : 1920x1080
(5) : 2104x1560
(6) : 2592x1944
(7) : 2616x1472
(8) : 3840x2160
(9) : 3896x2192
(10): 4208x3120
(11): 5632x3168
(12): 5632x4224
Runtime ARGUS Camera Commands:
...#other logs
Cannot open display specified with DISPLAY environment variable
can't create window, Display NULL
Using winsys: x11
Opening in BLOCKING MODE
** Message: 20:03:14.291: <main:4651> iterating capture loop ....
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:751 No cameras available
NvMMLiteOpen : Block : BlockType = 4
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
Here is the syslog when I run the nvgstcapture-1.0 command:
mypc@ubuntu:~$ tail -f /var/log/syslog
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: Acquiring SCF Camera device source via index 2 has failed. === nvgstcapture-1.0[2466]: CameraProvider initialized (0xffffa4540930)=== nvgstcapture-1.0[2466]: CameraProvider destroyed (0xffffa4540930)=== nvgstcapture-1.0[2466]: Connection closed (FFFFA9BE7900)=== nvgstcapture-1.0[2466]: Connection cleaned up (FFFFA9BE7900)=== nvgstcapture-1.0[2635]: Connection established (FFFFA9BE7900)OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module0
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: OFParserEnumerateDriverNode: v4l2_sensor: failed to parse device-tree to driver node
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: NvPclHwGetModuleList: No module data found
Apr 21 20:25:31 ubuntu kernel: [ 1860.822745] tegra-xusb 3610000.xhci: Firmware timestamp: 2022-03-16 11:07:43 UTC, Version: 60.13 release
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: (NvCamV4l2) Error ModuleNotPresent: V4L2Device not available (in /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function verifyDeviceCaps(), line 206)
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: (NvCamV4l2) Error ModuleNotPresent: (propagating from /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function initialize(), line 66)
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: (NvCamV4l2) Error ModuleNotPresent: V4L2Device not available (in /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function verifyDeviceCaps(), line 206)
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: (NvCamV4l2) Error ModuleNotPresent: (propagating from /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function initialize(), line 66)
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: OFParserGetVirtualDevice: NVIDIA Camera virtual enumerator not found in proc device-tree
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: ---- imager: No override file found. ----
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: (NvOdmDevice) Error NotInitialized: hDev Table not initialized (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function initialize(), line 97)
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: NvPclDriverInitializeData: Unable to initialize driver v4l2_sensor
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: NvPclInitializeDrivers: error: Failed to init camera sub module v4l2_sensor
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: NvPclStartPlatformDrivers: Failed to start module drivers
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: NvPclStateControllerOpen: Failed ImagerGUID 1. (error 0x3)
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: NvPclOpen: PCL Open Failed. Error: 0xf
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: SCF: Error BadParameter: Sensor could not be opened. (in src/services/capture/CaptureServiceDeviceSensor.cpp, function getSourceFromGuid(), line 646)
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: SCF: Error BadParameter: (propagating from src/services/capture/CaptureService.cpp, function addSourceByGuid(), line 437)
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: SCF: Error BadParameter: (propagating from src/api/CameraDriver.cpp, function addSourceByIndex(), line 311)
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: SCF: Error BadParameter: (propagating from src/api/CameraDriver.cpp, function getSource(), line 477)
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: Acquiring SCF Camera device source via index 0 has failed. ---- imager: No override file found. ----
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: initializeDevNode: Failed to open dev node '/dev/camera/video1'; No such file or directory, trying alternate default location
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: (NvCamV4l2) Error BadParameter: Control 10094858 not found (in /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function findControlById(), line 1874)
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: (NvCamV4l2) Error BadParameter: (propagating from /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function getControlRange(), line 331)
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: initialize: focus query failed
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: SCF: Error BadParameter: (propagating from src/services/capture/CaptureServiceDeviceSensor.cpp, function open(), line 189)
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: SCF: Error BadParameter: (propagating from src/services/capture/CaptureServiceDeviceSensor.cpp, function getSourceFromGuid(), line 643)
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: SCF: Error BadParameter: (propagating from src/services/capture/CaptureService.cpp, function addSourceByGuid(), line 437)
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: SCF: Error BadParameter: (propagating from src/api/CameraDriver.cpp, function addSourceByIndex(), line 311)
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: SCF: Error BadParameter: (propagating from src/api/CameraDriver.cpp, function getSource(), line 477)
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: Acquiring SCF Camera device source via index 1 has failed. ---- imager: No override file found. ----
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: initializeDevNode: Failed to open dev node '/dev/camera/video2'; No such file or directory, trying alternate default location
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: (NvCamV4l2) Error NotSupported: Must be capture/output devices (in /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function setActiveBufferType(), line 813)
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: (NvCamV4l2) Error NotSupported: (propagating from /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function initialize(), line 68)
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: (NvOdmDevice) Error NotSupported: (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorNonViCsi.cpp, function initialize(), line 146)
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: NvPclDriverInitializeData: Unable to initialize driver v4l2_sensor_usb
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: NvPclInitializeDrivers: error: Failed to init camera sub module v4l2_sensor_usb
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: NvPclStartPlatformDrivers: Failed to start module drivers
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: NvPclStateControllerOpen: Failed ImagerGUID 3. (error 0x2)
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: NvPclOpen: PCL Open Failed. Error: 0xf
Apr 21 20:25:31 ubuntu nvargus-daemon[950]: SCF: Error BadParameter: Sensor could not be opened. (in src/services/capture/CaptureServiceDeviceSensor.cpp, function getSourceFromGuid(), line 646)
The nvargus-daemon already run as default:
mypc@ubuntu:~$ ps -ef | grep nvargus
root 950 1 0 19:54 ? 00:00:00 /usr/sbin/nvargus-daemon
mypc 2545 2005 0 20:15 pts/0 00:00:00 grep --color=auto nvargus
mypc@ubuntu:~$
Then of course I can’t stream with nvarguscamerasrc using gst-launch-1.0 command.
I only flash the Jetson Linux and Sample Rootfs. Do I have to install any of the SDK components? Actually I tried but it always shows not enough memory to install the SDK components.
Could you please give me any suggestion?
Thanks and Regards,
Vĩnh.