Which Xavier NX Carrier board is truly compatible with RPi Pi Camera Module V2 (IMX 219)?

Hello,

I am looking find a Xavier NX carrier board that would be able to successfully connect to a Pi Camera Module V2 (Raspberry, with a IMX 219 sensor).

This camera works perfectly on the official developer kit (after a fix which is described in Issues with the CSI cameras attached to the Xavier NX - #28 by JerryChang )

However finding a compatible carrier board has proven difficult. We tried several, with no success.

Our most promising candidate is the Auvidea JNX 30 : JNX30 carrier for NVIDIA® Xavier NX™ – Auvidea .Its price is interesting, and the hardware ports seem compatible.

However the camera does not work out of the box with it. We have been in direct contact with auvidea concerning this, and they provided an update in december 2020, saying it would address this issue: see Firmware – Auvidea

However, based on our tests, it still does not work. A simple command like the one below will fail. We are still waiting for an answer on their side (since a few weeks).

gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! ‘video/x-raw(memory:NVMM),width=1280, height=720, framerate=30/1, format=NV12’ ! nvvidconv ! xvimagesink

So I have two questions:

  • Did anyone succeed to get the Pi camera Module V2 to work on the Auvidea JNX 30 Board?
  • And more generally, can someone advise me on a low cost carrier board that would support this camera for the Xavier NX?

Thanks!

hello pthomet,

  1. please gather the failure messages for reference, you may check kernel (i.e. $ dmesg) and system level logs (i.e. $ cat /var/log/syslog) for details.
  2. please also check Jetson Ecosystem page, there’re Jetson Preferred Partners that provide camera solutions. thanks

Hello @JerryChang

Thanks for your answer.
Here are some more details on the failure:

The full log is available here:
logs_xavier_imx219_auvidea_jnx30.tgz (89.3 KB)

Below some interesting parts I tried to extract from those logs:

1/ Device detection via v4l2-ctl:

The camera seems to be correctly detected according to v4l2-ctl --list-devices:

v4l2-ctl --list-devices
vi-output, imx219 10-0010 (platform:15c10000.vi:2):
    /dev/video0

2/ Acquisition via gst:

When I run the acquisition via gstreamer, no video frames are shown there (but an empty window is opened). I need to to stop via Ctrl-C.

Full log:

gst-launch-1.0 nvarguscamerasrc sensor-id=0  ! 'video/x-raw(memory:NVMM),width=320, height=240, framerate=30/1, format=NV12' ! nvvidconv ! xvimagesink 
    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    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: 3264 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: 3264 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  = 4 
    Output Stream W = 1280 H = 720 
    seconds to Run    = 0 
    Frame Rate = 59,999999 
    GST_ARGUS: Setup Complete, Starting captures for 0 seconds
    GST_ARGUS: Starting repeat capture requests.
    CONSUMER: Producer has connected; continuing.
                                                            // No video frames are produced / shown there:
                                                            // an empty window is opened, that is all
                                                            // I need to to stop via Ctrl-C   
    ^Chandling interrupt.
    Interrupt: Stopping pipeline ...
    Execution ended after 0:00:06.748892482
    Setting pipeline to PAUSED ...
    Setting pipeline to READY ...
    ^C

3/ dmesg:
Here are the relevant output of dmesg before I run gst-launch

[    1.920346] i2c /dev entries driver
[    1.922742] i2c i2c-2: Added multiplexed i2c bus 9
[    1.923342] i2c i2c-2: Added multiplexed i2c bus 10
[    1.923352] i2c-mux-gpio cam_i2cmux: 2 port mux on 3180000.i2c adapter
[    1.923948] imx219 9-0010: tegracam sensor driver:imx219_v2.0.6
[    1.947459] tegra-i2c 3180000.i2c: no acknowledge from address 0x10
[    1.947519] imx219 9-0010: imx219_board_setup: error during i2c read probe (-121)
[    1.947566] imx219 9-0010: board setup failed
[    1.947667] imx219: probe of 9-0010 failed with error -121
[    1.948120] imx219 10-0010: tegracam sensor driver:imx219_v2.0.6
[    1.973636] max77620-power max20024-power: Event recorder REG_NVERC : 0x0
[    1.980369] tegra-thermal-throttle bthrot_cdev: clk:cpu max:1907200000, min:115200000 steps:24
[    1.984515] tegra-thermal-throttle bthrot_cdev: clk:gpu max:1109250000, min:114750000 steps:10

After I run gst-launch, some lines are added:

[  117.735378] [RCE] WARNING: t194/isp5.c:901 [config_channel] "All error notifications not enabled: correctable=0x00 uncorrectable=0x00"
[  118.307326] [RCE] vi5_hwinit: firmware CL2018101701 protocol version 2.2
[  120.251375] fence timeout on [ffffffc174da1b40] after 1500ms
[  120.251390] name=[nvhost_sync:37], current value=0 waiting value=1
[  120.251426] ---- mlocks ----
[  120.251448] tegra194-vi5 15c10000.vi: no reply from camera processor
[  120.251475] ---- syncpts ----
[  120.251488] id 2 (disp_a) min 700 max 700 refs 1 (previous client : )
[  120.251493] id 3 (disp_b) min 2 max 2 refs 1 (previous client : )

4/ Syslog:
Relevant extracts from /var/log/syslog:

Jan 13 16:53:58 xaviernx kernel: [    1.960320] tegra_rtc c2a0000.rtc: Tegra internal Real Time Clock
Jan 13 16:53:58 xaviernx kernel: [    1.960431] i2c /dev entries driver
Jan 13 16:53:58 xaviernx kernel: [    1.962542] i2c i2c-2: Added multiplexed i2c bus 9
Jan 13 16:53:58 xaviernx kernel: [    1.962904] i2c i2c-2: Added multiplexed i2c bus 10
Jan 13 16:53:58 xaviernx kernel: [    1.962913] i2c-mux-gpio cam_i2cmux: 2 port mux on 3180000.i2c adapter
Jan 13 16:53:58 xaviernx kernel: [    1.963497] imx219 9-0010: tegracam sensor driver:imx219_v2.0.6
Jan 13 16:53:58 xaviernx kernel: [    1.986961] tegra-i2c 3180000.i2c: no acknowledge from address 0x10
Jan 13 16:53:58 xaviernx kernel: [    1.987024] imx219 9-0010: imx219_board_setup: error during i2c read probe (-121)
Jan 13 16:53:58 xaviernx kernel: [    1.987319] imx219 9-0010: board setup failed
Jan 13 16:53:58 xaviernx kernel: [    1.987570] imx219: probe of 9-0010 failed with error -121
Jan 13 16:53:58 xaviernx kernel: [    1.988033] imx219 10-0010: tegracam sensor driver:imx219_v2.0.6
Jan 13 16:53:58 xaviernx kernel: [    2.013309] max77620-power max20024-power: Event recorder REG_NVERC : 0x0

..... Later...

Jan 13 16:53:58 xaviernx kernel: [    3.302549] tegra194-isp5 14800000.isp: initialized
Jan 13 16:53:58 xaviernx kernel: [    3.309444] tegra194-vi5 15c10000.vi: using default number of vi channels, 36
Jan 13 16:53:58 xaviernx kernel: [    3.312744] tegra194-vi5 15c10000.vi: initialized
Jan 13 16:53:58 xaviernx kernel: [    3.317259] tegra194-vi5 15c10000.vi: subdev 15a00000.nvcsi--2 bound
Jan 13 16:53:58 xaviernx kernel: [    3.317337] tegra194-vi5 15c10000.vi: subdev imx219 10-0010 bound
Jan 13 16:53:58 xaviernx kernel: [    3.317344] tegra194-vi5 15c10000.vi: subdev 15a00000.nvcsi--1 bound
Jan 13 16:53:58 xaviernx kernel: [    3.319115] tegra186-cam-rtcpu bc00000.rtcpu: Trace buffer configured at IOVA=0xbff00000
Jan 13 16:53:58 xaviernx kernel: [    3.402735] tegra-ivc ivc-bc00000.rtcpu: region 0: iova=0xbfee0000-0xbfefffff size=131072

hello pthomet,

by default kernel driver looking for two IMX219 camera devices.
there’s i2c no acknowledge failure for imx219 9-0010; then, you had imx219 10-0010 register to linux kernel as video node.
so, you may ignore first part of kernel failures.
please also refer to below,

[    1.928634] i2c i2c-2: Added multiplexed i2c bus 9
[    1.929714] imx219 9-0010: tegracam sensor driver:imx219_v2.0.6
[    1.953237] tegra-i2c 3180000.i2c: no acknowledge from address 0x10
[    1.953487] imx219: probe of 9-0010 failed with error -121
...
[    1.929108] i2c i2c-2: Added multiplexed i2c bus 10
[    1.953947] imx219 10-0010: tegracam sensor driver:imx219_v2.0.6
[    3.310422] tegra194-vi5 15c10000.vi: subdev imx219 10-0010 bound

below shows the actual failure while you enable the camera sensor for streaming,
it’s VI engine waiting till timeout and report a failure.

[  127.148219] [RCE] WARNING: t194/isp5.c:901 [config_channel] "All error notifications not enabled: correctable=0x00 uncorrectable=0x00"
[  127.656210] [RCE] vi5_hwinit: firmware CL2018101701 protocol version 2.2
[  129.548220] tegra194-vi5 15c10000.vi: no reply from camera processor
[  129.548386] tegra194-vi5 15c10000.vi: vi capture get status failed
[  129.548880] fence timeout on [ffffffc1aee9fc00] after 1500ms

hence,
I’ve several suggestions for you to narrow down the issue,

  1. could you please refer to Applications Using V4L2 IOCTL Directly, by using V4L2 IOCTL to verify basic camera functionality.
  2. you may increase the wait time for the first frame after capture starts, please include set_mode_delay_ms DT property into your sensor mode. please check Sensor Software Driver Programming Guide for reference.
  3. you may also check Debugging Tips session to examine your sensor driver. thanks

Hi @JerryChang

Many thanks for your advices.

A basic camera functionality test like this produces an empty ov5693.raw file:

v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --stream-mmap --stream-count=1 -d /dev/video0 --stream-to=ov5693.raw 

The attempt below also gave me an empty “test.mp4” file:

gst-launch-1.0 v4l2src num-buffers=200 device=/dev/video0 ! 'video/x-raw, format=YUY2, width=640, height=480, framerate=30/1' ! videoconvert ! omxh264enc ! qtmux ! filesink location=test.mp4 -ev
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3055): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

