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.
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.
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
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.
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:
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.
If the camera isn’t accessible after install, run:
/opt/arducam/jetson-io/config-by-hardware.py
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.
Use nvarguscamerasrc, not v4l2src - RG10 won’t link to nvvidconv/videoconvert.
The focus motor must be powered before the camera appears on I2C at 0x0c.
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.