Troubleshooting IMX219 camera for Jetson Nano

Install the video 4 linux utils

sudo apt-get install v4l-utils

Run the command v4l2-ctl to check the device. It should show this output.

jetbot@jetbot:~$ v4l2-ctl --list-devices
vi-output, imx219 6-0010 (platform:54080000.vi:0):
/dev/video0

Further check using v4l2-ctl. This command must be run on a local terminal (not a remote terminal via SSH). Something like this should output

nvidia@nvidia:~$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=300
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.03 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.02 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<

Finally, run this command and the live stream window should pop up:

gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM),width=3820, height=2464, framerate=21/1, format=NV12' ! nvvidconv flip-method=0 ! 'video/x-raw,width=960, height=616' ! nvvidconv ! nvegltransform ! nveglglessink -e

If this does not work, try rebooting the nano and make sure the power supply is sufficient. Sometimes when the nano is too busy this command will fail. One time I tried to test a completely ok camera when the nano is too busy, it fails.

Credit:

  1. Nvidia Nano IMX219 camera messages
  2. Getting Your Camera Working on the Nvidia Nano

Written by

Love Self-driving technology and machine learning. Community leader in DIYRobocar Hong Kong.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store