Power & Source of Big Ideas

CAM500B + NanoPi-M1 driver controls

Moderators: chensy, FATechsupport

Hi,

I am using NanoPi-M1. Running official Debian image. For the camera I am using sunxi-vfe driver, version 1.0.0 (loaded with modprobe vfe_v4l2 command). This driver lets me access the camera as device /dev/video0 and with ffmpeg or fswebcam I can get image from the camera.

But I want to control some other aspect of the camera like for exaple focus, but I cannot access such control. Is there any better driver for this camera ? Or does anybody know how to access other controls of this camera ?

Thank you,

Vasek.
Hi,
The NanoPi M1 has supported CAM500B camera ,and the driver source codes are all open, and the camera driver supports exaple focus. I donot understand why do you have another driver, and the CAM500B camera driver code is ov5640.c , you can download the source kernel to study.
Hi,

I am sorry, my first post might have been a little bit confused. That's because I am quite new to this. So please excuse me if I write something that seems dummy. Like the modprobe command, which I realized was not needed.

However, if I run the official Debian image and physically connect the CAM500B, video0 device appears in devices. So there is some camera driver allready present. When I want to get the driver info with "v4l2_ctl -d /dev/video0 --info" command I get the following output:

Driver info (not using libv4l2):
Driver name : sunxi-vfe
Card type : sunxi-vfe
Bus info : sunxi_vfe sunxi_vfe.0\
Driver version : 1.0.0
Capabilities : 0x05000001
Video Capture
Read/Write
Streaming

So thats why I was talking about the sunxi-vfe driver. I tried to look for the ov5640 driver but I didn't find it in the official Debian image for M1. When I searched trough the drivers built in the kernel there was no ov5640 driver. Also in the list of loadable drivers I only found "ov5648" and "ov5647" modules, but no "ov5640".

Can you please give me some more specific information, like where can I download the ov5640.ko module? By the way my kernel version is "3.4.39-h3".

Vašek.
sh3ppard wrote:
Hi,

I am sorry, my first post might have been a little bit confused. That's because I am quite new to this. So please excuse me if I write something that seems dummy. Like the modprobe command, which I realized was not needed.

However, if I run the official Debian image and physically connect the CAM500B, video0 device appears in devices. So there is some camera driver allready present. When I want to get the driver info with "v4l2_ctl -d /dev/video0 --info" command I get the following output:

Driver info (not using libv4l2):
Driver name : sunxi-vfe
Card type : sunxi-vfe
Bus info : sunxi_vfe sunxi_vfe.0\
Driver version : 1.0.0
Capabilities : 0x05000001
Video Capture
Read/Write
Streaming

So thats why I was talking about the sunxi-vfe driver. I tried to look for the ov5640 driver but I didn't find it in the official Debian image for M1. When I searched trough the drivers built in the kernel there was no ov5640 driver. Also in the list of loadable drivers I only found "ov5648" and "ov5647" modules, but no "ov5640".

Can you please give me some more specific information, like where can I download the ov5640.ko module? By the way my kernel version is "3.4.39-h3".

Vašek.


Hi, Vasek

I am not this driver's developer, but your output looks it can work well. It shows the official Debian has supported this camera, and the driver's location is lichen/linux-3.4/drivers/media/video/sunxi-vfe/device/ov5640.c

Mindee
Hi,

well as I said in my first post the camera works even with the default driver. But the default driver can only control the most basic aspects of the camera and what is worse the framerate of the video is very small (about 8 FPS with 720p resolution). And on your e-shop under camera features is written that the camera should be able to transfer 1080p video at 30 fps. Furthermore RGB output formats should be supported, but with the default driver they are not. That's why I am trying to find better driver.

Few days ago I found the driver source code (ov5640.c) under lichee project. I tried to find the driver when configurating the kernel with "menuconfig". I could not find the option to include this particular driver, so I had to modify some file where compile options are stored. After that I was able to compile ov5640.c and ov5640.ko was succesfully generated. But the problem was that the resulting kernel was faulty and I couldn't acces the video0 device at all now.

Unfortunatelly I don't have very much experience dealing with such things, so that's why I need some help wiht this. So can you please tell me how to compile kernel with ov5640 driver ?

Thanks,
Vašek.
sh3ppard wrote:
Hi,

well as I said in my first post the camera works even with the default driver. But the default driver can only control the most basic aspects of the camera and what is worse the framerate of the video is very small (about 8 FPS with 720p resolution). And on your e-shop under camera features is written that the camera should be able to transfer 1080p video at 30 fps. Furthermore RGB output formats should be supported, but with the default driver they are not. That's why I am trying to find better driver.

Few days ago I found the driver source code (ov5640.c) under lichee project. I tried to find the driver when configurating the kernel with "menuconfig". I could not find the option to include this particular driver, so I had to modify some file where compile options are stored. After that I was able to compile ov5640.c and ov5640.ko was succesfully generated. But the problem was that the resulting kernel was faulty and I couldn't acces the video0 device at all now.

