1MP*4 Quadrascopic Monochrome Camera - VIDIOC_STREAMON: Invalid argument

  1. Where did you get the camera module(s)?
    uctronics.com

  2. Model number of the product(s)?
    Arducam 1MP*4 Quadrascopic Monochrome Camera Bundle Kit

  3. What hardware/platform were you working on?
    Jetson NX

$ uname -a
Linux jetson-nx 4.9.201-tegra #3 SMP PREEMPT Tue Jan 26 13:18:57 CST 2021 aarch64 aarch64 aarch64 GNU/Linux
$ cat /etc/nv_tegra_release
 R32 (release), REVISION: 5.0, GCID: 25531747, BOARD: t186ref, EABI: aarch64, DATE: Fri Jan 15 23:21:05 UTC 2021
  1. Instructions you have followed. (link/manual/etc.)
  1. Problems you were having?
python3 arducam_displayer.py -f GREY --width 5120 --height 800 -d 0
Firmware Version: 3
Sensor ID: 0x9281
Serial Number: 0xADAF455F
VIDIOC_STREAMON: Invalid argument
Traceback (most recent call last):
  File "arducam_displayer.py", line 115, in <module>
    display(cap, arducam_utils, args.fps)
  File "arducam_displayer.py", line 35, in display
    frame = resize(frame, 1280.0)
  File "arducam_displayer.py", line 13, in resize
    width = frame.shape[1]
AttributeError: 'NoneType' object has no attribute 'shape'

The green LED flush during executing this command.

  1. The dmesg log from your hardware?
dmesg | grep ardu

[    0.442344] DTS File Name: /home/wong/Jetson/l4t-32.5.0-NX/Linux_for_Tegra/source/public/kernel_src/kernel/kernel-4.9/arch/arm64/boot/dts/../../../../../../hardware/nvidia/platform/t19x/jakku/kernel-dts/tegra194-p3668-all-p3509-0000-arducam.dts
[    0.705413] DTS File Name: /home/wong/Jetson/l4t-32.5.0-NX/Linux_for_Tegra/source/public/kernel_src/kernel/kernel-4.9/arch/arm64/boot/dts/../../../../../../hardware/nvidia/platform/t19x/jakku/kernel-dts/tegra194-p3668-all-p3509-0000-arducam.dts
[    2.052057] arducam-csi2: arducam_read: Reading register 0x103 failed
[    2.052231] arducam-csi2 9-000c: probe failed
[    2.052359] arducam-csi2 9-000c: Failed to setup board.
[    2.076588] arducam-csi2 10-000c: firmware version: 3
[    2.076857] arducam-csi2 10-000c: Sensor ID: 0x0000
[    2.122260] arducam-csi2 10-000c: sensor arducam-csi2 10-000c registered
[    3.080354] tegra194-vi5 15c10000.vi: subdev arducam-csi2 10-000c bound
  1. Troubleshooting attempts you’ve made?
    I checked wiring. I tried Jetson4.4 and 4.6, but the result is same.

  2. What help do you need
    I need to get it working

Hi @KenToku

check this:

Have you tried this diagnostic step?

I failed to update firmware.
I tried on Jetson NX

sudo ./firmware_update -i 7 -m B0267_ov9281_four_in_one_single_channel_firmware
[ERROR] Failed to write register
[ERROR] Write checksum error, ret: -1

For NX you can try follow steps:

  1. unplug power of jetson and camera hat
  2. replug power
  3. execute this command before update firmware
sudo sh -c 'echo 50000 > /sys/bus/i2c/devices/i2c-0/bus_clk_rate'
sudo sh -c 'echo 50000 > /sys/bus/i2c/devices/i2c-1/bus_clk_rate'
  1. do update firmware

I tried these 4 steps. But result is same.

