NVIDIA Jetson Orin Nano - Camera Sensors Support - IMX219

From RidgeRun Developer Connection
Jump to: navigation, search



  Index  


Nvidia-preferred-partner-badge-rgb-for-screen.png




The IMX219 sensor over the Raspberry Pi Camera V2.1 board is compatible with the Jetson Orin Nano and the official developer kit from NVIDIA, using a cable adapter to convert the 15-pin MIPI CSI output of the camera module to the 22-pin MIPI CSI camera input of the Orin Nano. The converter can look like these ones:

Figure 1: Adapter cable Arducam 38mm 15 to 22 pin
Error creating thumbnail: Unable to save thumbnail to destination
Figure 2: Adapter module Compute Module camera adapter

This wiki was made during this release of NVIDIA software for Jetson Orin Nano:

  • JetPack: 5.1.1
  • Jetson LInux: 35.3.1

Out of the box, with a minor change, you can start capturing with one or both sensors. You may find out that if you connect the camera to the development board, the camera will be recognized by the kernel. You can check it by running the dmesg command and grepping the keyword “imx219”. You are gonna find the “bound” message for both ports (in case you have connected both cameras at the same time). But if you try to capture with any of the sensors, you will fall into an error.

[  694.226388] imx708 9-001a: tegracam sensor driver:imx708_v2.0.6
[  694.527906] tegra-camrtc-capture-vi tegra-capture-vi: subdev imx708 9-001a bound
[  694.529755] imx708 10-001a: tegracam sensor driver:imx708_v2.0.6
[  694.834263] tegra-camrtc-capture-vi tegra-capture-vi: subdev imx708 10-001a bound

For example, to check the video capabilities, you can run v4l2 command:

v4l2-ctl --all

After running the command, the process will be stuck without showing you any kind of information. You can stop this command using ctrl+c. And for further investigation, you can check the dmesg command using:

sudo dmesg -w

You will see the following error while you try to capture::

[  394.042165] bwmgr API not supported                                                                    
[  396.722887] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms                    
[  396.735648] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel               
[  396.745787] (NULL device *): vi_capture_control_message: NULL VI channel received                                    
[  396.753540] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0   
[  396.764228] (NULL device *): vi_capture_control_message: NULL VI channel received                                    
[  396.771968] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0    
[  396.782756] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel 

This is due to an error in the way how the device tree is being assigned for capturing purposes using the MIPI CSI lanes. The error falls into not being able to establish a connection through MIPI lanes, which is different from to established connection with the i2c which is the reason why you will not find any kind of error related to i2c during the "probe" stage while registering the driver.

To fix this error, you must run a Python script that comes with JetPack 5.1.1 under release L4T 35.3.1. The script can be executed using:

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

Then, a menu will appear, follow these instructions to reconfigure the ports in order to let the camera start streaming data:

-> Configure Jetson 24pin CSI Connector 
-> Configure for compatible hardware 
-> Camera IMX219 Dual 
-> Save pin changes 
-> Save and reboot to reconfigure pins

After the board is rebooted,if you try to run this v4l2 command

v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --stream-mmap --stream-count=300 -d /dev/video0

This command will start streaming from camera port 0 (cam0). If you want to check the camera port 1 (cam1), change the video source to video1 at the end of the command. After running the command you must see the next output in your terminal window:

<<<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<<<<<<<< 21.19 fps

If that's the case, congratulations! You have fixed the connection issue to the IMX219 camera sensor board!



  Index