64MP Hawkeye with CamArray hangs when taking picture

  1. Where did you get the camera module(s)?
    Bought it from Arducam as part of the B0402 bundle ( 64MP Autofocus Synchronized Quad-Camera Kit for Raspberry Pi).

  2. Model number of the product(s)?
    B0402 → 1x UC-512 Rev. D1 4x Arducam 64MP Autofokus Rev C (with a pink dot)

  3. What hardware/platform were you working on?

Raspberry Pi 4 2GB

  1. Instructions you have followed. (link/manual/etc.)

https://docs.arducam.com/Raspberry-Pi-Camera/Multi-Camera-CamArray/quick-start/

  1. Problems you were having?

When trying to capture an image it seems to hang forever.

  1. The dmesg log from your hardware?
$ libcamera-still --list-cameras
Available cameras
-----------------
0 : arducam_64mp [9248x6944] (/base/soc/i2c0mux/i2c@1/arducam_64mp@1a)
    Modes: 'SRGGB10_CSI2P' : 1280x720 [120.03 fps - (2064, 2032)/5120x2880 crop]
                             1920x1080 [60.04 fps - (784, 1312)/7680x4320 crop]
                             2312x1736 [30.00 fps - (0, 0)/9248x6944 crop]
                             3840x2160 [20.00 fps - (784, 1312)/7680x4320 crop]
                             4624x3472 [10.00 fps - (0, 0)/9248x6944 crop]
                             9152x6944 [2.70 fps - (0, 0)/9248x6944 crop]
$ i2cdetect -y 10
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- UU -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- UU -- -- -- -- -- 
20: -- -- -- -- 24 -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --
$ i2cset -y 10 0x24 0x24 0x02

$ libcamera-jpeg  -o test.jpg  --autofocus-mode manual --verbose
Options:
    verbose: 2
    info_text:#%frame (%fps fps) exp %exp ag %ag dg %dg
    timeout: 5000
    width: 0
    height: 0
    output: test.jpg
    post_process_file: 
    rawfull: 0
    preview: default
    qt-preview: 0
    transform: identity
    roi: all
    metering: centre
    exposure: normal
    ev: 0
    awb: auto
    flush: false
    wrap: 0
    brightness: 0
    contrast: 1
    saturation: 1
    sharpness: 1
    framerate: 30
    denoise: auto
    viewfinder-width: 0
    viewfinder-height: 0
    tuning-file: (libcamera)
    lores-width: 0
    lores-height: 0
    autofocus-mode: manual
    autofocus-range: normal
    autofocus-speed: normal
    autofocus-window: all
    mode: unspecified
    viewfinder-mode: unspecified
    metadata: 
    metadata-format: json
    encoding: jpg
    quality: 93
    raw: 0
    restart: 0
    timelapse: 0
    framestart: 0
    datetime: 0
    timestamp: 0
    keypress: 0
    signal: 0
    thumbnail width: 320
    thumbnail height: 240
    thumbnail quality: 70
    latest: 
    immediate 0
    AF on capture: 0
No connector ID specified.  Choosing default from list:
Connector 32 (crtc 0): type 11, 0x0
Connector 42 (crtc 0): type 11, 0x0
Preview window unavailable
Running without preview window
Opening camera...
[0:10:24.926559196] [1203]  INFO Camera camera_manager.cpp:299 libcamera v0.0.0+4226-8689dd6b
[0:10:24.945507453] [1205]  WARN CameraSensorProperties camera_sensor_properties.cpp:243 No static properties available for 'arducam_64mp'
[0:10:24.945563118] [1205]  WARN CameraSensorProperties camera_sensor_properties.cpp:245 Please consider updating the camera sensor properties database
[0:10:24.961910989] [1205]  WARN RPI raspberrypi.cpp:1366 Mismatch between Unicam and CamHelper for embedded data usage!
[0:10:24.962862541] [1205]  INFO RPI raspberrypi.cpp:1485 Registered camera /base/soc/i2c0mux/i2c@1/arducam_64mp@1a to Unicam device /dev/media4 and ISP device /dev/media1
Acquired camera /base/soc/i2c0mux/i2c@1/arducam_64mp@1a
Configuring viewfinder...
Viewfinder size chosen is 4624x3472
[0:10:24.963705874] [1203]  INFO Camera camera.cpp:1028 configuring streams: (0) 4624x3472-YUV420
[0:10:24.963987997] [1205]  INFO RPI raspberrypi.cpp:851 Sensor: /base/soc/i2c0mux/i2c@1/arducam_64mp@1a - Selected sensor format: 4624x3472-SRGGB10_1X10 - Selected unicam format: 4624x3472-pRAA
Camera streams configured
Available controls:
    NoiseReductionMode : [0..4]
    AeEnable : [false..true]
    FrameDurationLimits : [99997..237626997]
    ColourCorrectionMatrix : [-16.000000..16.000000]
    ScalerCrop : [(0, 0)/128x128..(0, 0)/9248x6944]
    AwbMode : [0..7]
    ExposureValue : [-8.000000..8.000000]
    AeMeteringMode : [0..3]
    Contrast : [0.000000..32.000000]
    Saturation : [0.000000..32.000000]
    LensPosition : [0.000000..32.000000]
    AfRange : [0..2]
    ColourGains : [0.000000..32.000000]
    AnalogueGain : [1.000000..64.000000]
    AfMetering : [0..1]
    AfPause : [0..2]
    ExposureTime : [254..237625637]
    AfMode : [0..2]
    AeConstraintMode : [0..3]
    AfTrigger : [0..1]
    AfSpeed : [0..1]
    AeExposureMode : [0..3]
    AfWindows : [(0, 0)/0x0..(65535, 65535)/65535x65535]
    Brightness : [-1.000000..1.000000]
    AwbEnable : [false..true]
    Sharpness : [0.000000..16.000000]