After that, I tried to start the nvargus-daemon manually, like so:

Step 1: stop and start manually the dameon:

$ sudo service nvargus-daemon stop
$ sudo enableCamInfiniteTimeout=1 nvargus-daemon

Step 2: run gst-launch:

gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! ‘video/x-raw(memory:NVMM),width=1280, height=720, framerate=30/1, format=NV12’ ! nvvidconv ! xvimagesink

Step 3: read the nvargus-daemon output:

=== NVIDIA Libargus Camera Service (0.97.3)=== Listening for connections...=== gst-launch-1.0[11876]: Connection established (7F846281D0)OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module0
OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module1
OFParserGetVirtualDevice: NVIDIA Camera virtual enumerator not found in proc device-tree
---- imager: No override file found. ----
(NvCamV4l2) Error ModuleNotPresent: V4L2Device not available (in /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function findDevice(), line 256)
(NvCamV4l2) Error ModuleNotPresent:  (propagating from /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function initialize(), line 60)
(NvOdmDevice) Error ModuleNotPresent:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function initialize(), line 106)
NvPclDriverInitializeData: Unable to initialize driver v4l2_sensor
NvPclInitializeDrivers: error: Failed to init camera sub module v4l2_sensor
NvPclStartPlatformDrivers: Failed to start module drivers
NvPclStateControllerOpen: Failed ImagerGUID 1. (error 0xA000E)
NvPclOpen: PCL Open Failed. Error: 0xf
SCF: Error BadParameter: Sensor could not be opened. (in src/services/capture/CaptureServiceDeviceSensor.cpp, function getSourceFromGuid(), line 582)
SCF: Error BadParameter:  (propagating from src/services/capture/CaptureService.cpp, function addSourceByGuid(), line 437)
SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function addSourceByIndex(), line 295)
SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function getSource(), line 458)
Acquiring SCF Camera device source via index 0 has failed. ---- imager: No override file found. ----
LSC: LSC surface is not based on full res!
=== gst-launch-1.0[11876]: CameraProvider initialized (0x7f7c83be70)LSC: LSC surface is not based on full res!
=== gst-launch-1.0[11876]: Connection closed (7F846281D0)=== gst-launch-1.0[11876]: WARNING: CameraProvider was not destroyed before client connection terminated.=== gst-launch-1.0[11876]:          The client may have abnormally terminated. Destroying CameraProvider...=== gst-launch-1.0[11876]: CameraProvider destroyed (0x7f7c83be70)=== gst-launch-1.0[11876]: WARNING: Cleaning up 1 outstanding requests...=== gst-launch-1.0[11876]: WARNING: Cleaning up 1 outstanding streams...SCF: Error InvalidState: 2 buffers still pending during EGLStreamProducer destruction (propagating from src/services/gl/EGLStreamProducer.cpp, function freeBuffers(), line 306)
SCF: Error InvalidState:  (propagating from src/services/gl/EGLStreamProducer.cpp, function ~EGLStreamProducer(), line 50)
=== gst-launch-1.0[11876]: WARNING: Cleaning up 1 outstanding stream settings...=== gst-launch-1.0[11876]: WARNING: Cleaning up 1 outstanding sessions...

