Csi camera from seeed studio "IMX219-130 8MP" not working on jetson nano

I used the Nvidia capture command
nvgstcapture-1.0
Following the Nvidia docs about “Taking Your First Picture with CSI or USB Camera”

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:
Help : ‘h’
Quit : ‘q’
Set Capture Mode:
mo:
(1): image
(2): video
Get Capture Mode:
gmo
Set sensor orientation:
so:
(0): none
(1): Rotate counter-clockwise 90 degrees
(2): Rotate 180 degrees
(3): Rotate clockwise 90 degrees
Get sensor orientation:
gso
Set sensor mode:
smo: e.g., smo:1
Get sensor mode:
gsmo
Set Whitebalance Mode:
wb:
(0): off
(1): auto
(2): incandescent
(3): fluorescent
(4): warm-fluorescent
(5): daylight
(6): cloudy-daylight
(7): twilight
(8): shade
(9): manual
Get Whitebalance Mode:
gwb
Set Saturation (0 to 2):
st: e.g., st:1.25
Get Saturation:
gst
Set Exposure Compensation (-2 to 2):
ec: e.g., ec:-2
Get Exposure Compensation:
gec
Set Auto Whitebalance Lock:
awbl: e.g., awbl:0
Get Auto Whitebalance Lock:
awbl
Set Auto Exposure Lock:
ael: e.g., ael:0
Get Auto Exposure Lock:
gael
Set TNR Mode:
tnrm: e.g., tnrm:1
(0): OFF
(1): FAST
(2): HIGH QUALITY
Get TNR Mode:
gtnrm
Set TNR Strength (-1 to 1):
tnrs: e.g., tnrs:0.5
Get TNR Strength:
gtnrs
Set EE Mode:
eem: e.g., eem:1
(0): OFF
(1): FAST
(2): HIGH QUALITY
Get EE Mode:
geem
Set EE Strength (-1 to 1):
ees: e.g., ees:0.5
Get EE Strength:
gees
Set Auto Exposure Anti-Banding (0 to 3):
aeab: e.g., aeab:2
(0): OFF
(1): MODE AUTO
(2): MODE 50HZ
(3): MODE 60HZ
Get Auto Exposure Anti-Banding:
gaeab
Set Gain Range:
gr: e.g., gr:1 16
Get Gain Range:
ggr
Set Exposure Time Range:
etr: e.g., etr:34000 35000
Get Exposure Time Range:
getr
Set ISP Digital Gain Range:
dgr: e.g., dgr:2 152
Get ISP Digital Gain Range:
gdgr
Capture: enter ‘j’ OR
followed by a timer (e.g., jx5000, capture after 5 seconds) OR
followed by multishot count (e.g., j:6, capture 6 images)
timer/multihot values are optional, capture defaults to single shot with timer=0s
Start Recording : enter ‘1’
Stop Recording : enter ‘0’
Video snapshot : enter ‘2’ (While recording video)
Get Preview Resolution:
gpcr
Get Image Capture Resolution:
gicr
Get Video Capture Resolution:
gvcr
Runtime encoder configuration options:
Set Encoding Bit-rate(in bytes):
br: e.g., br:4000000
Get Encoding Bit-rate(in bytes):
gbr
Set Encoding Profile(only for H.264):
ep: e.g., ep:1
(0): Baseline
(1): Main
(2): High
Get Encoding Profile(only for H.264):
gep
Force IDR Frame on video Encoder(only for H.264):
Enter ‘f’
bitrate = 4000000
Encoder Profile = High
Encoder control-rate = 1
Encoder EnableTwopassCBR = 0
Opening in BLOCKING MODE
** Message: 20:49:00.681: main:4674 iterating capture loop …
NvMMLiteOpen : Block : BlockType = 4
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected…
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3264 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 3264 x 1848 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 1640 x 1232 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 1280 x 720 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 1280 x 720 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 5
Output Stream W = 1280 H = 720
seconds to Run = 0
Frame Rate = 120.000005
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
ERROR on bus: by /GstPipeline:capture_native_pipeline/GstBin:cap_bin/GstNvArgusCameraSrc:nvarguscamerasrc0: CANCELLED
debug info:
Argus Error Status
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
nvbuf_utils: Can not get HW buffer from FD… Exiting…
CONSUMER: ERROR OCCURRED