Buffers allocated and mapped
Viewfinder setup complete
Requests created
Camera started!

At this point the camera just hangs forever. Same when I try it via a python script.

  1. Troubleshooting attempts you’ve made?

I tried different cameras (instead of just camera 0).

  1. What help do you need?

I would like to take pictures :-). Is this a hardware or software issue? How to resolve it?

@jabdoa

I have seen that you have raised questions in both forums and emails, and we can maintain communication in emails.

I did not raise any question via mail. Must be somebody else with a similar issue.

Jan

@jabdoa

Sorry, it was my mistake.

Have you tried saving in smaller resolutions?

libcamera-jpeg  -o test.jpg --width 1920 --height 1080

Could you show me your configuration file?

cat /boot/config.txt

I am using a freshly installed Raspberry Pi OS and followed your tutorial:

$ uname -a
Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64 GNU/Linux

$ cat /boot/config.txt 
# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable infrared communication.
#dtoverlay=gpio-ir,gpio_pin=17
#dtoverlay=gpio-ir-tx,gpio_pin=18

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

# Automatically load overlays for detected cameras
camera_auto_detect=1

# Automatically load overlays for detected DSI displays
display_auto_detect=1

# Enable DRM VC4 V3D driver
dtoverlay=vc4-kms-v3d
max_framebuffers=2

# Run in 64-bit mode
arm_64bit=1

# Disable compensation for displays with overscan
disable_overscan=1

[cm4]
# Enable host mode on the 2711 built-in XHCI USB controller.
# This line should be removed if the legacy DWC2 controller is required
# (e.g. for USB device mode) or if USB support is not required.
otg_mode=1

[all]

[pi4]
# Run as fast as firmware / board allows
arm_boost=1
dtoverlay=vc4-kms-v3d,cma-512

[all]
dtoverlay=arducam-64mp
dtparam=i2c_vc=on
dtparam=i2c_arm=on

Capture at lower res behaves very much the same:

$ libcamera-jpeg  -o test.jpg --width 1920 --height 1080 -v
Options:
    verbose: 2
    info_text:#%frame (%fps fps) exp %exp ag %ag dg %dg
    timeout: 5000
    width: 1920
    height: 1080
    output: test.jpg
    post_process_file: 
    rawfull: 0
    preview: default
    qt-preview: 0
    transform: identity
    roi: all
    metering: centre
    exposure: normal
    ev: 0
    awb: auto
    flush: false
    wrap: 0
    brightness: 0
    contrast: 1
    saturation: 1
    sharpness: 1
    framerate: 30
    denoise: auto
    viewfinder-width: 0
    viewfinder-height: 0
    tuning-file: (libcamera)
    lores-width: 0
    lores-height: 0
    autofocus-range: normal
    autofocus-speed: normal
    autofocus-window: all
    mode: unspecified
    viewfinder-mode: unspecified
    metadata: 
    metadata-format: json
    encoding: jpg
    quality: 93
    raw: 0
    restart: 0
    timelapse: 0
    framestart: 0
    datetime: 0
    timestamp: 0
    keypress: 0
    signal: 0
    thumbnail width: 320
    thumbnail height: 240
    thumbnail quality: 70
    latest: 
    immediate 0
    AF on capture: 0
