树莓派5b & 2个sc132 相机,拍照问题
-
HZCU@raspberrypi:~ $ v4l2-ctl -L -d /dev/v4l-subdev2
User Controls
trigger_mode 0x00981901 (int) : min=0 max=2 step=1 default=1 value=0 flags=volatile, execute-on-write trigger_src 0x00981902 (int) : min=0 max=1 step=1 default=1 value=0 flags=volatile, execute-on-write soft_trgone 0x00981903 (button) : value=0 flags=write-only, execute-on-write frame_rate 0x00981904 (int) : min=0 max=120 step=1 default=120 value=120 flags=volatile, execute-on-write roi_x 0x00981905 (int) : min=0 max=1016 step=8 default=0 value=0 roi_y 0x00981906 (int) : min=0 max=1216 step=4 default=0 value=0Camera Controls
camera_orientation 0x009a0922 (menu) : min=0 max=2 default=2 value=2 (External) flags=read-only 0: Front 1: Back 2: External camera_sensor_rotation 0x009a0923 (int) : min=0 max=0 step=1 default=0 value=0 flags=read-onlyImage Processing Controls
link_frequency 0x009f0901 (intmenu): min=0 max=0 default=0 value=0 (1500000000 0x59682f00) 0: 1500000000 (0x59682f00) pixel_rate 0x009f0902 (int64) : min=750000000 max=750000000 step=1 default=750000000 value=750000000 flags=read-onlyHZCU@raspberrypi:~ $ v4l2-ctl -d /dev/video0 --set-fmt-video=width=1024,height=1280,pixelformat=GREY --stream-mmap --stream-count=1 --stream-to=y8-1024x1280.raw
VIDIOC_STREAMON returned -1 (Invalid argument) -
- 请问
./media_setting_rpi5.sh你是带着哪些参数执行的? - 执行以下
./find_entity.sh发一下结果。 - 执行完
./media_setting_rpi5.sh之后,用media-ctl -
p -d /dev/mediaX (其中X是上一步打印出来的值),然后把结果贴上来看看。
- 请问
-
您好
1、./media_setting_rpi5.sh文件我没有更改
@veye_xumm
#!/bin/bashI2CBUS_CAM1=4
I2CBUS_CAM0=6#default params of YUV_type cameras
WIDTH_YUV=1920
HEIGHT_YUV=1080
MEDIA_FMT_YUV=UYVY8_1X16
PIXEL_FMT_YUV=UYVY#default params of MV_type cameras
WIDTH_MV=1280
HEIGHT_MV=1024
MEDIA_FMT_MV=Y8_1X8
PIXEL_FMT_MV=GREY
2、执行./find_entity.sh
HZCU@raspberrypi:~/Desktop/raspberrypi_v4l2/rpi5_scripts $ ./find_entity.sh
Found mvcam @ i2c-4 entity on /dev/media2
Plese get frame from /dev/video0 and use /dev/v4l-subdev2 for camera setting.
3、执行完./media_setting_rpi5.sh,
HZCU@raspberrypi:~/Desktop/raspberrypi_v4l2/rpi5_scripts $ ./media_setting_rpi5.sh
This is a Raspberry Pi 5.
Usage: ./media_setting_rpi5.sh veyecam2m/csimx307/cssc132/mvcam -fmt [UYVY/RAW8/RAW10/RAW12] -w [width] -h [height]
This shell script is designed to detect the connection of a camera on Raspberry Pi 5.
It utilizes media-ctl and v4l2-ctl commands to configure the linking relationships and data formats of the media pad.
Once completed, you can directly use /dev/video0 or /dev/video8 to obtain image data.
4、media-ctl -p -d /dev/media2
HZCU@raspberrypi:~/Desktop/raspberrypi_v4l2/rpi5_scripts $ media-ctl -p -d /dev/media2
Media controller API version 6.1.63Media device information
driver rp1-cfe
model rp1-cfe
serial
bus info platform:1f00128000.csi
hw revision 0x114666
driver version 6.1.63Device topology
-
entity 1: csi2 (8 pads, 8 links)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev0
pad0: Sink
[fmt:SRGGB10_1X10/640x480 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]
<- "mvcam 4-003b":0 [ENABLED,IMMUTABLE]
pad1: Sink
[fmt:unknown/8192x1 field:none]
pad2: Sink
[fmt:SRGGB10_1X10/640x480 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]
pad3: Sink
[fmt:SRGGB10_1X10/640x480 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]
pad4: Source
[fmt:SRGGB10_1X10/640x480 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]
-> "rp1-cfe-csi2_ch0":0 []
-> "pisp-fe":0 []
pad5: Source
[fmt:unknown/8192x1 field:none]
-> "rp1-cfe-embedded":0 []
pad6: Source
[fmt:SRGGB10_1X10/640x480 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]
-> "rp1-cfe-csi2_ch2":0 []
-> "pisp-fe":0 []
pad7: Source
[fmt:SRGGB10_1X10/640x480 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]
-> "rp1-cfe-csi2_ch3":0 []
-> "pisp-fe":0 [] -
entity 10: pisp-fe (5 pads, 7 links)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev1
pad0: Sink
[fmt:SRGGB16_1X16/640x480 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]
<- "csi2":4 []
<- "csi2":6 []
<- "csi2":7 []
pad1: Sink
[fmt:FIXED/8192x1 field:none]
<- "rp1-cfe-fe_config":0 []
pad2: Source
[fmt:SRGGB16_1X16/640x480 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]
-> "rp1-cfe-fe_image0":0 []
pad3: Source
[fmt:SRGGB16_1X16/640x480 field:none colorspace:raw xfer:none ycbcr:601 quantization:full-range]
-> "rp1-cfe-fe_image1":0 []
pad4: Source
[fmt:FIXED/8192x1 field:none]
-> "rp1-cfe-fe_stats":0 [] -
entity 16: mvcam 4-003b (1 pad, 1 link)
type V4L2 subdev subtype Sensor flags 0
device node name /dev/v4l-subdev2
pad0: Source
[fmt:Y8_1X8/1024x1280 field:none colorspace:rec709
crop.bounds:(0,0)/1080x1280
crop:(0,0)/1024x1280]
-> "csi2":0 [ENABLED,IMMUTABLE] -
entity 18: rp1-cfe-csi2_ch0 (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video0
pad0: Sink
<- "csi2":4 [] -
entity 22: rp1-cfe-embedded (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video1
pad0: Sink
<- "csi2":5 [] -
entity 26: rp1-cfe-csi2_ch2 (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video2
pad0: Sink
<- "csi2":6 [] -
entity 30: rp1-cfe-csi2_ch3 (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video3
pad0: Sink
<- "csi2":7 [] -
entity 34: rp1-cfe-fe_image0 (1 pad, 1 link)
type Node subtype V4L flags 1
device node name /dev/video4
pad0: Sink
<- "pisp-fe":2 [] -
entity 38: rp1-cfe-fe_image1 (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video5
pad0: Sink
<- "pisp-fe":3 [] -
entity 42: rp1-cfe-fe_stats (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video6
pad0: Sink
<- "pisp-fe":4 [] -
entity 46: rp1-cfe-fe_config (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video7
pad0: Source
-> "pisp-fe":1 []
-
-
@veye_xumm
其余的一些信息
HZCU@raspberrypi:~ $ v4l2-ctl -d /dev/video0 --set-fmt-video=width=1024,height=1280,pixelformat=GREY --stream-mmap --stream-count=1 --stream-to=y8-1024x1280.raw
VIDIOC_STREAMON returned -1 (Invalid argument)HZCU@raspberrypi:~ $ dmesg | grep mvcam
[ 3.077392] rp1-cfe 1f00110000.csi: found subdevice /axi/pcie@120000/rp1/i2c@88000/veyemvcam@3b
[ 3.081206] rp1-cfe 1f00128000.csi: found subdevice /axi/pcie@120000/rp1/i2c@80000/veyemvcam@3b
[ 3.145470] veye_mvcam: loading out-of-tree module taints kernel.
[ 3.148379] mvcam 4-003b: veye mv series camera driver version: 01.01.04
[ 3.153600] mvcam 4-003b: Unable to load veye_vbyone driver,will go on
[ 3.665752] mvcam 4-003b: camera is: RAW-MIPI-SC132M
[ 3.666514] mvcam 4-003b: firmware version: 0x1040000
[ 3.680173] mvcam 4-003b: mvcam_enum_controls success
[ 3.680855] rp1-cfe 1f00128000.csi: Using sensor mvcam 4-003b for capture
[ 3.692868] mvcam 6-003b: veye mv series camera driver version: 01.01.04
[ 3.705052] mvcam 6-003b: Unable to load veye_vbyone driver,will go on
[ 4.207041] mvcam: mvcam_read: Reading register 0x04 failed
[ 4.207052] mvcam 6-003b: failed to read chip id
[ 673.554515] Modules linked in: rfcomm snd_seq_dummy snd_hrtimer snd_seq snd_seq_device algif_hash algif_skcipher af_alg bnep binfmt_misc hci_uart aes_ce_blk btbcm aes_ce_cipher brcmfmac ghash_ce gf128mul bluetooth sha2_ce sha256_arm64 sha1_ce brcmutil ecdh_generic ecc veye_mvcam(O) cfg80211 libaes raspberrypi_hwmon rfkill rpivid_hevc(C) rp1_cfe pisp_be v4l2_mem2mem v4l2_fwnode videobuf2_dma_contig v4l2_async videobuf2_memops videobuf2_v4l2 videobuf2_common videodev rp1_adc mc raspberrypi_gpiomem nvmem_rmem uio_pdrv_genirq uio i2c_dev fuse dm_mod ip_tables x_tables ipv6 spidev vc4 snd_soc_hdmi_codec drm_display_helper cec drm_dma_helper drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops i2c_brcmstb spi_bcm2835 snd_soc_core v3d gpu_sched snd_compress drm_shmem_helper snd_pcm_dmaengine snd_pcm snd_timer drm gpio_keys snd drm_panel_orientation_quirks backlight i2c_designware_platform i2c_designware_core
粗体字 -
-
@veye_xumm
./media_setting_rpi5.sh mvcam -fmt RAW8 -w 1024 -h 1280 -
@veye_xumm
好像可以了,给您添麻烦了 -
@mjyc 好的。
-
@veye_xumm
亲,目前两个相机都能拍照了,但是sudo reboot,重启后,又都不能拍照了了,需要重新./find_entity.sh,./media_setting_rpi5.sh XXX。 -
@mjyc
./media_setting_rpi5.sh XXX只有这个是必须要执行的。
上电之后,执行一次。
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login