IMX519 camera not detected on Raspberry Pi 4B - imx519 probe fails reading chip id

Hi all, I’m trying to get an Arducam B0391 (IMX519) camera working on a Raspberry Pi 4B and it’s not being detected at all. In dmesg I can see the imx519 driver probing at 10-001a but it fails to read the chip id 519 with error -5. Running libcamera-still --list-cameras just reports ‘No cameras available!’.

My setup:

  • Raspberry Pi 4B
  • Linux raspberrypi 5.15.84-v7l+ #1613 SMP Thu Jan 5 12:01:26 GMT 2023 armv7l GNU/Linux
  • Accessed over SSH

Has anyone seen this before?

Welcome! An error -5 on the chip id read usually points to an I2C communication problem rather than a libcamera config issue. Could you run the following and paste the output here?

dmesg | grep imx519
i2cdetect -y 0
libcamera-still --list-cameras
libcamera-still -t 3000 -o test.jpg

That will help us see whether the sensor is even being seen on the I2C bus.

Here’s what I get:

dmesg | grep imx519
[    7.932773] imx519: loading out-of-tree module taints kernel.
[    7.973796] imx519 10-001a: failed to read chip id 519, with error -5
[    7.975192] imx519: probe of 10-001a failed with error -5
libcamera-still --list-cameras
No cameras available!
i2cdetect -y 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:                         -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
libcamera-still -t 3000 -o test.jpg
Preview window unavailable
[0:01:19.903810025] [911]  INFO Camera camera_manager.cpp:299 libcamera v0.0.0+4186-d1dc0373
ERROR: *** no cameras available ***

Separately, I’m also planning to write a driver for this IMX519 on an NXP i.MX8M module — is the IMX519 sensor datasheet available anywhere?

Thanks, that’s really useful. The fact that i2cdetect -y 0 shows nothing at all, combined with ‘failed to read chip id 519, with error -5’, means the sensor isn’t being seen on the I2C bus at all. This looks like a connection-level detection failure rather than a libcamera configuration problem.

Can you do the following after a fresh reboot?

wget -O arducam-camera-bug-report https://github.com/ketai-dhr/arducam-camera-bug-report/releases/download/tools/arducam-camera-bug-report
chmod +x ./arducam-camera-bug-report
./arducam-camera-bug-report

This generates arducam-bug-report.txt in the current directory. Please send that file to me in a private message so I can look at the full system state.

Done, I rebooted and ran the script. I’ve sent you the arducam-bug-report.txt in a private message — please see the attachment.

Thanks, I’ve gone through the bug report. Interesting — based on the report, the camera is actually detected by the Pi now. But libcamera crashes when the command is run, which is a different symptom from before.

For reference I’m looking at the kernel driver source (linux/drivers/media/i2c/imx519.c at rpi-5.15.y · raspberrypi/linux · GitHub) and the module repo (GitHub - ArduCAM/IMX519_AK7375 · GitHub).

Two things that would help me narrow this down:

  1. What commands did you use to install the camera driver?
  2. If you have another Raspberry Pi available, could you try the camera on that one?

Since the camera is detected but libcamera crashes, I’m leaning towards a driver/app/software configuration issue rather than a dead camera or connection.

I checked over VNC and now I get a blank window with no data when I open the camera.

For the install, I followed the B0391.pdf steps 4-6 and ran:

./install_pivariety_pkgs.sh -p libcamera_dev
./install_pivariety_pkgs.sh -p libcamera_apps
./install_pivariety_pkgs.sh -p imx519_kernel_driver_low_speed

Thanks for the details. So you installed libcamera-dev, libcamera-apps, and the imx519_kernel_driver_low_speed kernel driver. The blank VNC preview usually means the capture/preview pipeline isn’t delivering frames, even though the sensor probes.

A couple more things to check:

  • Can you post a picture of your hardware connection (camera, adapter, and how it’s attached to the Pi)?
  • Do you have a second Raspberry Pi 4 you can test the same camera on?

I only have this one B0391 camera unit, so I can’t cross-test right now — I’m trying to get hold of another one. Here’s a photo of my current hardware connection. Is this ok?

Looking at your photo, I suspect the adapter (highlighted in red) is the problem. We’ve verified the same B0391 camera on our side with the Arducam-produced adapter, and both preview and image capture work fine. With your adapter it’s a different story.

The camera itself appears to be fine — the earlier detection and libcamera failures point to the adapter. I’d recommend using the Arducam adapter with the B0391. One heads up: that adapter has been discontinued, so it may need to be custom ordered.