No connector ID specified.  Choosing default from list:
Connector 32 (crtc 0): type 11, 0x0
Connector 42 (crtc 0): type 11, 0x0
Preview window unavailable
Running without preview window
Opening camera...
[0:01:46.600644676] [879]  INFO Camera camera_manager.cpp:299 libcamera v0.0.0+4226-8689dd6b
[0:01:46.619665669] [881]  WARN CameraSensorProperties camera_sensor_properties.cpp:243 No static properties available for 'arducam_64mp'
[0:01:46.619719243] [881]  WARN CameraSensorProperties camera_sensor_properties.cpp:245 Please consider updating the camera sensor properties database
[0:01:46.636289735] [881]  WARN RPI raspberrypi.cpp:1366 Mismatch between Unicam and CamHelper for embedded data usage!
[0:01:46.637194254] [881]  INFO RPI raspberrypi.cpp:1485 Registered camera /base/soc/i2c0mux/i2c@1/arducam_64mp@1a to Unicam device /dev/media2 and ISP device /dev/media1
Acquired camera /base/soc/i2c0mux/i2c@1/arducam_64mp@1a
Configuring viewfinder...
Viewfinder size chosen is 4624x2600
[0:01:46.638772533] [879]  INFO Camera camera.cpp:1028 configuring streams: (0) 4624x2600-YUV420
[0:01:46.639163459] [881]  INFO RPI raspberrypi.cpp:851 Sensor: /base/soc/i2c0mux/i2c@1/arducam_64mp@1a - Selected sensor format: 4624x3472-SRGGB10_1X10 - Selected unicam format: 4624x3472-pRAA
Camera streams configured
Available controls:
    NoiseReductionMode : [0..4]
    AeEnable : [false..true]
    FrameDurationLimits : [99997..237626997]
    ColourCorrectionMatrix : [-16.000000..16.000000]
    ScalerCrop : [(0, 0)/128x128..(0, 0)/9248x6944]
    AwbMode : [0..7]
    ExposureValue : [-8.000000..8.000000]
    AeMeteringMode : [0..3]
    Contrast : [0.000000..32.000000]
    Saturation : [0.000000..32.000000]
    LensPosition : [0.000000..32.000000]
    AfRange : [0..2]
    ColourGains : [0.000000..32.000000]
    AnalogueGain : [1.000000..64.000000]
    AfMetering : [0..1]
    AfPause : [0..2]
    ExposureTime : [254..237625637]
    AfMode : [0..2]
    AeConstraintMode : [0..3]
    AfTrigger : [0..1]
    AfSpeed : [0..1]
    AeExposureMode : [0..3]
    AfWindows : [(0, 0)/0x0..(65535, 65535)/65535x65535]
    Brightness : [-1.000000..1.000000]
    AwbEnable : [false..true]
    Sharpness : [0.000000..16.000000]
Buffers allocated and mapped
Viewfinder setup complete
Requests created
Camera started!

@jabdoa

change camera_auto_detect=1 to camera_auto_detect=0
image

reboot and try another command:

libcamera-still -o test.jpg --width 1920 --height 1080 --viewfinder-width 1920 --viewfinder-height 1080 -v

Tried that but nothing changed so far:

$ libcamera-still -o test.jpg --width 1920 --height 1080 --viewfinder-width 1920 --viewfinder-height 1080 -v
Options:
    verbose: 2
    info_text:#%frame (%fps fps) exp %exp ag %ag dg %dg
    timeout: 5000
    width: 1920
    height: 1080
    output: test.jpg
    post_process_file: 
    rawfull: 0
    preview: default
    qt-preview: 0
    transform: identity
    roi: all
    metering: centre
    exposure: normal
    ev: 0
    awb: auto
    flush: false
    wrap: 0
    brightness: 0
    contrast: 1
    saturation: 1
    sharpness: 1
    framerate: 30
    denoise: auto
    viewfinder-width: 1920
    viewfinder-height: 1080
    tuning-file: (libcamera)
    lores-width: 0
    lores-height: 0
    autofocus-range: normal
    autofocus-speed: normal
    autofocus-window: all
    mode: unspecified
    viewfinder-mode: unspecified
    metadata: 
    metadata-format: json
    encoding: jpg
    quality: 93
    raw: 0
    restart: 0
    timelapse: 0
    framestart: 0
    datetime: 0
    timestamp: 0
    keypress: 0
    signal: 0
    thumbnail width: 320
    thumbnail height: 240
    thumbnail quality: 70
    latest: 
    immediate 0
    AF on capture: 0
