rostislavetc
Posts: 1
Joined: Wed Oct 02, 2019 6:46 am

Connect IMX219-160 to Raspberry Pi

Wed Oct 02, 2019 7:15 am

Hello,

I'm trying to use IMX219-160 cameras (https://www.waveshare.com/wiki/IMX219-160_Camera) with Raspberry Pi. I know, that waveshare pointed out on the site, that this camera is compatible with Jetson Nano, but due to we can't get Jetson carrier board on the time, we decide to connect cameras to Raspberry Pi Zero modules.
So, cameras work with Jetson Nano perfectly, but when I connect it to Raspberry, we get an error:

Code: Select all

mmal: mmal_vc_component_enable: failed to enable component: ENOSPC
mmal: camera component couldn't be enabled
mmal: main: Failed to create camera component
mmal: Failed to run camera app. Please check for firmware updates
I'm find out, that if we firstly connect original Raspberry Camera Module v2.1 to Raspberry and reboot system, and then swap original Raspberry Camera Module v2.1 to IMX219-160 camera, we don't get this error and IMX219 camera work perfectly.

Therefore, we conclude, that on boot raspberry, camera drivers loaded properly with Raspberry Camera Module v2.1, but on boot with IMX219-160, this drivers doesn't load properly.
We have checked dmesg and syslog with this different boots, and don't find differences (in attachements).

Could you help us to properly load IMX219-160 camera on Raspberry Pi?

Tested boards:
Raspberry Pi Zero 1.3
Raspberry Pi 3 Model B+
OS:
Trying Raspbian Buster with kernel 4.19.66, with kernel 4.20, and with kernel 5.3
Trying ArchLinux with Kernel 4.19.66

/boot/config.txt:

Code: Select all

gpu_mem=128
start_file=start_x.elf
fixup_file=fixup_x.dat
cma_lwm=16
cma_hwm=16
cma_offline_start=16
/boot/cmdline.txt:

Code: Select all

root=/dev/mmcblk0p2 rw rootwait console=ttyAMA0,115200 console=tty1 selinux=0 plymouth.enable=0 smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 kgdboc=ttyAMA0,115200 elevator=noop
Also trying to mix kernels modules to load, as mentioned in https://github.com/raspberrypi/linux/issues/435 and in forum topics.
Attachments
attachments.zip
dmesg and syslog
(31.6 KiB) Downloaded 37 times

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26432
Joined: Sat Jul 30, 2011 7:41 pm

Re: Connect IMX219-160 to Raspberry Pi

Wed Oct 02, 2019 9:14 am

That camera board is not official so does not have the required crypto chip on it. So will not work on a standard Raspberry Pi. Should work on a Compute module as that does not require the crypto chip.

There are kernel drivers for that chip, so you could with some effort use it for raw captures, but running the standard camera software will not work.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

User avatar
Realizator
Posts: 59
Joined: Thu Jul 14, 2016 12:53 pm
Contact: Website Twitter

Re: Connect IMX219-160 to Raspberry Pi

Tue Mar 10, 2020 9:54 am

jamesh wrote:
Wed Oct 02, 2019 9:14 am
... Should work on a Compute module as that does not require the crypto chip.
...
I confirm, these IMX219-160 works fine with the CM3-based StereoPi. The same thing for the IMX219-200 (with 200 degree FOV).

User avatar
HermannSW
Posts: 2566
Joined: Fri Jul 22, 2016 9:09 pm
Location: Eberbach, Germany
Contact: Website Twitter YouTube

Re: Connect IMX219-160 to Raspberry Pi

Tue Mar 10, 2020 4:21 pm

rostislavetc wrote:
Wed Oct 02, 2019 7:15 am
I'm find out, that if we firstly connect original Raspberry Camera Module v2.1 to Raspberry and reboot system, and then swap original Raspberry Camera Module v2.1 to IMX219-160 camera, we don't get this error and IMX219 camera work perfectly.
I would have thought that the crypto chip is called more than once on bootup (in closed source GPU code), but that experiment seems to prove once only.
https://stamm-wilbrandt.de/en/Raspberry_camera.html
https://stamm-wilbrandt.de/en#raspcatbot
https://github.com/Hermann-SW/raspiraw
https://github.com/Hermann-SW/Raspberry_v1_camera_global_external_shutter
https://stamm-wilbrandt.de/github_repo_i420toh264

Return to “Camera board”