您尚未登录。

楼主 # 2021-09-30 11:36:59

542396750@qq.com
会员
注册时间: 2021-03-26
已发帖子: 153
积分: 14.5

V3S使用ov2640拍照

按照 https://blog.csdn.net/XT_PLAI/article/details/114707790

依次安装

insmod videobuf2-common.ko
insmod videobuf2-v4l2.ko
insmod videobuf2-memops.ko
insmod videobuf2-vmalloc.ko
insmod videobuf2-dma-contig.ko
# insmod v4l2-fwnode.ko
# insmod sun6i-csi.ko
# insmod ov2640.ko
[ 4605.152157] ov2640 1-0030: Product ID error fa:fa

# fswebcam -S 1 -d /dev/video0 -p UYVY -r 800x600 test.jpg
--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
No input was specified, using the first.
Error starting stream.
VIDIOC_STREAMON: Invalid argument
Unable to use mmap. Using read instead.
Unable to use read.

离线

#1 2021-09-30 11:38:14

哇酷小二
wechat微信:whycan_cn
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,378
积分: 1902
个人网站

Re: V3S使用ov2640拍照

[ 4605.152157] ov2640 1-0030: Product ID error fa:fa


I2C没有检测到摄像头,检查一下 PWN引脚状态。





离线

楼主 #2 2021-09-30 11:51:41

542396750@qq.com
会员
注册时间: 2021-03-26
已发帖子: 153
积分: 14.5

Re: V3S使用ov2640拍照

哇酷小二 说:

[ 4605.152157] ov2640 1-0030: Product ID error fa:fa


I2C没有检测到摄像头,检查一下 PWN引脚状态。

接的是zero开发板的dvp camera 的24Pin座子,对应的是csi的并口,我想会不会是我搞错接口了

离线

楼主 #3 2021-09-30 11:56:38

542396750@qq.com
会员
注册时间: 2021-03-26
已发帖子: 153
积分: 14.5

Re: V3S使用ov2640拍照

# ls /dev
bus                 ptyva               ttydc
console             ptyvb               ttydd
cpu_dma_latency     ptyvc               ttyde
fb0                 ptyvd               ttydf
full                ptyve               ttye0
gpiochip0           ptyvf               ttye1
i2c-0               ptyw0               ttye2
i2c-1

设备树配的是i2c-1,dev下面有i2c-1

离线

#4 2021-09-30 11:58:02

哇酷小二
wechat微信:whycan_cn
所在地: 你猜
注册时间: 2020-04-22
已发帖子: 3,378
积分: 1902
个人网站

Re: V3S使用ov2640拍照

可以用 i2ctools 里面的 i2cdetect 检测摄像头是否存在,如果不会使用,可以本站右上角搜索。





离线

楼主 #5 2021-09-30 12:11:39

542396750@qq.com
会员
注册时间: 2021-03-26
已发帖子: 153
积分: 14.5

Re: V3S使用ov2640拍照

# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --                         
# i2cdetect -y 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --                         
#
I2C1没有检测到设备,用晕哥的蓝莓派的固件是可以正常拍照的,就是拍出来有点黑

离线

#6 2021-09-30 16:41:44

unturned3
会员
注册时间: 2020-07-01
已发帖子: 263
积分: 301

Re: V3S使用ov2640拍照

个人经验:搞这些驱动的时候先把内核模块给关了,这样每次就不用手动加载模块或者忘记加载某个模块了

离线

楼主 #7 2021-10-08 09:14:24

542396750@qq.com
会员
注册时间: 2021-03-26
已发帖子: 153
积分: 14.5

Re: V3S使用ov2640拍照

USB口供电问题,使用直流电源可以了,就是拍照一团黑,只看到大概轮廓

离线

楼主 #8 2021-10-08 09:15:23

542396750@qq.com
会员
注册时间: 2021-03-26
已发帖子: 153
积分: 14.5

Re: V3S使用ov2640拍照

# fswebcam -S 1 -d /dev/video0 -p UYVY -r 800x600 test777.jpg
--- Opening /dev/video0...
Trying source module v4l2...[  198.727812] sun6i-csi 1cb4000.csi: Unsupported pixformat: 0x59565955, defaulting to YUYV

/dev/video0 opened.
No input was specified, using the first.
--- Capturing frame...
Skipping frame...
Capturing 1 frames...
Captured 2 frames in 0.07 seconds.
--- Processing captured image...
Unable to load font 'sans': Could not find/open font
Disabling the the banner.
Writing JPEG image to 'test777.jpg'.

离线

#9 2022-06-09 21:27:37

Expelliarmus
会员
注册时间: 2022-02-24
已发帖子: 9
积分: 4

Re: V3S使用ov2640拍照

@542396750@qq.com

我使用了直流电源,还是一样检测不到挂载的i2c设备,这应该是啥问题呢

# i2cdetect -y 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --                         
# i2cdetect -y 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- UU -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --                         

离线

页脚

工信部备案:粤ICP备20025096号 Powered by FluxBB

感谢为中文互联网持续输出优质内容的各位老铁们。 QQ: 516333132, 微信(wechat): whycan_cn (哇酷网/挖坑网/填坑网) service@whycan.cn