Jump to content

[Invalid] - NanoPi Duo2 armbian focal: ov5640 camera does not work


schunckt

Recommended Posts

Hi folks!

 

So first here is the key question:

Did anyone get exactly this combination NanoPi Duo2, ov5640 camera, armbian focal   running?   If YES, HOW … ? 😊

Details below. btw. buster would be also fine...

 

uname -a output is

Linux nanopiduo2 5.10.34-sunxi #21.05.1 SMP Thu May 6 20:13:21 UTC 2021 armv7l armv7l armv7l GNU/Linux

 

I’m quite new to Linux and Armbian and have a slight problem using an Nanopi Duo2 and an ov5640 camera.

It works pretty well using the image from FriendlyElec. This has been tested using the mjpg-streamer. Due to this success I’m sure the entire hardware setup is correct.

 

Unfortunately the ov5640 camera does not work using mjpg-streamer as before with the armbian focal image. Also some testing with ffmpeg did not work. I can explain in more detail what “does not work” means. Ideally I’d like to have the mjpg-streamer (or the later experimental) in a working shape for testing purposes. THEN I can decide how to proceed with my own development.

ffmpeg would be also okay for testing. For me it looks like ffmpeg fails for other reasons.

 

I did dig through several newsgroups but could not identify the root cause.

Here is what I verified or tested:

1)

i2cdetect 2 output is correct. It shows the device on address 0x3c

I’m not sure if that worked from the beginning after several changes but this didn’t impact at all the failing camera.

 

2)

v4l2-ctl --list-devices   

cedrus (platform:cedrus):

        /dev/video0

        /dev/media0

 

3)

v4l2-ctl --list-formats

ioctl: VIDIOC_ENUM_FMT

        Type: Video Capture

 

        [0]: 'ST12' (Sunxi Tiled NV12 Format, compressed)

        [1]: 'NV12' (Y/CbCr 4:2:0)

 

4)

modprobe ov5640 does not show any errors inside the dmesg output.

Interestingly after rmmod and modprobe frame_rate=2 there IS an error “unknown parameter”. This means THIS current module as part of the kernel doesn’t have that parameter as specified elsewhere.

 

5)

I also played a little with dtb overlays but still no success. The last “hardcore test” 😊 was putting in the friendlyArm dtb into the armbian image but that caused other errors.

 

 

 

Thanks in advance!

Link to comment
Share on other sites

Your issue report is not a valid bug report per the Armbian bug reporting instructions (https://www.armbian.com/bugs).  With limited resources the Armbian project is only able to spend time on issues where all the requested information has been provided and for only the boards/images/software that are supported.  Your report is invalid for one or more of the following reasons (non-exhaustive list):

 

  • it is for an unsupported board or image (CSC/EOS/WIP/edge)
  • it is for software that is not supported (such as userspace modules installed on top of the core operating system)
  • it has been logged in the wrong forum (for example requests for help that are not actual bug reports)
  • it lacks requested data (armbianmonitor output)
  • it could have been easily solved by a quick search and/or reading documentation

 

Please review what you have submitted and the bug logging instructions (https://www.armbian.com/bugs) and either add the required information or open a new topic in the correct forum (such as Common issues / peer to peer technical support or General chit chat)

Link to comment
Share on other sites

Hi!

 

I'm quite sure this is (was) a bug because I fixed it :P:D Here's howto. I'd like to provide (attach here) the overlay dts / dtbo but that doesnt seem to be possible or allowed here?!

 

the built overlay-ov5640.dts has been derieved from an OrangePi One H3 and power pin GPIOs adjusted / removed then compiled into dtbo

https://forum.armbian.com/topic/13238-ov5640-device-tree-overlay-for-orangepi-one-h3/page/3/

 

compile and copy the overlay
dtc -I dts -O dtb -o overlay-ov5640.dtbo overlay-ov5640.dts
cp /root/overlay-ov5640.dtbo   /boot/dtb/overlay/sun8i-h3-ov5640.dtbo

finally the boot env has been adjusted
cd /boot
nano armbianEnv.txt

add the ov5640 to the  "overlays"  list. Note that the copied file above follows the naming conventions like the others.

overlays=i2c0 i2c1 i2c2 usbhost0 usbhost2 usbhost3 ov5640

after reboot one should have now a /dev/video1 and /dev/media1  device.

 

Note that /dev/video0 still seems to be the cedrus decoder only (not yet further investigated)

 

Note that the overlay enables the Pullups on i2c2 which isn't necessary on the NanoPi Duo2 because it has 1k on board as per schematics but it doesnt hurt.

 

mjpeg_streamer works with some parameter tweaking.

ffmpeg works as well but needs lots of more parameter tuning.

Next story is to get hardware acceleration working (cedrus) ideally for encoding and decoding h264.

 

 

T.

 

 

 

overlay-ov5640.dts overlay-ov5640.dtbo

Edited by schunckt
Files attached
Link to comment
Share on other sites

On 5/21/2021 at 12:28 PM, schunckt said:


dtc -I dts -O dtb -o overlay-ov5640.dtbo overlay-ov5640.dts

 

 

Thanks for a good description

 

I used winscp to copy the files to /root/ and When I tried to execute

 

overlay-ov5640.dts:30.17-30: Warning (reg_format): /fragment@3/__overlay__/camera@3c:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
overlay-ov5640.dtbo: Warning (pci_device_reg): Failed prerequisite 'reg_format'
overlay-ov5640.dtbo: Warning (pci_device_bus_num): Failed prerequisite 'reg_format'
overlay-ov5640.dtbo: Warning (simple_bus_reg): Failed prerequisite 'reg_format'
overlay-ov5640.dtbo: Warning (i2c_bus_reg): Failed prerequisite 'reg_format'
overlay-ov5640.dtbo: Warning (spi_bus_reg): Failed prerequisite 'reg_format'
overlay-ov5640.dts:28.27-49.11: Warning (avoid_default_addr_size): /fragment@3/__overlay__/camera@3c: Relying on default #address-cells value
overlay-ov5640.dts:28.27-49.11: Warning (avoid_default_addr_size): /fragment@3/__overlay__/camera@3c: Relying on default #size-cells value
overlay-ov5640.dtbo: Warning (avoid_unnecessary_addr_size): Failed prerequisite 'avoid_default_addr_size'
overlay-ov5640.dtbo: Warning (unique_unit_address): Failed prerequisite 'avoid_default_addr_size'
overlay-ov5640.dts:55.14-67.11: Warning (graph_child_address): /fragment@4/__overlay__/port: graph node has single child node 'endpoint', #address-cells/#size-cells are not necessary

 

I am getting this error. Any suggestions? 

 

I am using Nanopi M1 plus with cam500B (ov5640)

 

uname -a

Linux nanopim1plus 5.10.60-sunxi #21.08.2 SMP Tue Sep 14 16:28:44 UTC 2021 armv7l GNU/Linux

 

 

Thanks in advance
 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines