Hi everyone. I’m trying to get the ArduCAM ToF camera working on a Raspberry Pi 4B. I ran ./Install_dependencies.sh and it completed fine, but then ./compile.sh fails. I’m on Bookworm (also tried Bullseye). The compile errors are a bunch of missing/undefined ArduCAM API members:
Those errors happen because the example code on the default Arducam_tof_camera branch doesn’t match the SDK headers the current build is using. Those members aren’t defined in the SDK headers anymore.
./Install_dependencies.sh (ran successfully, then rebooted)
./compile.sh
CMake build succeeded — test_c, preview_depth, select_video_preview, capture_raw, preview_usb all built. It found OpenCV 4.6.0 at /usr. But the device node won’t open. I’ve tried both Bookworm and Bullseye Raspberry Pi OS.
Now that it compiles, the /dev/video0 failure points to the camera overlay not being configured. Without it, the device node won’t be created or accessible.
Add this line to /boot/firmware/config.txt:
dtoverlay=arducam-pivariety,media-controller=0
Then reboot the Pi. That overlay is required for the ToF camera’s /dev/video0 node to show up.
I added the overlay line and rebooted, but the same /dev/video0 error is still there. I checked /boot/firmware/config.txt and the line ‘dtoverlay=arducam-pivariety,media-controller=0’ was actually already present. I added it once more anyway and rebooted — no change. I also double-checked the camera connection and the contacts on both ends, everything looks fine.
Since the overlay is already present and the error persists, I need a bit more to diagnose this. I’ve sent you a private message with the diagnostic tool and where to send the output. In short:
Reboot the device first
Run the bug report tool I sent over PM
It generates an arducam-bug-report.txt file
Please also send pictures of the hardware connection — both the Raspberry Pi end and the camera end — through the private message. I’ll look at those together with the report.
Thanks for those. Looking at the report, this points to the ToF camera needing a firmware update. Do you happen to have a Raspberry Pi 5 available? The firmware update procedure is documented under the Pi 5 preparation section here:
Sorry for the confusion — I only mentioned the Pi 5 because the firmware update procedure happens to be documented in the Pi 5 preparation section of the docs. The camera itself needs a firmware update, and that’s the root cause of the /dev/video0 failure. The Pi 5 is just where the instructions are written.
It worked! After updating the firmware using those Pi 5 prep steps on my Pi 4, I used the v1.0.3 branch and the camera is working now. Thanks for the help.
Great to hear. So to sum it up for anyone else hitting this: the ToF camera needed a firmware update, combined with using the v1.0.3 branch of Arducam_tof_camera. That resolved both the original compile errors and the ‘Could not open device node /dev/video0’ failure.