No connector ID specified.  Choosing default from list:
Connector 32 (crtc 0): type 11, 0x0
Connector 42 (crtc 0): type 11, 0x0
Preview window unavailable
Running without preview window
Opening camera...
[0:00:36.586369995] [837]  INFO Camera camera_manager.cpp:299 libcamera v0.0.0+4226-8689dd6b
[0:00:36.628248106] [839]  WARN CameraSensorProperties camera_sensor_properties.cpp:243 No static properties available for 'arducam_64mp'
[0:00:36.628333829] [839]  WARN CameraSensorProperties camera_sensor_properties.cpp:245 Please consider updating the camera sensor properties database
[0:00:36.668472347] [839]  WARN RPI raspberrypi.cpp:1366 Mismatch between Unicam and CamHelper for embedded data usage!
[0:00:36.670040125] [839]  INFO RPI raspberrypi.cpp:1485 Registered camera /base/soc/i2c0mux/i2c@1/arducam_64mp@1a to Unicam device /dev/media4 and ISP device /dev/media1
Acquired camera /base/soc/i2c0mux/i2c@1/arducam_64mp@1a
Configuring viewfinder...
[0:00:36.671579569] [837]  INFO Camera camera.cpp:1028 configuring streams: (0) 1920x1080-YUV420
[0:00:36.672154440] [839]  INFO RPI raspberrypi.cpp:851 Sensor: /base/soc/i2c0mux/i2c@1/arducam_64mp@1a - Selected sensor format: 1920x1080-SRGGB10_1X10 - Selected unicam format: 1920x1080-pRAA
Camera streams configured
Available controls:
    NoiseReductionMode : [0..4]
    AeEnable : [false..true]
    FrameDurationLimits : [16656..99944078]
    ColourCorrectionMatrix : [-16.000000..16.000000]
    ScalerCrop : [(784, 1312)/256x256..(784, 1312)/7680x4320]
    AwbMode : [0..7]
    ExposureValue : [-8.000000..8.000000]
    AeMeteringMode : [0..3]
    Contrast : [0.000000..32.000000]
    Saturation : [0.000000..32.000000]
    LensPosition : [0.000000..32.000000]
    AfRange : [0..2]
    ColourGains : [0.000000..32.000000]
    AnalogueGain : [1.000000..64.000000]
    AfMetering : [0..1]
    AfPause : [0..2]
    ExposureTime : [107..99943495]
    AfMode : [0..2]
    AeConstraintMode : [0..3]
    AfTrigger : [0..1]
    AfSpeed : [0..1]
    AeExposureMode : [0..3]
    AfWindows : [(0, 0)/0x0..(65535, 65535)/65535x65535]
    Brightness : [-1.000000..1.000000]
    AwbEnable : [false..true]
    Sharpness : [0.000000..16.000000]
Buffers allocated and mapped
Viewfinder setup complete
Requests created
Camera started!

Any other idea? As far I understand I cannot try one of the camera with the hat, right?

Jan

@jabdoa

Could I have a look at your hardware connection diagram?

Hat needs to be connected to at least 2 cameras to use it.

I drew two sets of interfaces, you must ensure that each set has at least 1 camera on it.

Initially I tried with one and two. I connected a second camera again. Now I got cameras connected to RX0 and RX1. Command output did not change (still hanging). I also tried to explicitly select one of the cameras (using i2cset -y 10 0x24 0x24 0x02 or i2cset -y 10 0x24 0x24 0x12). This still hangs.

So unfortunately no progress. We can try other RPIs (we got a bunch of them) or other SD cards with different OS if that helps. I am completely lost why this hangs and how to debug it. Should I hook up a logic analyser, scope, serial or JTAG somewhere?

Ok I understand now what you mean by two channel. So you have to populate RX0 or RX1 and RX2 or RX3? Guess that should go into the docs as it currently states that you can use “up to four cameras” which implies that a single camera should work as well.

I tried that and now it works. Thanks! I struggled a bit with the focus. Autofocus does not seem to work. Manual focus with a range of 6.5 (near infinity) to 5 (near) seems to be working.

We also bough four of those RJ45 extenders (U6248). Basically one for each of the cameras. Is there any trick to mount them on top of the hat? It seems like the upper connector on my hat is not populated. Even if it would not fit the power connector on the extender. Also stacking two extenders does not work. Looks like there is also no way to power extenders via USB like the hat. Any guidance on that?

Jan

You are right, I will arrange this matter.

It may be a problem caused by the center focus. We are currently trying to figure out how to have a better focus algorithm on the hat. You can try to see if autofocus works in single channel mode.

At present, it does not support such use. The cameras on the hat all share the same clock, which is different from the monocular camera.

Auto focus:
I tried setting one channel via i2cset and that works fine. However, when I try autofocus I hear a loud click (similar but louder when you set a focus value above 9). It seems to drive the focus against one of the limits and fails to focus properly. This is not an issue for our usecase so don’t worry to much. We will just set focus manually.

Extenders:
I don’t understand your message. Your FAQ below the camera clearly states that extensions are supported for the “64MP Autofocus Synchronized Quad-Camera Kit for Raspberry Pi (B0402)” page:

This is also listed on the docs page for the extension: Quick Start Guide for Arducam CamArray HAT Kit - Arducam Wiki.

For our use case we need to mount cameras farther away than a few centimetres. We cannot use the product without extensions. Is there any way or do we have to return it?

Jan

@jabdoa

For the network cable extension solution, you can only use it on the hat board to achieve the extended current.

If you want to use extension on every camera, then you should consider hdmi extension solution.