I get this error message then the jetson shutdowns…
when I tried using
video-viewer v4l2:///dev/video0
I got this error

[gstreamer] initialized gstreamer, version 1.14.5.0
[gstreamer] gstCamera – attempting to create device v4l2:///dev/video0
(video-viewer:6822): GStreamer-CRITICAL **: 20:28:32.046: gst_element_message_full_with_details: assertion ‘GST_IS_ELEMENT (element)’ failed
(video-viewer:6822): GStreamer-CRITICAL **: 20:28:32.047: gst_element_message_full_with_details: assertion ‘GST_IS_ELEMENT (element)’ failed
[gstreamer] gstCamera – didn’t discover any v4l2 devices
[gstreamer] gstCamera – device discovery failed, but /dev/video0 exists
[gstreamer] support for compressed formats is disabled
[gstreamer] gstCamera pipeline string:
[gstreamer] v4l2src device=/dev/video0 do-timestamp=true ! appsink name=mysink
[gstreamer] gstCamera successfully created device v4l2:///dev/video0
[video] created gstCamera from v4l2:///dev/video0
gstCamera video options:
– URI: v4l2:///dev/video0
- protocol: v4l2
- location: /dev/video0
– deviceType: v4l2
– ioType: input
– codec: unknown
– width: 1280
– height: 720
– frameRate: 30.000000
– bitRate: 0
– numBuffers: 4
– zeroCopy: true
– flipMethod: none
– loop: 0
– rtspLatency 2000
[OpenGL] failed to open X11 server connection.
[OpenGL] failed to create X11 Window.
video-viewer: failed to create output stream
[gstreamer] opening gstCamera for streaming, transitioning pipeline to GST_STATE_PLAYING
[gstreamer] gstreamer changed state from NULL to READY ==> mysink
[gstreamer] gstreamer changed state from NULL to READY ==> v4l2src0
[gstreamer] gstreamer changed state from NULL to READY ==> pipeline0
[gstreamer] gstreamer stream status CREATE ==> src
[gstreamer] gstreamer changed state from READY to PAUSED ==> v4l2src0
[gstreamer] gstreamer changed state from READY to PAUSED ==> pipeline0
[gstreamer] gstreamer message new-clock ==> pipeline0
[gstreamer] gstreamer stream status ENTER ==> src
[gstreamer] gstreamer changed state from PAUSED to PLAYING ==> v4l2src0
[gstreamer] gstreamer message stream-start ==> pipeline0
[gstreamer] gstCamera – end of stream (EOS)
[gstreamer] gstreamer v4l2src0 ERROR Internal data stream error.
[gstreamer] gstreamer Debugging info: gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
[gstreamer] gstreamer changed state from READY to PAUSED ==> mysink
[gstreamer] gstDecoder – failed to retrieve next image buffer
video-viewer: failed to capture video frame
[gstreamer] gstDecoder – failed to retrieve next image buffer
video-viewer: failed to capture video frame
[gstreamer] gstDecoder – failed to retrieve next image buffer
video-viewer: failed to capture video frame
[gstreamer] gstDecoder – failed to retrieve next image buffer
video-viewer: failed to capture video frame

when I captured using v4l2-ctl the raw image was zero.

here’s details of the camera using v4l2-ctl --all

