CSI camera IMX219-160 IR doesn't work on Jetson orin Nano dev kit

Hi, I am trying to get my IMX219-160 IR camera to record a video stream on Jetson Orin Nano 8Gb for an object detection model. I’m currently working with JetPack 5.1.2. The camera is connected via MIPI CSI connector on the dev kit using a 15pin to 22pin CSI cable. I know that camera is functional because I was able to record video on an old Jetson Nano. But the camera doesn’t work on the Orin Nano.

Keep in mind I am a beginner when it comes to Jetson devkits.

All the following attempts have been made with jetsonI/O CSI settings to “IMX-219 Dual mode” in the menu accessible by the following terminal command:

 $ sudo /opt/nvidia/jetson-io/jetson-io.py

I tried using the opencv python library to capture footage. I have the following python script:

import cv2
camera = cv2.VideoCapture(0) 
print("videocapture")

success, image = camera.read()#check if the capture is successful and get camera image

if success:
	print("capture successful")
	cv2.imshow("image", image)#display the image 

camera.release()
cv2.destroyAllWindows()

I get the following error message:

[ WARN:0@10.076] global cap_v4l.cpp:1119 tryIoctl VIDEOIO(V4L2:/dev/video0): select() timeout.

I updated the cv2 package but I can’t seem to get the capture event to work right. I can’t figure out what this error means either.

I checked the device list through v4l2 with:

$ v4l2-ctl --list-devices

I can see the imx219 in the output:

NVIDIA Tegra Video Input Device (platform:tegra-camrtc-ca):
	/dev/media0

vi-output, imx219 9-0010 (platform:tegra-capture-vi:1):
	/dev/video0

I tried another approach by using a Gstreamer pipeline to connect to the camera.

I used to launch the camera on the old nano with the following terminal command :
$ gst-launch-1.0 nvarguscamerasrc sensor_id=0 ! nvoverlaysink

It doesn’t work anymore (nvoverlaysink was deprecated). I tried with nveglglessink but it didn’t work either:

  • nveglglessink:

input:
$ gst-launch-1.0 nvarguscamerasrc sensor_id=0 ! nveglglessink

output:

Setting pipeline to PAUSED ...

Using winsys: x11 
Pipeline is live and does not need PREROLL ...
Got context from element 'eglglessink0': gst.egl.EGLDisplay=context, display=(GstEGLDisplay)NULL;
Setting pipeline to PLAYING ...
New clock: GstSystemClock
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3280 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: 3280 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: Running with following settings:
   Camera index = 0 
   Camera mode  = 2 
   Output Stream W = 1920 H = 1080 
   seconds to Run    = 0 
   Frame Rate = 29,999999 
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadExecute:694 NvBufSurfaceFromFd Failed.
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:247 (propagating)
ERROR: from element /GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0: CANCELLED
Additional debug info:
Argus Error Status
Execution ended after 0:00:03.010078874
Setting pipeline to NULL ...
GST_ARGUS: Cleaning up
Freeing pipeline ...

(gst-launch-1.0:13931): GStreamer-WARNING **: 14:16:08.638: The default memory allocator was freed!

(gst-launch-1.0:13931): GStreamer-CRITICAL **: 14:16:08.639: gst_object_unref: assertion '((GObject *) object)->ref_count > 0' failed

I also tried by using v4l2 directly with the following command:
$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=3080,height=2464,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1 --stream-to=test.raw

When I run this the terminal just freezes and I don’t get any output.

If anyone has any idea what could be wrong I am open to any and all suggestions, any help would be greatly appreciated. Just keep in mind I am new to Jetson hardware.

Thank you.

Jad.

If v4l2-ctl unable to capture that tell the sensor HW or config have problem.
Please check the dmesg if any i2c error message.

Thanks

Hello and thank you for your help.
I tried running

sudo dmesg

First I got this error message:

[    2.288464] tegra_dc_assign_hw_data: no matching compatible node
[    2.294470] tegradccommon module_init failed
[    2.298738] tegradc module_init failed

We later got an error messages regarding I2c, here is a sample of the output:

[   16.170630] imx219 10-0010: tegracam sensor driver:imx219_v2.0.6
[   16.181453] imx219 10-0010: imx219_board_setup: error during i2c read probe (-121)
[   16.191165] fusb301 1-0025: toggle_time(0) is not updated
[   16.202280] fusb301 1-0025: fusb301_set_mode: mode (32)(32)
[   16.203152] fusb301 1-0025: fusb301_detach: type[0x00] chipstate[0x01]
[   16.203158] fusb301 1-0025: fusb_update_state: 1
[   16.205849] fusb301 1-0025: mode[0x20], host_cur[0x02], dttime[0x00]
[   16.210040] imx219 10-0010: board setup failed

Also note that we got the following error message even before the camera was plugged in :

[   16.181453] imx219 10-0010: imx219_board_setup: error during i2c read probe (-121)

Check if any error as “imx219 9-0010” ?
Looks like I2C working without problem due to your device address is “9-0010”, maybe reconnect the camera to try.

When I plug just this camera i don’t get an error message for “imx219 9-0010” but only for “imx219 10-0010”.

I tried plugging in both this camera and a raspberrypi camerav2 on the other CSI port and when I run “dmesg” I don’t get any i2c error message

Update: I was able to get the video feed on my screen by using the following pipeline:

gst-launch-1.0 nvarguscamerasrc sensor_id =0 ! 'video/x-raw(memory:NVMM), width=1280  ,height=720 , format=(string)NV12' ! nvvidconv ! nvegltransform ! nveglglessink

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.