I decompile radxa-cm3s-io-csi1-rpi-camera-v2.dtbo
:
dtc -I dtb -O dts radxa-cm3s-io-csi0-rpi-camera-v2.dtbo -o radxa-cm3s-io-csi0-rpi-camera-v2.dts
and figure out that ‘Power enable’ pin of RPi Camera was wrong specified.
Need just replace /fragment@1/__overlay__/imx219@10:pwdn-gpios to:
pwdn-gpios = <0xffffffff 0x1c 0x00>;
Compile back to dtbo
:
dtc -O dtb -o radxa-cm3s-io-csi0-rpi-camera-v2.dtbo radxa-cm3s-io-csi0-rpi-camera-v2.dts
replace it in /boot/dtbs/4.19.193-215-rockchip-g2657e70400fc/rockchip/overlay, and reboot.
After it, if you check initialized gpios:
sudo cat /sys/kernel/debug/gpio
you will see that appear
gpiochip3: GPIOs 96-127, parent: platform/fe760000.gpio, gpio3:
gpio-124 ( |pwdn ) out lo
It’s a ‘Power enable’ pin !!!
To check the camera, I tried the fswebcam utility and got hit on the head))
fswebcam -d /dev/video0 test.jpeg
--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
No input was specified, using the first.
Error selecting input 0
VIDIOC_S_INPUT: Inappropriate ioctl for device
Install streamer
utility:
sudo apt install streamer
aaaand
streamer -o 1.jpeg
files / video: JPEG (JFIF) / audio: none
Using mplane plugin for capture
ioctl: VIDIOC_S_FMT(type=VIDEO_CAPTURE;fmt.pix.width=320;fmt.pix.height=240;fmt.pix.pixelformat=0x00000000 [....];fmt.pix.field=ANY;fmt.pix.bytesperline=0;fmt.pix.sizeimage=0;fmt.pix.colorspace=unknown;fmt.pix.priv=4276996862): Invalid argument
drumroll …
And i get 1.jpeg in my home directory !!!
But after downloading, I found that the quality is very poor ((
Next was gstreamer
gst-launch-1.0 v4l2src num-buffers=1 ! filesink location=/home/rock/2.jpg
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 0:00:00.235610609
Setting pipeline to NULL ...
Freeing pipeline ...
And get
This is not the full resolution image, when I try to upload the full jpeg(1920x1080), I get an error.
It’s much better, but in panchrome. Need to set up a pipline of gstreamer
, i think.