Driver Info (not using libv4l2):
Driver name : tegra-video
Card type : vi-output, imx219 6-0010
Bus info : platform:54080000.vi:0
Driver version: 4.9.253
Capabilities : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
Priority: 2
Video input : 0 (Camera 0: no power)
Format Video Capture:
Width/Height : 3264/2464
Pixel Format : ‘RG10’
Field : None
Bytes per Line : 6528
Size Image : 16084992
Colorspace : sRGB
Transfer Function : Default (maps to sRGB)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Full Range)
Flags :
Camera Controls
group_hold 0x009a2003 (bool) : default=0 value=0 flags=execute-on-write
sensor_mode 0x009a2008 (int64) : min=0 max=0 step=0 default=0 value=0 flags=slider
gain 0x009a2009 (int64) : min=0 max=0 step=0 default=0 value=16 flags=slider
exposure 0x009a200a (int64) : min=0 max=0 step=0 default=0 value=13 flags=slider
frame_rate 0x009a200b (int64) : min=0 max=0 step=0 default=0 value=2000000 flags=slider
bypass_mode 0x009a2064 (intmenu): min=0 max=1 default=0 value=0
override_enable 0x009a2065 (intmenu): min=0 max=1 default=0 value=0
height_align 0x009a2066 (int) : min=1 max=16 step=1 default=1 value=1
size_align 0x009a2067 (intmenu): min=0 max=2 default=0 value=0
write_isp_format 0x009a2068 (bool) : default=0 value=0
sensor_signal_properties 0x009a2069 (u32) : min=0 max=0 step=0 default=0 flags=read-only, has-payload
sensor_image_properties 0x009a206a (u32) : min=0 max=0 step=0 default=0 flags=read-only, has-payload
sensor_control_properties 0x009a206b (u32) : min=0 max=0 step=0 default=0 flags=read-only, has-payload
sensor_dv_timings 0x009a206c (u32) : min=0 max=0 step=0 default=0 flags=read-only, has-payload
low_latency_mode 0x009a206d (bool) : default=0 value=0
preferred_stride 0x009a206e (int) : min=0 max=65535 step=1 default=0 value=0
sensor_modes 0x009a2082 (int) : min=0 max=30 step=1 default=30 value=6 flags=read-only

I followed every thread about this but none worked for me. Please someone help
{I’m drowning}

Have a check with below command to make sure the sensor driver/HW without problem.

v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap

When I used that command nothing shows up.

and here’s terminal log of dmesg | grep -iw -e imx219 -e vi :

[ 0.425951] iommu: Adding device 54080000.vi to group 11
[ 1.264756] imx219 6-0010: tegracam sensor driver:imx219_v2.0.6
[ 1.441457] vi 54080000.vi: vi_probe: ++
[ 1.444707] vi 54080000.vi: initialized
[ 1.446725] vi 54080000.vi: subdev nvcsi–1 bound
[ 1.446741] vi 54080000.vi: subdev imx219 6-0010 bound
[ 183.064956] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 0
[ 183.111603] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 1
[ 183.159475] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 2
[ 183.206014] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 3
[ 183.253617] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 4
[ 183.300399] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 5
[ 183.347895] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 6
[ 183.395282] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 7
[ 183.442484] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 8
[ 183.489930] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 9
[ 183.536835] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 10
[ 183.584279] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 11
[ 183.631237] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 12
[ 183.678501] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 13
[ 183.725954] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 14
[ 183.772834] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 15
[ 183.820032] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 16
[ 183.867491] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 17
[ 183.915148] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 18

Well, that tell you sensor board have problem to capture data from sensor.

is there something else I could try or is it purely HW problem ?
edit: I flashed a new image into the SD card when I run dmesg | grep -iw -e imx219 -e vi I no longer get the tegra channel error

[ 0.425228] iommu: Adding device 54080000.vi to group 11
[ 1.249357] imx219 6-0010: tegracam sensor driver:imx219_v2.0.6
[ 1.433203] vi 54080000.vi: vi_probe: ++
[ 1.436355] vi 54080000.vi: initialized
[ 1.438392] vi 54080000.vi: subdev nvcsi–1 bound
[ 1.438408] vi 54080000.vi: subdev imx219 6-0010 bound

But still when I run the command suggested by you nothing happens

Still the same error from dmesg after run the command?
Maybe check the cable or any others module can change to verify the problem?

when I run dmesg | grep -iw -e imx219 -e vi I no longer get the :
[ 183.064956] vi 54080000.vi: tegra_channel_error_status:error 4000 frame 0 but the camera still doesn’t work.
and sadly can’t check the ribbon with other modules :(