Camera timeout error with dual IMX708 Arducam cameras on Raspberry Pi 4B

Hi all, I’m trying to run two 12MP IMX708 B0311 Arducam camera modules through a camera adapter module on a Raspberry Pi 4B. When I run sudo ./init_camera.sh I get a camera timeout and the script restarts over and over.

Environment:

  • Raspberry Pi 4B
  • 2x 12MP IMX708 B0311 Arducam camera modules
  • Camera adapter module

Relevant log output:

[0:12:13.068198135] [1799]  INFO Camera camera_manager.cpp:297 libcamera v0.0.0+4367-ad9428b4
[0:12:13.224141228] [1800]  INFO RPI vc4.cpp:444 Registered camera /base/soc/i2c0mux/i2c@1/imx708@10 to Unicam device /dev/media2 and ISP device /dev/media0
[0:12:13.224236950] [1800]  INFO RPI pipeline_base.cpp:1101 Using configuration file '/usr/share/libcamera/pipeline/rpi/vc4/rpi_apps.yaml'
[0:12:13.225552635] [1799]  INFO Camera camera.cpp:1033 configuring streams: (0) 2304x1296-YUV420
[0:12:13.226075246] [1800]  INFO RPI vc4.cpp:572 Sensor: /base/soc/i2c0mux/i2c@1/imx708@10 - Selected sensor format: 2304x1296-SBGGR10_1X10 - Selected unicam format: 2304x1296-pBAA
[0:12:18.097628791] [1800]  WARN V4L2 v4l2_videodevice.cpp:2007 /dev/video0[18:cap]: Dequeue timer of 1000000.00us has expired!
[0:12:18.097727753] [1800] ERROR RPI pipeline_base.cpp:1356 Camera frontend has timed out!
[0:12:18.097750232] [1800] ERROR RPI pipeline_base.cpp:1357 Please check that your camera sensor connector is attached securely.
[0:12:18.097771878] [1800] ERROR RPI pipeline_base.cpp:1358 Alternatively, try another cable and/or sensor.
ERROR: Device timeout detected, attempting a restart!!!

I’ve already tried reordering the cameras, rebooting, and using different ports on the adapter. There was one time it did work, but I hadn’t changed any setup for that run.

Thanks for the detailed log. That timeout usually means the sensor isn’t being read properly over the MIPI path. For the Raspberry Pi Multi-Camera Adapter Module V2.2, can you check the official Quick Start Guide for the Multi-Adapter Board (quad camera adapter board B012001)?

https://docs.arducam.com/Raspberry-Pi-Camera/Multi-Camera-CamArray/Quick-Start-Guide-for-Multi-Adapter-Board/#for-quad-camera-adapter-boardb012001

Follow the config.txt steps there and let me know if the error changes.

I followed the guide and changed config.txt. I modified the dtoverlay line and changed camera_auto_detect from 1 to 0. My config.txt didn’t originally have a camera_auto_detect line, so I added it.

Now I get a ‘camera not detected/found’ error. It happens with the multi camera adapter and also with just a single camera connected.

Can you grab a diagnostic bug report so I can see what the system is currently detecting? Run these exactly:

  1. Reboot your device.
  2. Download the bug report tool:
wget -O arducam-camera-bug-report https://github.com/ketai-dhr/arducam-camera-bug-report/releases/download/tools/arducam-camera-bug-report
  1. Set executable permissions:
chmod +x ./arducam-camera-bug-report
  1. Run it:
./arducam-camera-bug-report

That produces an arducam-bug-report.txt file in the current directory. Attach it here or send it to me via private message.

Done — I ran the tool and sent the arducam-bug-report.txt file over.

Thanks, got the report. One thing I want to rule out first: delete the line dtoverlay=imx708-b0311 from config.txt, then reboot and test again. Also, can you post pictures of the camera board (front and back)?

I deleted that line and rebooted but I’m still getting ‘no cameras found’. I’ve attached a new arducam bug report text file and pictures of the front and back of the board.

Thanks, but those photos are of the adapter module v2.2. I need photos of the B0311 camera board itself, front and back.

Ah sorry about that. Here are pictures of both B0311 camera boards.

Thanks, those help. I’ve put together a modified device-tree overlay file for the Multi-Camera Adapter Module V2.2 + B0311 Rev B combination and sent it to you via private message.

Transfer the file to the Pi, extract it, then run:

cd imx708_b0311_dtoverlay_camera_mux/6.1.21
./build_and_install.sh

Reboot after that. It should come up working.

I ran both commands and rebooted, but it still says ‘no cameras available’. I’ve attached the newest arducam bug report file.

I’ve modified the overlay again. Please grab the updated file from the private message and retry the same steps.

Now I get a new error when I run the script:

cp: cannot stat 'imx708-b0311.dtbo': No such file or directory

The extracted directory has imx708.dtbo but not imx708-b0311.dtbo. Should I just rename imx708.dtbo to imx708-b0311.dtbo? I’m also considering reinstalling a fresh copy of Raspberry Pi OS and starting over.

A fresh OS image would actually be a good idea here. If you do: flash a new image, run the overlay file I provided first, then add this line to config.txt:

dtoverlay=camera-mux-4port,cam0-imx708,cam1-imx708

and reboot.

I’ve flashed Raspberry Pi OS Legacy 64-bit. Quick question — should I run the first file you sent or the second modified version? And should I follow the quick start guide instructions for the imx708-b0311 boards and/or the multi camera adapter, or just start with the file for now?

Use the second, modified version of the overlay file. After updating the dtb file, enable the multiplexer driver. Open config.txt:

sudo nano /boot/config.txt

and add this under the [all] line:

dtoverlay=camera-mux-4port,cam0-imx708

Then reboot.

I’m still getting the same missing dtbo error when I run the file:

cp: cannot stat 'imx708-b0311.dtbo': No such file or directory

The script is looking for imx708-b0311.dtbo, but that file doesn’t exist. The extracted directory only has imx708.dtbo. Should I rename imx708.dtbo to imx708-b0311.dtbo to match what it expects?

I’ve sent another updated file via private message. Please try the new attached file.

That file worked! Now I’m stuck on config.txt and channel usage. I need to add dtoverlay=camera-mux-4port,cam0-imx708,cam1-imx708 under the [all] line, but my config.txt has two [all] sections:

[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

[all]

Which [all] should I use? Also, I’m physically using camera channels A and C and skipping B — will that cause camera indexing issues?

Either [all] section is fine, just put it under one of them and reboot. But about the channels: if you’re physically on A and C and skipping B, you should NOT use cam0-imx708,cam1-imx708. The camera on channel C won’t be detected that way. Use this instead:

dtoverlay=camera-mux-4port,cam0-imx708,cam2-imx708