Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (â‹®) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

So close (yet still far) from getting the OV5640 camera working on an Orange Pi PC

Featured Replies

Hi everyone,

 

I bought this Orange Pi PC with this OV5640 5MP camera module.

I've been following the other threads online for directions on getting it to work, and I'm up to the point where there exists a /dev/video0 entry, but I'm unable to use it through avafinger's cap-v4l2 program, opencv, or fswebcam. The best I can get is a black image from it.

 

What I've done so far:

  • Editted the [twi2] and [csi0] sections of my script.fex file, converted it back to script.bin with fex2bin
  • sudo modprobe ov5640
  • sudo modprobe vfe_v4l2

 

this is the output of dmesg following boot, and this is the output of v4l2-ctl --all.

Here's a link to my current script.fex. I've tried many different variations of the [csi0] section to no avail so far.

 

cap-v4l2 fails with the error message:

v4l2: errno: 22 - check sensor, something wrong.
v4l2: failed to retrieve frame.

fswebcam gives me:

Error setting pixel format.
VIDIOC_S_FMT: Operation not permitted

 and opencv fails with:

mmap: Invalid argument
munmap: Invalid argument
/dev/video0 does not support memory mapping
VIDEOIO ERROR: V4L: can't open camera by index 0
munmap: Invalid argument
/dev/video0 does not support memory mapping

 

 

 

I've been trying for over a week now and I'm basically out of ideas. Does anyone have any suggestions?

Thanks in advance.

  • Author

[UPDATE]

 

Finally got it working; here's the new script.fex.

 

Also need to remember to run:

sunxi-pio -m "PA17<1><0><1><1>"        # AVDD / CSI_PWR_EN
sunxi-pio -m "PG13<1><0><1><1>"        # DOVDD / AFCC_EN

before loading ov5640 and vfe_v4l2.

 

The opencv error is still there though, so i'll have to figure out a workaround to pipe the image data in from ffmpeg or something.

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.