IMX298 not working on Raspberry Pi 4

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

Amazon. Cant link cause new user.

  1. Model number of the product(s)?
    UC-572 | IMX298

  2. What hardware/platform were you working on?
    Raspberry Pi 4 with Raspbian 6.1.25-v8+

  3. Instructions you have followed. (link/manual/etc.)
    https://www.uctronics.com/download/Amazon/B0323_Manual.pdf
    Quick Start - Arducam Wiki
    Github: /ArduCAM/MIPI_Camera/tree/master/RPI (New user so can only put 2 links)

  4. Problems you were having?
    I cannot get my camera to work despite following the guides to T. In the first one, I cannot get the driver to install because it says I have the wrong kernel version (my kernel is up-to-date) and on the second one, I ran through all the steps properly, but the camera is still not working. The third one went perfectly fine as well, but likewise, the camera is still not working. It is saying “*** no cameras available ***” when I try to test the camera with libcamera hello.

I verified that the camera is plugged in correctly because it is getting power to ground and vcc (tested with multimeter).

  1. The dmesg log from your hardware?

I have run “dmesg | grep arducam” and it returns nothing.

  1. Troubleshooting attempts you’ve made?
    I tried enabling legacy camera in raspi-config and that didn’t get it to work.

  2. What help do you need?
    I need to figure out how to get my IMX298 to work. This camera previously worked on this same raspi board back in 2020 on a different install. So, I know there is a way to make it work somehow. If there is any additional information I can provide please feel free to ask.

@cray12399

Based on the current situation, it seems that you are experiencing some issues.

To resolve this, we recommend using a new mirror.

For kernel versions 5.15.84 and later, please follow the steps below:

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

add dtoverlay=arducam-pivariety under the line [all]
#Save and reboot.

Hi @Edward thank you for your reply! I tried your steps above, but I had a few problems.

  1. In /boot/config.txt, I already had a dtoverlay set to “pi3-miniuart-bt” which is required because the Pi is connected to my SKR Mini board via UART. Can I set a dtoverlay for both of them?

I also had two [all] categories for some reason.

[all]

[pi4]
dtoverlay=vc4-fkms-v3d
# Run as fast as firmware / board allows
arm_boost=1

[all]
dtoverlay=pi3-miniuart-bt
#dtoverlay=arducam-pivariety
enable_uart=1
dtparam=i2c_vc=on
dtparam=i2c_arm=on
gpu_mem=128
  1. When I did set dtoverlay to arducam-pivariety, dmesg | grep arducam actually output some text, but it was the following:
[    0.069910] platform fe801000.csi: Fixed dependency cycle(s) with /soc/i2c0mux/i2c@1/arducam_pivariety@c
[    7.316589] arducam-pivariety 10-000c: probe failed

and the command libcamera-still -t 5000 -o test.jpg outputs:

Preview window unavailable
[0:04:39.866708069] [2219]  INFO Camera camera_manager.cpp:299 libcamera v0.0.0+4225-74d023d8
ERROR: *** no cameras available ***

What should I do from here?

EDIT:

Put dtoverlay=arducam-pivariety under the [all] with no text under it and it didn’t interfere with my uart set up. Still not working though.

Hi @Edward. Thank you for replying. I tried your solution, but it is still not working.

I am getting the following error from dmesg | grep arducam:

[    0.068088] platform fe801000.csi: Fixed dependency cycle(s) with /soc/i2c0mux/i2c@1/arducam_pivariety@c
[    7.035625] arducam-pivariety 10-000c: probe failed

And the following error when I try to run libcamera-still -t 5000 -o test.jpg:

Preview window unavailable
[0:04:39.866708069] [2219]  INFO Camera camera_manager.cpp:299 libcamera v0.0.0+4225-74d023d8
ERROR: *** no cameras available ***

@cray12399

Could you please take a look at the hardware connection diagram, which includes the front and back of the camera as well as an overall wiring diagram?

Are you talking about the one on the Arducam website that shows how to wire the ribbon cable? I checked that one and it is wired correctly according to that.

@cray12399

Could you please provide me with some pictures of the hardware to help me confirm its status? This will enable me to locate the problem faster.