页次: 1
如果没记错, 新唐/智源的IPCAM sdk就是这么做的.
尝试直接用ffmpeg命令行录制,但好像启动不了相机。
[ 114.115554] [VFE]vfe_open
[ 114.121482] [VFE]..........................vfe clk open!.......................
[ 114.132577] [VFE]vfe_open ok
[ 114.138330] [VFE_ERR]input index(-1) > dev->dev_qty(1)-1 invalid!
[ 114.148433] [VFE]vfe_close
[ 114.153919] [VFE]vfe select input flag = 0, s_input have not be used .
[ 114.164043] [VFE]..........................vfe clk close!.......................
[ 114.175761] [VFE]vfe_close end
[ 114.181508] [VFE]PE1_reg_value_global is 33332222,vfe_close
[video4linux2,v4l2 @ 0xa162f0] ioctl(VIDIOC_ENUMINPUT): Invalid argument
/dev/video1: Invalid argument
文件大小正常吗?
抓 bmp 试一试:
fswebcam -d /dev/video0 -q -r 1024x768 test.bmp
不行照片一片黑,大小只有二十多k,之前使用fswebcam -d /dev/video1 -p UYVY -S 10 tset.jpg是可以正常使用ov2640摄像头的,抓取到的图片350k,但我现在使用ov5647摄像头,这个命令不能用[ 142.982353] [VFE_ERR]try yuv422 bus error when pix fmt is yuv422 interleaved at try_fmt_internal!
[ 142.992432] [VFE_ERR]pixel format (0x59565955) width 384 height 288 invalid at vidioc_try_fmt_vid_cap.
PCB图就别想了, 这里有 pdf 原理图: https://whycan.cn/t_3019.html
那是不是就只能通过自己重新画一块转接板的形式使用mipi摄像头了
单眼皮小哥哥 说:太一酱鸭 说:替他回,直接用的源码,可行
用的是ov5647吗?
ov4689和h42,他自己做了板子
你好,能不能给我看一下scrip文件怎么设置,我这里mipi摄像头抓取图像不成功
[ 54.616044] [VFE]vfe_open
--- Opening /dev/video0...
[ 54.619454] [VFE]..........................vfe clk open!.......................
Trying source module v4l2...[ 54.631190] [VFE]vfe_open ok[ 54.636656] [VFE_WARN]Not find this sensor info, Set vfe core clk = 500000000, after Set vfe core clk = 297000000
/dev/video0 opened.
No input was specified, using the first.
[ 54.660635] [VFE_WARN]os_gpio_set_status, hdl is NULL
[ 54.666440] [VFE_WARN]os_gpio_set_status, hdl is NULL
[ 54.673392] [VFE]mclk on
[ 54.744270] [VFE_ERR]sensor initial error when selecting target device!
[ 54.752405] [VFE]vfe_close
Error selecting input 0
54.755737] [VFE]mclk off
1mVIDIOC_S_INPUT: Operation not permitted
[ 54.785986] [VFE_WARN]os_gpio_set_status, hdl is NULL
[ 54.791715] [VFE_WARN]os_gpio_set_status, hdl is NULL
[ 54.809459] [VFE]..........................vfe clk close!.......................
[ 54.818077] [VFE]vfe_close end
[ 54.821600] [VFE]PE1_reg_value_global is 33333323,vfe_close
我邮箱345067636@qq.com
在未改变tf卡中内容的情况下,使用ov2640采集图像出现没有输入的情况,并且摄像头很烫,然后过个一两天,重新把ov2640插拔一下又好了,有人知道是什么原因吗?
[ 66.630452] [VFE]vfe_open
--- Opening /dev/video1...
[ 66.633780] [VFE]..........................vfe clk open!.......................
Trying source module v4l2...[ 66.645410] [VFE]vfe_open ok
/dev/video1 opened.
[ 66.651416] [VFE_WARN]Not find this sensor info, Set vfe core clk = 500000000, after Set vfe core clk = 297000000
No input was specified, using the first.
[ 66.690036] [VFE]mclk on
[ 66.780859] [VFE_ERR]sensor initial error when selecting target device!
[ 66.788566] [VFE]vfe_close
Error selecting input 0
66.792033] [VFE]mclk off
1mVIDIOC_S_INPUT: Operation not permitted
[ 66.842101] [VFE]..........................vfe clk close!.......................
[ 66.850639] [VFE]vfe_close end
[ 66.854220] [VFE]PE1_reg_value_global is 33332212,vfe_close
就是,我现在想利用摄像头拍摄视频,可以不压缩储存,应该怎么做?利用ffmpeg?
# ffmpeg -f video4linux2 -s 320x240 -i /dev/video1 /mnt/test.avi
ffmpeg version 3.3.4 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 6.3.1 (Linaro GCC 6.3-2017.02) 20170109
configuration: --enable-cross-compile --cross-prefix=/xumiaohua/licheepi/buildroot/buildroot-2017.08.1/output/host/bin/arm-linux-gnueabihf- --sysroot=/xumiaohua/licheepi/buildroot/buildroot-2017.08.1/output/host/arm-buildroot-linux-gnueabihf/sysroot --host-cc=/usr/bin/gcc --a[ 98.846493] [VFE]vfe_open
rch=arm --target-os=linux --disa[ 98.852706] [VFE]..........................vfe clk open!.......................
ble-stripping --pkg-config=/xumi[ 98.863815] [VFE]vfe_open ok
aohua/licheepi/buildroot/buildro[ 98.869557] [VFE_ERR]input index(-1) > dev->dev_qty(1)-1 invalid!
ot-2017.08.1/output/host/bin/pkg[ 98.879665] [VFE]vfe_close
-config --disable-static --enabl[ 98.885060] [VFE]vfe select input flag = 0, s_input have not be used .
e-shared --prefix=/usr --enable-[ 98.895273] [VFE]..........................vfe clk close!.......................
avfilter --disable-version3 --en[ 98.906986] [VFE]vfe_close end
able-logging --enable-optimizati[ 98.912736] [VFE]PE1_reg_value_global is 33332222,vfe_close
ons --disable-extra-warnings --enable-avdevice --enable-avcodec --enable-avformat --enable-network --disable-gray --enable-swscale-alpha --disable-small --enable-dct --enable-fft --enable-mdct --enable-rdft --disable-crystalhd --disable-dxva2 --enable-runtime-cpudetect --disable-hardcoded-tables --disable-mipsdsp --disable-mipsdspr2 --disable-msa --enable-hwaccels --disable-cuda --disable-cuvid --disable-nvenc --disable-avisynth --disable-frei0r --disable-libopencore-amrnb --disable-libopencore-amrwb --disable-libcdio --disable-libdc1394 --disable-libgsm --disable-libilbc --disable-libnut --disable-libopenjpeg --disable-libschroedinger --disable-libvo-amrwbenc --disable-symver --disable-doc --disable-gpl --disable-nonfree --enable-ffmpeg --disable-ffplay --disable-ffserver --disable-avresample --disable-ffprobe --disable-postproc --disable-swscale --enable-indevs --enable-outdevs --enable-pthreads --enable-zlib --disable-bzlib --disable-libfdk-aac --disable-gnutls --disable-openssl --disable-libopenh264 --disable-vaapi --disable-vdpau --disable-libopencv --disable-libopus --disable-libvpx --disable-libass --disable-libbluray --disable-librtmp --disable-libmp3lame --disable-libmodplug --disable-libspeex --disable-libtheora --disable-libwavpack --enable-libfreetype --disable-fontconfig --disable-libx264 --disable-libx265 --disable-yasm --disable-mmx --disable-sse --disable-sse2 --disable-sse3 --disable-ssse3 --disable-sse4 --disable-sse42 --disable-avx --disable-avx2 --enable-armv6 --enable-vfp --enable-neon --disable-altivec --extra-libs=-latomic --enable-pic --cpu=cortex-a7
libavutil 55. 58.100 / 55. 58.100
libavcodec 57. 89.100 / 57. 89.100
libavformat 57. 71.100 / 57. 71.100
libavdevice 57. 6.100 / 57. 6.100
libavfilter 6. 82.100 / 6. 82.100
libswresample 2. 7.100 / 2. 7.100
[video4linux2,v4l2 @ 0x12ea1f0] ioctl(VIDIOC_ENUMINPUT): Invalid argument
/dev/video1: Invalid argument
#
加油,你最棒。这个坑你来填。
'3.4.39+ mod_unload modversions ARMv7 p2v8 ' should be
'3.4.39 mod_unload ARMv7 p2v8 '
上是官方驱动的veimagic,下是我自己编译内核的vermagic
我把自己编译的内核的vermagic修改了一下,在include/linux/vermagic.h中
#include <generated/utsrelease.h>
/* Simply sanity version stamp for modules. */
#ifdef CONFIG_SMP
#define MODULE_VERMAGIC_SMP "SMP "
#else
#define MODULE_VERMAGIC_SMP ""
#endif
#ifdef CONFIG_PREEMPT
#define MODULE_VERMAGIC_PREEMPT "preempt "
#else
#define MODULE_VERMAGIC_PREEMPT ""
#endif
#ifdef CONFIG_MODULE_UNLOAD
#define MODULE_VERMAGIC_MODULE_UNLOAD "mod_unload "
#else
#define MODULE_VERMAGIC_MODULE_UNLOAD ""
#endif
#ifdef CONFIG_MODVERSIONS
#define MODULE_VERMAGIC_MODVERSIONS "modversions "
#else
#define MODULE_VERMAGIC_MODVERSIONS "modversions " //在空的“”中加入modversions
#endif
#ifndef MODULE_ARCH_VERMAGIC
#define MODULE_ARCH_VERMAGIC ""
#endif
//在UTS_RELEASE“”中加一个+
#define VERMAGIC_STRING \
UTS_RELEASE "+ " \
MODULE_VERMAGIC_SMP MODULE_VERMAGIC_PREEMPT \
MODULE_VERMAGIC_MODULE_UNLOAD MODULE_VERMAGIC_MODVERSIONS \
MODULE_ARCH_VERMAGIC
经过测试,已经可以加载官方驱动了
谢谢!
The following tables provide descriptions of the device control registers contained in the OV2710. For all registers enable/disable bits, ENABLE = 1 and DISABLE = 0. The device slave addresses are 0x6C for write and 0x6D for read.
没有问题。
但是, ov2710 只有一组读写地址, 所以你得接 V3s两组不同的I2C。
ov2710的 MIPI/DVP复用了, 你用i2c写寄存器切换即可。
那配置文件里的i2c地址写ov2710的写地址吗?
1. 用你的固件, 只替换 ov2640.ko
2. 你荔枝派的固件,替换你的 ov2640.ko这两种方法都试一试。
之前我也试过将驱动编译进内核以及编译为模块两种方式,编译为模块的情况下,.ko文件无法加载,编译进内核情况下,可以加载,并在/dev下出现video1设备节点,开机信息如下:
[ 1.112387] [VFE]cci probe start cci_sel = 0!
[ 1.117341] [VFE]cci probe end cci_sel = 0!
[ 1.122219] [VFE]cci_init end
[ 1.125617] [VFE]Welcome to Video Front End driver
[ 1.131294] [VFE]pdev->id = 1
[ 1.134682] [VFE]dev->mipi_sel = 1
[ 1.138545] [VFE]dev->vip_sel = 1
[ 1.142332] [VFE]dev->isp_sel = 0
[ 1.152312] [VFE_WARN]vfe vpu clock is null
[ 1.157314] [VFE_ERR]vip1 request pinctrl handle for device [csi1] failed!
[ 1.165328] [VFE]vfe_init end
[ 1.169641] platform reg-20-cs-dcdc2: Driver reg-20-cs-dcdc2 requests probe deferral
[ 1.178493] [VFE]probe_work_handle start!
[ 1.183049] [VFE]..........................vfe clk open!.......................
[ 1.191490] platform reg-20-cs-dcdc3: Driver reg-20-cs-dcdc3 requests probe deferral
[ 1.200331] platform reg-20-cs-ldo1: Driver reg-20-cs-ldo1 requests probe deferral
[ 1.209020] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral
[ 1.217925] [VFE]v4l2 subdev register input_num = 0
[ 1.223446] [VFE]vfe sensor detect start! input_num = 0
[ 1.229341] [VFE]Find sensor name is "ov2640", i2c address is 60, type is "YUV" !
[ 1.237832] [VFE]Sub device register "ov2640" i2c_addr = 0x60 start!
[ 1.245074] [VFE]v4l2_device_register_subdev return 0
[ 1.250781] [VFE]registered sensor subdev is OK!
[ 1.256080] [VFE]Check sensor!
[ 1.259557] [VFE]Sub device register "ov2640" is OK!
[ 1.265296] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral
[ 1.274005] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral
[ 1.282720] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral
[ 1.291625] sunxi_wdt_init_module: sunxi WatchDog Timer Driver v1.0
[ 1.298952] sunxi_wdt_probe: devm_ioremap return wdt_reg 0xf1c20ca0, res->start 0x01c20ca0, res->end 0x01c20cbf
[ 1.310383] [VFE]V4L2 device registered as video1
[ 1.316044] [VFE]..........................vfe clk close!.......................
[ 1.324626] sunxi_wdt_probe: initialized (g_timeout=16s, g_nowayout=0)
[ 1.331993] wdt_enable, write reg 0xf1c20cb8 val 0x00000000
[ 1.338359] wdt_set_tmout, write 0x000000b0 to mode reg 0xf1c20cb8, actual timeout 16 sec
[ 1.347639] [VFE]probe_work_handle end!
1. 用你的固件, 只替换 ov2640.ko
2. 你荔枝派的固件,替换你的 ov2640.ko这两种方法都试一试。
在荔枝派自带的固件中把ov2640驱动换成由bsp内核自带的驱动编译而来的.ko文件,显示不能加载ov2640的驱动,信息如下;
# ./install.sh
[ 25.471912] [VFE]cci probe start cci_sel = 0!
[ 25.476917] [VFE]cci probe end cci_sel = 0!
[ 25.482453] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral
[ 25.491815] [VFE]cci_init end
[ 25.499469] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral
[ 25.510627] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral
[ 25.519308] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral
[ 25.531824] platform reg-20-cs-ldo1: Driver reg-20-cs-ldo1 requests probe deferral
[ 25.542610] platform reg-20-cs-dcdc3: Driver reg-20-cs-dcdc3 requests probe deferral
[ 25.555246] platform reg-20-cs-dcdc2: Driver reg-20-cs-dcdc2 requests probe deferral
insmod: can't insert 'ov2640_try.ko': invalid module format
[ 25.634324] [VFE]Welcome to Video Front End driver
[ 25.640725] [VFE]pdev->id = 1
[ 25.644142] [VFE]dev->mipi_sel = 1
[ 25.648023] [VFE]dev->vip_sel = 1
[ 25.651961] [VFE]dev->isp_sel = 0
[ 25.662117] [VFE_WARN]vfe vpu clock is null
[ 25.667231] [VFE_ERR]vip1 request pinctrl handle for device [csi1] failed!
[ 25.675641] platform reg-20-cs-dcdc2: Driver reg-20-cs-dcdc2 requests probe deferral
[ 25.684520] [VFE]probe_work_handle start!
[ 25.689082] [VFE]..........................vfe clk open!.......................
[ 25.697496] [VFE]vfe_init end
# [ 25.703272] platform reg-20-cs-dcdc3: Driver reg-20-cs-dcdc3 requests probe deferral
[ 25.712805] [VFE]v4l2 subdev register input_num = 0
[ 25.718343] [VFE]vfe sensor detect start! input_num = 0
[ 25.724311] [VFE]Sub device register "ov2640" i2c_addr = 0x60 start!
[ 25.731583] [VFE_ERR]Error registering v4l2 subdevice No such device!
[ 25.738941] [VFE_ERR]vfe sensor register check error at input_num = 0
[ 25.746541] platform reg-20-cs-ldo1: Driver reg-20-cs-ldo1 requests probe deferral
[ 25.755450] [VFE]V4L2 device registered as video1
[ 25.760897] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral
[ 25.769550] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral
[ 25.778217] [VFE]..........................vfe clk close!.......................
[ 25.786562] [VFE]probe_work_handle end!
[ 25.792200] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral
[ 25.801022] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral
# ./capture.sh
[ 56.502808] [VFE]vfe_open
--- Opening /dev/video1...
[ 56.506027] [VFE]..........................vfe clk open!.......................
Trying source module v4l2...[ 56.517927] [VFE]vfe_open ok
/dev/video1 opened.
[ 56.523825] [VFE_ERR]input index(0) > dev->dev_qty(1)-1 invalid!, device_valid_flag[0] = 0
No input was specified, usin[ 56.536096] [VFE]vfe_close
g the first.
Unable to[ 56.541620] [VFE]vfe select input flag = 0, s_input have not be used .
query input 0.
VIDIOC[ 56.551860] [VFE]..........................vfe clk close!.......................
_ENUMINPUT: Invalid argument
56.563286] [VFE]vfe_close end
0m[ 56.569327] [VFE]PE1_reg_value_global is 33333323,vfe_close
gzip: image.jpg: No such file or directory
rz
开始 zmodem 传输。 按 Ctrl+C 取消。
Can't open any requested files.
# **B01000000039a32
-sh: **B01000000039a32: not found
在/dev下存在video1设备节点
完全用晕哥你给的固件显示信息如下:
# ./install.sh
[ 637.667654] [VFE]cci probe start cci_sel = 0!
[ 637.673195] [VFE]cci probe end cci_sel = 0!
[ 637.678073] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral
[ 637.687460] [VFE]cci_init end
[ 637.691282] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral
[ 637.699949] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral
[ 637.713197] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral
[ 637.724137] platform reg-20-cs-ldo1: Driver reg-20-cs-ldo1 requests probe deferral
[ 637.736593] platform reg-20-cs-dcdc3: Driver reg-20-cs-dcdc3 requests probe deferral
[ 637.747744] platform reg-20-cs-dcdc2: Driver reg-20-cs-dcdc2 requests probe deferral
[ 637.777035] [VFE]PE CNF3 reg_value is 33373333
[ 637.782281] [VFE]PE CNF3 reg_value is 32273333
[ 637.787322] [VFE]PE CNF2 reg_value is 22222222
[ 637.792471] [VFE]PE CNF1 reg_value is 33333333
[ 637.797508] [VFE]PE CNF1 reg_value is 33332222
[ 637.860867] [VFE]Welcome to Video Front End driver
[ 637.866804] [VFE]pdev->id = 1
[ 637.870275] [VFE]dev->mipi_sel = 1
[ 637.874159] [VFE]dev->vip_sel = 1
[ 637.878042] [VFE]dev->isp_sel = 0
[ 637.888405] [VFE_WARN]vfe vpu clock is null
[ 637.893713] [VFE_ERR]vip1 request pinctrl handle for device [csi1] failed!
[ 637.902095] platform reg-20-cs-dcdc2: Driver reg-20-cs-dcdc2 requests probe deferral
[ 637.911136] [VFE]probe_work_handle start!
[ 637.915708] [VFE]..........................vfe clk open!.......................
[ 637.924400] [VFE]vfe_init end
# [ 637.929524] platform reg-20-cs-dcdc3: Driver reg-20-cs-dcdc3 requests probe deferral
[ 637.939035] [VFE]v4l2 subdev register input_num = 0
[ 637.944613] [VFE]vfe sensor detect start! input_num = 0
[ 637.950551] [VFE]Sub device register "ov2640" i2c_addr = 0x60 start!
[ 637.957814] [VFE]v4l2_device_register_subdev return 0
[ 637.963536] [VFE]registered sensor subdev is OK!
[ 637.968867] [VFE]Check sensor!
[ 637.972367] [VFE]Sub device register "ov2640" is OK!
[ 637.978994] platform reg-20-cs-ldo1: Driver reg-20-cs-ldo1 requests probe deferral
[ 637.987805] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral
[ 637.996689] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral
[ 638.005550] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral
[ 638.014347] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral
[ 638.023834] [VFE]V4L2 device registered as video1
[ 638.029207] [VFE]..........................vfe clk close!.......................
[ 638.038050] [VFE]probe_work_handle end!
# ./capture.sh
[ 912.476901] [VFE]vfe_open
--- Opening /dev/video1...
[ 912.480644] [VFE]..........................vfe clk open!.......................
Trying source module v4l2...[ 912.491889] [VFE]vfe_open ok
[ 912.497628] [VFE_WARN]Not find this sensor info, Set vfe core clk = 500000000, after Set vfe core clk = 297000000
/dev/video1 opened.
No input was specified, using the first.
[ 912.540041] [VFE]mclk on
[ 912.770081] [VFE_WARN]v4l2 sub device queryctrl (null) unsuccess!
Adjusting resolution from 384x28[ 912.779192] [VFE]buffer_setup, buffer count=4, size=614400
8 to 640x480.
[ 912.791268] [VFE]PE1_reg_value_global is 33332222,vidioc_streamon
[ 912.798170] dev->fmt->bus_pix_code; = 2016
[ 912.814332] [VFE]PE1_reg_value_global is 33332222,vidioc_streamon
--- Capturing frame...
Skipping 10 frames...
[ 912.895955] [VFE]capture video mode!
[ 912.962580] [VFE]capture video first frame done!
Capturing 1 frames...
Captured 11 frames in 0.66 secon[ 913.644866] [VFE]vfe_close
ds. (16 fps)
[ 913.650830] [VFE]mclk off
[ 913.692101] [VFE]..........................vfe clk close!.......................
[ 913.700785] [VFE]vfe_close end
[ 913.704300] [VFE]PE1_reg_value_global is 33332212,vfe_close
--- Processing captured image...
Unable to load font 'sans': Could not find/open font
Disabling the the banner.
Writing JPEG image to 'image.jpg'.
rm: can't remove 'image.jpg.gz': No such file or directory
rz
开始 zmodem 传输。 按 Ctrl+C 取消。
100% 366 KB 11 KB/s 00:00:33 0 Errors
把固件自带的一系列驱动放在我自己编译的内核下,无法加载:
# ./install.sh
insmod: can't insert 'videobuf2-core.ko': invalid module format
insmod: can't insert 'videobuf2-memops.ko': invalid module format
insmod: can't insert 'videobuf2-vmalloc.ko': invalid module format
insmod: can't insert 'cci.ko': invalid module format
insmod: can't insert 'vfe_os.ko': invalid module format
insmod: can't insert 'vfe_subdev.ko': invalid module format
insmod: can't insert 'videobuf-core.ko': invalid module format
insmod: can't insert 'videobuf-dma-contig.ko': invalid module format
insmod: can't insert 'ov2640.ko': invalid module format
insmod: can't insert 'vfe_v4l2.ko': invalid module format
晕哥 说:你先测试这个固件 ov2640 是否正常吧, 先确定硬件是否正常。
至于修改, 听说只是改一点点, 应该只是使能 I2C 的管脚或者I2C的功能。
晕哥,我刚刚测试了这个固件,摄像头的驱动是不是没编译进这个内核。测试显示找不到设备
# fswebcam -S 1 -d /dev/video0 -p UYVY -r 800x600 ./test.jpg
--- Opening /dev/video0...
stat: No such file or directory
# fswebcam -S 1 -d /dev/video1 -p UYVY -r 800x600 test.jpg
--- Opening /dev/video1...
stat: No such file or directory
在/dev下也没有video设备节点
是不是需要加载驱动,驱动不知道放在哪里?我grep查找一下,感觉开发板死机了
晕哥 说:你先测试这个固件 ov2640 是否正常吧, 先确定硬件是否正常。
至于修改, 听说只是改一点点, 应该只是使能 I2C 的管脚或者I2C的功能。
晕哥,这个.dd文件也是像之前的uboot文件一样用dd命令烧进tf卡就行了是吗?
晕哥 说:你先测试这个固件 ov2640 是否正常吧, 先确定硬件是否正常。
至于修改, 听说只是改一点点, 应该只是使能 I2C 的管脚或者I2C的功能。
好的,我先试试,谢谢晕哥!
那现在 fswebcam 编译出来了吗, 可以测试摄像头了吗?
可以了,这是使用fswebcam的信息
# fswebcam -S 1 -d /dev/video1 -p UYVY -r 800x600 ./test.jpg
[ 72.901540] [VFE]vfe_open
--- Opening /dev/video1...
[ 72.904647] [VFE]..........................vfe clk open!.......................
Trying source module v4l2...[ 72.916548] [VFE]vfe_open ok
[ 72.922585] [VFE]Set vfe core clk = 108000000, after Set vfe core clk = 99000000
/dev/video1 opened.
No input was specified, using the first.
[ 72.960038] [VFE]mclk on
[ 73.051021] [VFE_ERR]sensor initial error when selecting target device!
[ 73.058837] [VFE]vfe_close
Error selecting input 0
73.062216] [VFE]mclk off
1mVIDIOC_S_INPUT: Operation not permitted
[ 73.112101] [VFE]..........................vfe clk close!.......................
[ 73.120742] [VFE]vfe_close end
一直都有的,可能因为依赖别的选项, 所以没有显示出来。
grep 搜索 BR2_PACKAGE_FSWEBCAM 或者 PACKAGE_FSWEBCAM
在源码中找到了fswebcam,发现在上层目录package下的config文件中并没有包含fswebcam,我把fswebcam的config文件添加了进去
source "package/fswebcam/Config.in"
再make menuconfig就出现了fswebcam选项。并且能选择。
fswebcam的config文件中显示有两个依赖:
depends on BR2_USE_MMU
depends on !BR2_STATIC_LIBS
这两个选项我查找了一下,晕哥你给的配置里面应该都选了。
我用的是晕哥你在入坑记录里的buildroot,没找到fswebcam。然后找了最新版本的buildroot,有ffmpeg和motion,也没有fswebcam。
fswebcam 能读取摄像头数据吗?
fswebcam没安装成功,显示缺少libgd,网上也没找到这个库的正确下载。
我用ffmpeg显示的内容如下:
# ./ffmpeg -f video4linux2 -s 320x240 -i /dev/video1 /mnt/test.avi
ffmpeg version 4.2 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
configuration: --prefix=/xumiaohua/licheepi/bsplicheepirootfs/usr/local/ffmpeg --arch=arm --target-os=linux --enable-shared --cross-prefix=arm-linux-gnueabihf-
libavutil 56. 31.100 / 56. 31.100
libavcodec 58. 54.100 / 58. 54.100
libavformat 58. 29.100 / 58. 29.100
libavdevice 58. 8.100 / 58. 8.100
libavfilter 7. 57.100 / 7. 57.100
libswscale 5. 5.100 / 5. 5.100
libswresample 3. 5.100 / 3. 5.100
[ 48.786009] [VFE]vfe_open
[ 48.789596] [VFE]..........................vfe clk open!.......................
[ 48.799005] [VFE]vfe_open ok
[ 48.802875] [VFE_ERR]input index(-1) > dev->dev_qty(1)-1 invalid!
[video4linux2,v4l2 @ 0xd3[ 48.810732] [VFE]vfe_close
c1f0] ioctl(VIDIOC_EN[ 48.816555] [VFE]vfe select input flag = 0, s_input have not be used .
UMINPUT): Invalid argument
[ 48.826721] [VFE]..........................vfe clk close!.......................
[ 48.838126] [VFE]vfe_close end
/dev/video1: Invalid argument
#
购买了荔枝派zero开发板想搭一个双目相机(dvp+mipi),刚开始是采用主线linux,但后来看到说主线linux没有相机的总线驱动程序,然后现在换了bsp内核linux。
因为怕作为模块驱动加载有很多的以来问题,现在把bsp内核源码中的相机驱动直接编译进了内核,相机用的是dvp接口的ov2640,开机后/dev下有设备节点和设备号。开机后使用dmesg出现关于相机的信息如下:
[ 1.122805] [VFE]cci probe start cci_sel = 0!
[ 1.127765] [VFE]cci probe end cci_sel = 0!
[ 1.132653] [VFE]cci_init end
[ 1.136052] [VFE]Welcome to Video Front End driver
[ 1.141757] [VFE]pdev->id = 1
[ 1.145233] [VFE]dev->mipi_sel = 1
[ 1.149098] [VFE]dev->vip_sel = 1
[ 1.152887] [VFE]dev->isp_sel = 0
[ 1.162836] [VFE_WARN]vfe vpu clock is null
[ 1.167929] [VFE_ERR]vip1 request pinctrl handle for device [csi1] failed!
[ 1.175786] [ISP] isp platform_id = 6!
[ 1.175881] [VFE]vfe_init end
[ 1.179521] sunxi cedar version 0.1
[ 1.179577] [cedar]: install start!!!
[ 1.179870] [cedar]: install end!!!
[ 1.180063] [VFE]probe_work_handle start!
[ 1.184616] [VFE]..........................vfe clk open!.......................
[ 1.193330] platform reg-20-cs-dcdc2: Driver reg-20-cs-dcdc2 requests probe deferral
[ 1.202185] platform reg-20-cs-dcdc3: Driver reg-20-cs-dcdc3 requests probe deferral
[ 1.211297] [VFE]v4l2 subdev register input_num = 0
[ 1.216895] [VFE]vfe sensor detect start! input_num = 0
[ 1.222805] [VFE]Find sensor name is "ov2640", i2c address is 60, type is "YUV" !
[ 1.231306] [VFE]Sub device register "ov2640" i2c_addr = 0x60 start!
[ 1.238454] [VFE]v4l2_device_register_subdev return 0
[ 1.244250] [VFE]registered sensor subdev is OK!
[ 1.249467] [VFE]Check sensor!
[ 1.252953] [VFE]Sub device register "ov2640" is OK!
[ 1.258788] platform reg-20-cs-ldo1: Driver reg-20-cs-ldo1 requests probe deferral
[ 1.267435] platform reg-20-cs-ldo2: Driver reg-20-cs-ldo2 requests probe deferral
[ 1.276160] platform reg-20-cs-ldo3: Driver reg-20-cs-ldo3 requests probe deferral
[ 1.284868] platform reg-20-cs-ldo4: Driver reg-20-cs-ldo4 requests probe deferral
[ 1.293521] platform reg-20-cs-ldoio0: Driver reg-20-cs-ldoio0 requests probe deferral
[ 1.302768] [VFE]V4L2 device registered as video1
[ 1.308237] [VFE]..........................vfe clk close!.......................
关于配置文件sys.config.fex
由于荔枝派的原理图中dvp相机接口Y0,Y1位悬空状态,故在文件中
vip_csi_d0 =
vip_csi_d1 =
“=”后未添加任何信息,然后原理图中reset以及pwdn引脚为直接连电源以及地,不知在
vip_dev0_reset =
vip_dev0_pwdn =
此处应该如何填写
在开发板上尝试着使用ffmpeg以及motion来调用相机,均没有成功。
能否帮我看一下,问题是出在相机部分部分吗?
页次: 1