how to setup mv-mipi-imx287m on rpi zero 2w?
-
UPD solved
Hi,
I'm trying to run mv-mipi-imx287m on rpi zero 2w, following this guide: https://wiki.veye.cc/index.php/V4L2_mode_for_Raspberry_Pi
My actions:
#!/bin/bash set -ex cd ~/ rm -rf raspberry* wget https://github.com/veyeimaging/raspberrypi_v4l2/releases/latest/download/raspberrypi_v4l2.tgz tar xzf raspberrypi_v4l2.tgz # build driver cd ~/raspberrypi_v4l2/driver_source/cam_drv_src/rpi-6.6.y make # build dtbo cd ~/raspberrypi_v4l2/driver_source/dts/rpi-6.6.y ./build_dtbo.sh cd ~/raspberrypi_v4l2/release # create bin dir for current kernel mkdir -p driver_bin/$(uname -r) cp ~/raspberrypi_v4l2/driver_source/cam_drv_src/rpi-6.6.y/*.ko driver_bin/$(uname -r)/ cp ~/raspberrypi_v4l2/driver_source/dts/rpi-6.6.y/*.dtbo driver_bin/$(uname -r)/ ls -l driver_bin/$(uname -r)/*.{ko,dtbo} cd ~/raspberrypi_v4l2/release chmod +x *.sh yes no | ./uninstall_driver.sh veye_mvcam sed -i 's/\/boot\/cmdline\.txt/\/boot\/firmware\/cmdline\.txt/g' install_driver.sh yes | ./install_driver.sh veye_mvcam
Result:
user@rpizero:~ $ dmesg | tail -n 10 [ 10.013388] Bluetooth: hci0: BCM43436 37.4MHz Class 1.5 RaspBerry Pi Zero2 [Version: 1017.1042] [ 10.013428] Bluetooth: hci0: BCM43430A1 (001.002.009) build 1042 [ 10.014738] Bluetooth: hci0: BCM: Using default device address (43:43:a1:12:1f:ac) [ 10.152275] 8021q: 802.1Q VLAN Support v1.8 [ 10.595384] veye_mvcam: loading out-of-tree module taints kernel. [ 10.596516] mvcam 10-003b: veye mv series camera driver version: 01.01.06 [ 10.944723] brcmfmac: brcmf_cfg80211_set_power_mgmt: power save enabled [ 11.165153] mvcam: mvcam_read: Reading register 0x04 failed [ 11.165219] mvcam 10-003b: failed to read chip id [ 16.219244] systemd[647]: memfd_create() called without MFD_EXEC or MFD_NOEXEC_SEAL set
user@rpizero:~ $ ls -l /dev/video0 ls: cannot access '/dev/video0': No such file or directory
user@rpizero:~ $ uname -a Linux rpizero 6.6.74+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.74-1+rpt1 (2025-01-27) aarch64 GNU/Linux user@rpizero:~ $ lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 12 (bookworm) Release: 12 Codename: bookworm
Did anyone try to setup this camera module on rpi zero 2w?
UPD: I have the same error with rpi5 (used
install_driver_rpi5.sh
instead ofinstall_driver.sh
). I've checked my cable connections and everything looks correct (please correct me if I'm wrong)UPD2: SOLVED. The problem was that I've tried to put ribbon cable under brown plastic thing. Ribbon should go above it, and contacts should be faced up, not to the board. Like this:
And this is wrong:
-
-
@veye_xumm do you know what framerate can be achieved on rpi zero 2w with imx287?
I'm getting ~320 fps + ~80 frames drops per second when using v4l2-ctl
$ v4l2-ctl --stream-mmap --stream-count=-1 -d /dev/video0 --stream-to=/dev/null <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 319.87 fps, dropped buffers: 79
and ~240 fps + ~80 frame drops per second when using my C program (
V4L2_BUF_TYPE_VIDEO_CAPTURE
+V4L2_MEMORY_MMAP
, used 3 buffers)VIDIOC_DQBUF
takes ~4000 microseconds in my casefps: 252 dropped: 77 dq: 3996 fps: 250 dropped: 71 dq: 4031 fps: 247 dropped: 74 dq: 4041 fps: 248 dropped: 75 dq: 4033
I've set camera fps using this command
v4l2-ctl --set-ctrl frame_rate=523
the interesting thing is that I have frame drops even if I set very low fps, e.g. 10
<<<<<<< 6.67 fps, dropped buffers: 2 <<<< 7.50 fps, dropped buffers: 3 <<<<<< 6.87 fps, dropped buffers: 1
as well as using v4l2 C interface (
dq
is dequeue time in microseconds)fps: 7 dropped: 0 dq: 170145 fps: 6 dropped: 1 dq: 166645 fps: 5 dropped: 2 dq: 299999 fps: 3 dropped: 2 dq: 366619 fps: 8 dropped: 0 dq: 124991
I had no issues with ov9281 cams from different vendors when using v4l2 C interface on rpi zero 2w, these cams have 1280x800 resolution, 8-bits per pixel and 144 max fps for this format (I'm not sure about rpi zero 2w capabilities though, it seems at least ~385 fps should be possible (?)
(1280×800×144) / (704×544×530) × 530 == 385
). can these drops be related to veye driver? Do you have any ideas where I can start from to debug it?Thanks in advance