Unfortunatelly I don't have very much experience dealing with such things, so that's why I need some help wiht this. So can you please tell me how to compile kernel with ov5640 driver ?

Thanks,
Vašek.


Hi, Vasek

We'll check and vertify the description on the wiki and e-shop pages if it's necessary. And I don't think H3 can support 1080p@30fps, it has the poor perforemance on the video encoding. It's independent that this camera module can reach 1080p@30fps truelly, it's depended on the CPU's perforemance and the board designing.

Thank you

Mindee
Hi,

well you can check the description. But I am not saying that I need to get 30fps at 1080p straight away. It would be great if I could get about 15fps with 1080p resolution. Because the framerates I get now are really low and the camera is therefore not usable for streaming the image for me right now. I can only use it to take pictures, but that's not what I want.

But we are getting bit off topic here. The issue I want to solve is to get the ov5640 driver working, because as I wrote the low fps is not the only problem with this driver.

Vašek.
Hello,
I am watching this topic, because I am also working on camera project with Nanopi. That's a pity that you are reading specs of new board, it looks good, you buy that board and... that's the beginning of troubles. I feel the same (fighting with weak bluetooth implementation) .
Anyway, reading about your requirements, may by this will be interesting for you:
https://www.kickstarter.com/projects/16 ... ine-vision
abramq wrote:
Hello,
I am watching this topic, because I am also working on camera project with Nanopi. That's a pity that you are reading specs of new board, it looks good, you buy that board and... that's the beginning of troubles. I feel the same (fighting with weak bluetooth implementation) .
Anyway, reading about your requirements, may by this will be interesting for you:
https://www.kickstarter.com/projects/16 ... ine-vision


Wow, your project is amazing, We'll try our best to provide help to all the maker & innovationner. But sometime we have no way, We are the SoC/Module user too, please understand.

We'll keep watching this(camera and bluetooth).

Cheers

Mindee
That is not_my_project, this is project I have found.
But I also think it is great :-)
Mindee wrote:
abramq wrote:
Hello,
I am watching this topic, because I am also working on camera project with Nanopi. That's a pity that you are reading specs of new board, it looks good, you buy that board and... that's the beginning of troubles. I feel the same (fighting with weak bluetooth implementation) .
Anyway, reading about your requirements, may by this will be interesting for you:
https://www.kickstarter.com/projects/16 ... ine-vision


Wow, your project is amazing, We'll try our best to provide help to all the maker & innovationner. But sometime we have no way, We are the SoC/Module user too, please understand.

We'll keep watching this(camera and bluetooth).

Cheers

Mindee



I hope you will. I understand, but I need to get the camera working properly. And I am not just a hobbyist, but I am working on a product for our company. And if we solve this problem, we'll probably buy NanoPi boards with cameras in hundreds maybe even thousands. Furthermore we will keep this in mind when deciding which board to use with our future products.

Thanks
Vašek.
I am not so optimistic, unfortunatelly...
After searching many forums, many SBC (single computer boards) I can see, that all you can be sure for working is putting light to connected LED :-( When you need more (camera, bluetooth, WiFi-Direct) - it could work, but you can not be sure it will work as stable as production unit needs.
Producers are making boards and all they care about is to make new models, not making more stable software for models that are on the market.
That's why my idea for making a product for selling in hundreds will probably die...
abramq wrote:
I am not so optimistic, unfortunatelly...
After searching many forums, many SBC (single computer boards) I can see, that all you can be sure for working is putting light to connected LED :-( When you need more (camera, bluetooth, WiFi-Direct) - it could work, but you can not be sure it will work as stable as production unit needs.
Producers are making boards and all they care about is to make new models, not making more stable software for models that are on the market.
That's why my idea for making a product for selling in hundreds will probably die...



That's not correct, we not only make the board, we also provide the decent BSP and workable OS image too, as we described on the page. You can easily check and use the camera and bluetooth following the wiki instruction. You couldn't find the better and honest one under this price.

And we make better quality control, Many customer bought and applied FriendlyARM's board for industrial application.

It's better to have a look of the chip/module's specification and the board's schematic, and got some samples and do a strict testing before a project. After all we don't know your project's detail.

Most of people know Allwinner just make the cheapest chip, and hectic tech support. You choose the Allwinner, you choose the endless trouble, We have Samsung 's chip based board too. The price is a little higher, but we still provide the remarkable price and decent BSP among the similar boards.


Mindee
Ok, thanks for claryfy. I will try to do some real test, will let you know.

Who is online

In total there are 21 users online :: 0 registered, 0 hidden and 21 guests (based on users active over the past 5 minutes)
Most users ever online was 5185 on Wed Jan 22, 2020 1:44 pm

Users browsing this forum: No registered users and 21 guests