Arducam IMX519 camera not accessible after install_full.sh on Jetson Nano JetPack 4.6

Hi everyone. I’m trying to get an Arducam IMX519 (B0371) working on a Jetson Nano dev board (P3450 with the P3448 module), running JetPack 4.6 (also tried 4.6.1). /etc/nv_tegra_release shows:

R32 (release), REVISION: 7.1, GCID: 29818004, BOARD: t210ref, EABI: aarch64, DATE: Sat Feb 19 17:05:08 UTC 2022

nvidia-jetpack has been at 4.6.4-b39, 4.6.3-b17, 4.6.2-b5, and 4.6.1-b110 at various points. I have two IMX519 MIPI modules connected to the original B01 carrier.

I followed the standard Arducam install:
wget https://github.com/ArduCAM/MIPI_Camera/releases/download/v0.0.3/install_full.sh
./install_full.sh -m imx519

During install I hit this:
Setting up arducam-nvidia-l4t-kernel (4.9.253-tegra-32.7.1-20220518065147) …
An unknown error occurred while installing dtoverlays.
dpkg: error processing package arducam-nvidia-l4t-kernel (–configure):
installed arducam-nvidia-l4t-kernel package post-installation script subprocess returned error exit status 255

After that there’s no camera access at all, and I assumed the driver was installed incorrectly. I’ve attached arducam-bug-report.txt with the full environment.

Thanks, that helps. Let’s first verify whether the camera device nodes exist and what nvarguscamerasrc says. Can you run:

ls /dev/video*

and then the nvarguscamerasrc pipeline you normally use? Paste the output.

Sure.

nano@ubuntu:~/MIPI$ ls /dev/video*
ls: cannot access ‘/dev/video*’: No such file or directory

Then I tested nvarguscamerasrc before doing any extra config:
gst-launch-1.0 nvarguscamerasrc aelock=true exposuretimerange=‘10000 10000’ ! capsfilter caps=‘video/x-raw(memory:NVMM),width=(int)1920,height=(int)1080,format=(string)NV12,framerate=(fraction)30/1’ ! nvvidconv flip-method=2 ! nvoverlaysink -e

Output:
nvbuf_utils: Could not get EGL display connection
GST_ARGUS: NvArgusCameraSrc: Setting Exposure Time Range : 10000 10000
GST_ARGUS: Invalid Exposure Time Range Input
Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Setting pipeline to PLAYING …
New clock: GstSystemClock
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:740 No cameras available
Got EOS from element “pipeline0”.
Execution ended after 0:00:00.002103965

There’s a step that isn’t in the manual. Run:

/opt/arducam/jetson-io/config-by-hardware.py

That should apply the camera config and bring the devices back. Run it, then re-test nvarguscamerasrc.

That did it - the IMX519 is accessible now. With both modules on the B01 board I can get both images from nvarguscamerasrc using sensor_id=0 and sensor_id=1.

But focus can only be controlled on camera id=0. The second module isn’t visible on the I2C bus, and python FocuserExample.py -i 8 doesn’t work for it.

Also, after a restart the I2C address 0x0c isn’t present until I run FocusExample.py -i 7, then it shows up.

That I2C behavior is expected: the focus motor has to be powered up before the camera shows up at 0x0c. It isn’t specific to the focus example - any command that powers the motor will make it appear, which is why -i 7 wakes it up. For the second module on the cam1 CSI interface, you need to make sure you’re driving sensor_id=1.

Right, so how do I point the focus example at cam1? The default example only seems to hit sensor_id 0 / cam0.

Copy the Jetson_IMX519_Focus_Example folder to a new folder named Jetson_IMX519_Focus_Example_cam1. In that copy, edit JetsonCamera.py and change the default nvarguscamerasrc to nvarguscamerasrc sensor_id=1 (the default selects sensor_id 0 / cam0). Then open a new terminal, cd into Jetson_IMX519_Focus_Example_cam1, and run:

python FocuserExample.py -i 8

Thanks, the focus side works now on cam1.

Separately, I was trying the v4l2src path instead of nvarguscamerasrc and it won’t link.

v4l2-ctl --list-formats-ext gives:
ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: ‘RG10’
Name : 10-bit Bayer RGRG/GBGB
Size: Discrete 4656x3496
Interval: Discrete 0.100s (10.000 fps)
Size: Discrete 3840x2160
Interval: Discrete 0.048s (21.000 fps)
Size: Discrete 1920x1080
Interval: Discrete 0.017s (60.000 fps)
Size: Discrete 1280x720
Interval: Discrete 0.008s (120.000 fps)

This pipeline:
gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=RG10,width=1920,height=1080 ! nvvidconv ! ‘video/x-raw(memory:NVMM), format=(string)I420’ ! omxh264enc profile=high cabac-entropy-coding=true insert-sps-pps=true iframeinterval=60 ! ‘video/x-h264, level=(string)4.2, stream-format=(string)byte-stream’ ! tcpserversink host=0.0.0.0 port=5001 -v

fails with:
nvbuf_utils: Could not get EGL display connection
WARNING: erroneous pipeline: could not link v4l2src0 to nvvconv0, neither element can handle caps video/x-raw, format=(string)RG10, width=(int)1920, height=(int)1080

And this one also fails:
gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw, format=RG10, width=1920, height=1080 ! videoconvert ! xvimagesink
WARNING: erroneous pipeline: could not link v4l2src0 to videoconvert0, neither element can handle caps video/x-raw, format=(string)RG10, width=(int)1920, height=(int)1080

Right - the IMX519 exposes RG10 raw Bayer via v4l2, and neither nvvidconv nor videoconvert can handle RG10, so those pipelines fail. Use nvarguscamerasrc for this camera; the v4l2src path isn’t supported here.

One thing I want to double-check: that dtoverlays message from the install (“An unknown error occurred while installing dtoverlays” with dpkg exit 255) - was that actually a failed install? I’ve been assuming the driver went in wrong because of it.

No, that message is not an actual failure. The package post-install script emits the dtoverlays line, but the camera is detected fine and the driver installation completes without errors. If you see the devices after running config-by-hardware.py and nvarguscamerasrc finds the cameras, the driver is good.

Understood. I also need to run this IMX519 with my own customized kernel Image, so I need the sources to compile the driver into that kernel. Is that available?

I’ve sent the IMX519 driver source code package through private message - check your inbox. You can use it as a reference for integrating into your custom kernel build.

For camera parameter control, you can also use v4l2-ctl. List all controls with:
v4l2-ctl -l
Set one with:
v4l2-ctl -c <control_name>=value
Note that saturation/brightness/contrast are post-ISP controls, so they won’t be present in the raw image.

Thanks, that covers it. Everything is working on my side now with nvarguscamerasrc.

Glad it’s sorted. For anyone hitting the same thing, the working summary is:

  1. Install the driver:
    wget https://github.com/ArduCAM/MIPI_Camera/releases/download/v0.0.3/install_full.sh
    ./install_full.sh -m imx519

  2. If the camera isn’t accessible after install, run:
    /opt/arducam/jetson-io/config-by-hardware.py

  3. For the cam1 CSI interface, copy Jetson_IMX519_Focus_Example to Jetson_IMX519_Focus_Example_cam1, set nvarguscamerasrc sensor_id=1 in JetsonCamera.py, then run python FocuserExample.py -i 8.

  4. Use nvarguscamerasrc, not v4l2src - RG10 won’t link to nvvidconv/videoconvert.

  5. The focus motor must be powered before the camera appears on I2C at 0x0c.

  6. Camera controls: v4l2-ctl -l to list, v4l2-ctl -c <control_name>=value to set (saturation/brightness/contrast are post-ISP and won’t appear in raw).

The IMX519 driver source is available from Arducam for custom kernel integration.