Concerning your advice to investigate set_mode_delay_ms, I think this requires more knowledge than I have, since it involves to be able to deal with the camera driver development itself. This is not a domain where I am proficient.

Also, I do not have access to the source of the driver, since my contact at Auvidea told me they would be working on this driver. They provided us with a firmware update that was supposed to do exactly that at. However, the firmware update did not solve the issue, and I did not yet get any answer from them to my emails after I wrote them about this on Dec 12th.

Many thanks!

hello pthomet,

  1. you may enable a terminal and check whether there’s any suspect kernel failures (i.e. $ dmesg --follow) while capture raw files with v4l2 standard controls.
    please check the sensor modes with $ v4l2-ctl -d /dev/video0 --list-formats-ext, please do specify the width, height, and pixel format as same as your sensor supporte into command line for validation. you may also do increase --stream-count for issue more frame capture. sometimes, 1st coming stream shows empty frames (all zero) in the beginning of stream.

  2. please note that, v4l2src only works with YUV or USB camera sensors. since RPi Camera module/ IMX219 is one of bayer sensor. you should enable the camera stream with nvarguscamerasrc.
    please refer to Applications Using GStreamer with the nvarguscamerasrc Plugin for sample commands.

  3. please contact with Jetson Preferred Partners to understand the workable firmware with the JetPack/L4T release version; for example, you may check release tag, $ cat /etc/nv_tegra_release for the L4T release version on your target.