Arducam 64MP Autofocus camera not found error on Raspberry Pi

Hi everyone, I’m working on a precision agriculture project — a robotic system that detects Tuta absoluta infestations on tomato plants in a greenhouse. I’m using the Arducam 64MP PDAF & CDAF Autofocus Camera (SKU B0399) connected to a Raspberry Pi 5.

Whenever I try to run any camera-related code, I just get “camera not found” errors. The camera never shows up at all. I’ve tried several approaches but nothing works. Has anyone encountered this before? Any ideas what I should check first?

Let’s narrow this down. We’ll need to check two things in parallel — hardware and software.

Step 1: Hardware Photos
Can you take clear photos of:

  • The ribbon cable connection at the camera board side
  • The ribbon cable connection at the Raspberry Pi 5 side

Step 2: Diagnostic Log
Run these four commands on your Pi:

sudo reboot
wget -O arducam-camera-bug-report https://github.com/Dion4cen/arducam-camera-bug-report/releases/download/Tool/arducam-camera-bug-report
chmod +x ./arducam-camera-bug-report
./arducam-camera-bug-report

This generates a file called arducam-bug-report.txt in your current directory. It collects OS version, camera detection status, and boot configuration — all the relevant info in one shot.

Please share that file along with the photos and we’ll go from there.

Thanks for the quick reply. I ran the diagnostic script and took photos of the connections. I’ve uploaded both — the arducam-bug-report.txt is in the RAR archive and the hardware photo is attached.

Here’s a bit more context: this is for a robot moving through greenhouse rows capturing images of tomato plants to detect Tuta absoluta damage. The Pi is the main processing unit, so getting this camera working is critical for us. Let me know what you find.

I’ve gone through your diagnostic log and the hardware photo. There are actually two separate problems here:


Root Cause #1 — Hardware: Ribbon Cable Orientation
The ribbon cable is inserted upside down on both ends — at the Raspberry Pi 5 connector and at the camera module. The contacts on the flat flex cable need to face the correct direction or there’s simply no electrical connection.

Fix:

  • Gently open the black locking tabs on both connectors.
  • Flip each end of the ribbon cable 180 degrees (so the contacts face the other way).
  • Press the tabs back down to lock.

Root Cause #2 — Software: Missing Device Tree Overlay
The driver isn’t being loaded because the required overlay isn’t present in your boot configuration.

Fix:

  1. Edit the config file:
    sudo nano /boot/firmware/config.txt
    
  2. Scroll to the bottom, below the [all] line.
  3. Add this line:
    dtoverlay=arducam-64mp
    
  4. Save and reboot:
    sudo reboot
    

Important: Both fixes need to be applied — reverse the cable first, then add the overlay and reboot. Do either one alone and it still won’t work.

I tried following your instructions but I’m running into problems. After rebooting I’m still getting “command not found” at various points.

Here’s exactly what I did — maybe I messed up the order of things:

S1: wget -O install_pivariety_pkgs.sh https://github.com/ArduCAM/Arducam-Pivariety-V4L2-Driver/releases/download/install_script/install_pivariety_pkgs.sh
S2: chmod +x install_pivariety_pkgs.sh
S3: ./install_pivariety_pkgs.sh -p libcamera_dev
S4: ./install_pivariety_pkgs.sh -p libcamera_apps
S5: sudo nano /boot/firmware/config.txt

Then in config.txt I added under [all]:

dtoverlay=arducam-64mp

(I also saw you wrote dtoverlamy=arducam-64mp earlier — was that a typo? I tried both just in case.)

Then S7: saved and rebooted. Still no luck. The “command not found” error pops up during the install script steps I think.

A couple of things to untangle here.

First — the script you ran: You downloaded and executed the Pivariety driver installation script, which is a completely different package. That’s not the diagnostic tool I linked earlier, and it’s not needed for your B0399 camera at all. The “command not found” errors are likely coming from inside that script — possibly missing dependencies or an unsupported environment. You can ignore that script for now; it’s unrelated to getting your camera detected.

Second — the overlay line: Yes, dtoverlamy was a typo on my part. The correct line is:

dtoverlay=arducam-64mp

So you’ve got that right. Stick with dtoverlay, not dtoverlamy.

Third — and most important — the cable: Before we go deeper into software, can you confirm: did you physically flip the ribbon cable on both ends (camera board side AND Pi 5 side)? The photo you sent earlier showed it inserted upside down. If the cable hasn’t been reversed, no amount of software changes will make the camera show up. Just want to verify this step was actually done.

Since the issue is persisting even after the cable reversal and overlay fix, I’d like to move to a live remote session to see what’s happening in real time.

I’ve sent you the AnyDesk download link and a booking link for scheduling a session via private message — please check your inbox. Once installed, just share your 9-digit AnyDesk ID and we’ll connect at the scheduled time.

A couple of notes:

  • Our support team is on UTC+8 timezone, so keep that in mind when picking a slot.
  • The 10:00 PM (22:00) slot is for sales inquiries only, not remote support.

Also — as an alternative: If you’d rather sidestep the ribbon cable / driver configuration entirely, there’s a USB 3.0 version of this same 64MP autofocus camera module that’s essentially plug-and-play. I’ve sent the product link via PM as well — might be worth considering for your greenhouse robot setup since it avoids the Pi’s MIPI connector quirks entirely.