# 3. execute this command before update firmware
sudo sh -c 'echo 50000 > /sys/bus/i2c/devices/i2c-0/bus_clk_rate'
sudo sh -c 'echo 50000 > /sys/bus/i2c/devices/i2c-1/bus_clk_rate'
# 4. do update firmware
sudo ./firmware_update -i 7 -m B0267_ov9281_four_in_one_single_channel_firmware
[ERROR] Failed to write register
[ERROR] Write checksum error, ret: -1

Please use -i 10, you are using NX, there are some differences here.

sudo ./firmware_update -i 10 -m B0267_ov9281_four_in_one_single_channel_firmware

This is the result.

sudo sh -c 'echo 50000 > /sys/bus/i2c/devices/i2c-0/bus_clk_rate'
sudo sh -c 'echo 50000 > /sys/bus/i2c/devices/i2c-1/bus_clk_rate'
sudo ./firmware_update -i 10 -m B0267_ov9281_four_in_one_single_channel_firmware
[INFO] Write checksum.
[INFO] Write update flag.
[INFO] Sending... |                                                                               | ETA: 0h00m00s
[ERROR] Write firmware data failed, ret: -1, block: 0

It seems that the updater cannot be used on Xavier NX, do you have Nano for the update?

OK.Next week I can use Jetson Nano. I will report the results next week.

Thank you very much, and sorry for your bad experience.

I tried to update firmware and ran arducam_displayer.py on Jetson nano.
It worked. But there are some noise in images(red line area).

And I tried to ran arducam_displayer.py on Jetson NX after updating firmware.
The result is same.

python3 arducam_displayer.py -f GREY --width 5120 --height 800 -d 0
Firmware Version: 3
Sensor ID: 0x9281
Serial Number: 0xADAF455F
VIDIOC_STREAMON: Invalid argument
Traceback (most recent call last):
  File "arducam_displayer.py", line 115, in <module>
    display(cap, arducam_utils, args.fps)
  File "arducam_displayer.py", line 35, in display
    frame = resize(frame, 1280.0)
  File "arducam_displayer.py", line 13, in resize
    width = frame.shape[1]
AttributeError: 'NoneType' object has no attribute 'shape'

I expect it to work with Jetson NX on noise-free images. Is it difficult?

This seems to be a problem with HTS,
you can try to increase HTS while the camera is running, the steps are as follows:

  1. Get the current HTS
    python3 rw_sensor.py -r 0x380c 0x380d
  2. Increase HTS
    python3 rw_sensor.py -r 0x380c 0x380d -v 0x03 0xD8

I understand how to deal with noise.
Is there any way to get this to work with Jetson NX?

Jetson NX result:

python3 arducam_displayer.py -f GREY --width 5120 --height 800 -d 0
Firmware Version: 3
Sensor ID: 0x9281
Serial Number: 0xADAF455F
VIDIOC_STREAMON: Invalid argument
Traceback (most recent call last):
  File "arducam_displayer.py", line 115, in <module>
    display(cap, arducam_utils, args.fps)
  File "arducam_displayer.py", line 35, in display
    frame = resize(frame, 1280.0)
  File "arducam_displayer.py", line 13, in resize
    width = frame.shape[1]
AttributeError: 'NoneType' object has no attribute 'shape'

After you update the firmware on Jetson, put it on the NX and run it.
From the output you provided, there seems to be some problems.
Can you try to test a single channel on NX?

I can test a single channel on NX next week.

If i Connect a single camera on NX, so what shoud i do next?

If all channels are able to work, then it may be an HTS problem, and we can fix it through a firmware update.
(If it is an HTS problem, you can use rw_sensor to find a suitable HTS on Jetson Nano, and then I can update the firmware with the value you determined.)

If there is a channel that does not work, you need to repair the abnormal channel first and test on NX again.

Connect a single camera on Jetson NX MIPI connector, and what should I do next?

runnning below command seems to be wrong.

python3 arducam_displayer.py -f GREY --width 5120 --height 800 -d 0

Check this: