Jump to content

srinath

Members
  • Posts

    18
  • Joined

  • Last visited

Everything posted by srinath

  1. Hi can someone help me in this issue I have overlay and camera connected to the device but issue says cannot open the camera index in my orange pi pc root@orangepipc:~/python# python3 capture_image.py [ WARN:0] global ../modules/videoio/src/cap_v4l.cpp (887) open VIDEOIO(V4L2:/dev/video1): can't open camera by index Traceback (most recent call last): File "capture_image.py", line 11, in <module> isWritten = cv2.imwrite('image-2.jpg', frame) cv2.error: OpenCV(4.2.0) ../modules/imgcodecs/src/loadsave.cpp:715: error: (-215:Assertion failed) !_img.empty() in function 'imwrite'
  2. Hi @rreignier , @rdeyes and all I am using orange pi PC I have used the overlay with in my orange pi pc for camera OV5640 camera CSI interface "AVDD-supply = <&reg_vcc_af_csi>; DOVDD-supply = <&reg_vdd_1v5_csi>; DVDD-supply = <&reg_vcc_csi>;" overlay is successfull please find the attachment, root@orangepipc:~/python# media-ctl --device /dev/media1 --print-topology Media controller API version 5.10.21 Media device information ------------------------ driver sun6i-csi model Allwinner Video Capture Device serial bus info platform:1cb0000.camera hw revision 0x0 driver version 5.10.21 Device topology - entity 1: sun6i-csi (1 pad, 1 link) type Node subtype V4L flags 0 device node name /dev/video1 pad0: Sink <- "ov5640 1-003c":0 [ENABLED] - entity 5: ov5640 1-003c (1 pad, 1 link) type V4L2 subdev subtype Sensor flags 0 device node name /dev/v4l-subdev0 pad0: Source [fmt:UYVY8_2X8/640x480@1/30 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range] -> "sun6i-csi":0 [ENABLED] after connecting the camera i2c2 detect command root@orangepipc:~# ls /proc/device-tree/soc/i2c@1c2b400/camera@3c/ AVDD-supply clock-names clocks compatible DOVDD-supply DVDD-supply name phandle pinctrl-0 pinctrl-names port powerdown-gpios reg reset-gpios root@orangepipc:~# cat /proc/device-tree/soc/i2c@1c2b400/reg | xxd 00000000: 01c2 b400 0000 0400 ........ root@orangepipc:~# cat /proc/device-tree/soc/i2c@1c2b400/status okayroot@orangepipc:~# ls /proc/device-tree/soc/i2c@1c2b400/ '#address-cells' camera@3c clocks compatible interrupts name phandle pinctrl-0 pinctrl-names reg resets '#size-cells' status root@orangepipc:~# ls /dev/i2c-* /dev/i2c-0 /dev/i2c-1 /dev/i2c-2 root@orangepipc:~# ls /sys/class/i2c-adapter/ i2c-0 i2c-1 i2c-2 root@orangepipc:~# ls -l /sys/class/i2c-adapter/i2c-*/of_node lrwxrwxrwx 1 root root 0 Apr 22 11:10 /sys/class/i2c-adapter/i2c-1/of_node -> ../../../../../firmware/devicetree/base/soc/i2c@1c2b400 lrwxrwxrwx 1 root root 0 Apr 22 11:10 /sys/class/i2c-adapter/i2c-2/of_node -> ../../../../../firmware/devicetree/base/soc/i2c@1f02400 root@orangepipc:~# i2cdetect -y 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- UU -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- root@orangepipc:~# i2cdetect -y 2 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- UU -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- camera is not powered in in my orange pi my user overlay for csi . Also I inclucled regulator code in the overlay @rdeyes for my orange pi pc? Also for camera ov5640 root@orangepipc:~# dmesg | grep -i ov56 [ 7.362807] sun6i-csi 1cb0000.camera: creating ov5640 1-003c:0 -> sun6i-csi:0 link [ 7.767201] ov5640 1-003c: ov5640_read_reg: error: reg=300a [ 7.772902] ov5640 1-003c: ov5640_set_power_on: failed to read chip identifier issue: root@orangepipc:/dev# v4l2-ctl -d /dev/video1 -D Failed to open /dev/video1: No such device or address but I have video1 created after overlay added root@orangepipc:/dev# ls autofs fuse loop1 mqueue shm tty16 tty29 tty41 tty54 ttyS0 v4l-subdev0 vcsa6 zram1 block gpiochip0 loop2 net snd tty17 tty3 tty42 tty55 ttyS1 vcs vcsu zram2 btrfs-control gpiochip1 loop3 null stderr tty18 tty30 tty43 tty56 ttyS2 vcs1 vcsu1 bus hwrng loop4 ppp stdin tty19 tty31 tty44 tty57 ttyS3 vcs2 vcsu2 cec0 i2c-0 loop5 ptmx stdout tty2 tty32 tty45 tty58 ttyS4 vcs3 vcsu3 char i2c-1 loop6 pts tty tty20 tty33 tty46 tty59 ttyS5 vcs4 vcsu4 console i2c-2 loop7 ram0 tty0 tty21 tty34 tty47 tty6 ttyS6 vcs5 vcsu5 cpu_dma_latency initctl loop-control ram1 tty1 tty22 tty35 tty48 tty60 ttyS7 vcs6 vcsu6 cuse input mapper ram2 tty10 tty23 tty36 tty49 tty61 ubi_ctrl vcsa video0 disk kmem media0 ram3 tty11 tty24 tty37 tty5 tty62 uhid vcsa1 video1 dri kmsg media1 random tty12 tty25 tty38 tty50 tty63 uinput vcsa2 watchdog ecryptfs lirc0 mem rfkill tty13 tty26 tty39 tty51 tty7 uleds vcsa3 watchdog0 fd log mmcblk0 rtc tty14 tty27 tty4 tty52 tty8 urandom vcsa4 zero full loop0 mmcblk0p1 rtc0 tty15 tty28 tty40 tty53 tty9 v4l vcsa5 zram0 overlay_csi_orangepipc.dts
  3. I have fixed it by changing to armbian focal normal one which is direct download before I used EU version the problem is that thank you for the fase reply
  4. Hi, I have used the official armbian focal image for orange pi PC (https://www.armbian.com/orange-pi-pc/) The issue is in the armbian-config navigate to system -> Hardware you see nothing as shown below Please find the monitor log http://ix.io/2WQv
  5. Hi @rreignier, How can I bulid openCV in C++ for armbian. I checked the architecture of my device root@nanopiduo2:~/C/overlays# dpkg --print-architecture armhf In openCV in the link I have 2 cmake 1.arm-gnueabi.toolchain.cmake 2.arm.toolchain.cmake https://github.com/opencv/opencv/tree/master/platforms/linux I am confused which one to use. If possible could you please say step by step procedure error: sra@LD-MZ-NB-06:~/cpp_opencv$ arm-linux-gnueabihf-g++ read.cpp -mfloat-abi=hard `pkg-config opencv4 --cflags --libs` -o read /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_stitching /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_aruco /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_bgsegm /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_bioinspired /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_ccalib /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_dnn_objdetect /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_dnn_superres /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_dpm /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_highgui /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_face /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_freetype /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_fuzzy /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_hdf /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_hfs /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_img_hash /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_line_descriptor /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_quality /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_reg /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_rgbd /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_saliency /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_shape /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_stereo /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_structured_light /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_phase_unwrapping /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_superres /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_optflow /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_surface_matching /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_tracking /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_datasets /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_text /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_dnn /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_plot /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_ml /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_videostab /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_videoio /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_viz /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_ximgproc /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_video /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_xobjdetect /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_objdetect /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_calib3d /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_imgcodecs /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_features2d /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_flann /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_xphoto /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_photo /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_imgproc /usr/lib/gcc-cross/arm-linux-gnueabihf/9/../../../../arm-linux-gnueabihf/bin/ld: cannot find -lopencv_core collect2: error: ld returned 1 exit status Thanks in advance
  6. I have created the user overlays. That was the issue. problem solved
  7. Hi All, Has anybody tried to capture video stream using ffmpeg? I have installed ffmpeg by using root@nanopiduo2:~# sudo apt install ffmpeg As thy say in the link https://wiki.friendlyarm.com/wiki/index.php/NanoPi_Duo2 -The mjpg-streamer utility uses libjpeg to software-encode steam data. The Linux-4.14 based ROM currently doesn't support hardware-encoding. If you use a H3 boards with Linux-3.4 based ROM you can use the ffmpeg utility to hardware-encode stream data and this can greatly release CPU's resources and speed up encoding: Error: root@nanopiduo2:~# ffmpeg -t 30 -f v4l2 -channel 0 -video_size 1280x720 -i /dev/video1 -pix_fmt nv12 -r 30 ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg developers built with gcc 9 (Ubuntu 9.3.0-10ubuntu2) configuration: --prefix=/usr --extra-version=1ubuntu0.1 --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --arch=arm --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared 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 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 5.100 / 5. 5.100 libswresample 3. 5.100 / 3. 5.100 libpostproc 55. 5.100 / 55. 5.100 Trailing options were found on the commandline. [video4linux2,v4l2 @ 0x20f5a00] ioctl(VIDIOC_STREAMON): Broken pipe /dev/video1: Broken pipe
  8. Hi @rdeyes, Thank you for your reply. I have now python and openCV installed in my device. I checked his code he is providing format should I also need to do it? cap.set(cv::CAP_PROP_FOURCC, cv::VideoWriter::fourcc('Y','U','1','2')); Here is my simple python-openCV code import cv2 import numpy as np capture = cv2.VideoCapture(1,cv2.CAP_V4L2) #set width height and format capture.set(cv2.CAP_PROP_FRAME_WIDTH, 160) capture.set(cv2.CAP_PROP_FRAME_HEIGHT, 120) retur, frame = capture.read() color_image = np.asanyarray(frame) #save matrix/array as image file isWritten = cv2.imwrite('image-2.jpg', color_image) if isWritten: print('Image is successfully saved as file.') error Traceback (most recent call last): File "img.py", line 15, in <module> isWritten = cv2.imwrite('image-2.jpg', color_image) TypeError: Expected Ptr<cv::UMat> for argument 'img' Thanks in advance
  9. Hi I got it thank you root@nanopiduo2:~# ls /proc/device-tree/soc/i2c@1c2b400/ '#address-cells' compatible phandle reg status camera@3c interrupts pinctrl-0 resets clocks name pinctrl-names '#size-cells' I2C is also working root@nanopiduo2:~# ls /dev/i2c-* /dev/i2c-2 root@nanopiduo2:~# ls /sys/class/i2c-adapter/ i2c-2 root@nanopiduo2:~# i2cdetect -y 2 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- UU -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- root@nanopiduo2:~# media-ctl --device /dev/media1 --print-topology Media controller API version 5.10.21 Media device information ------------------------ driver sun6i-csi model Allwinner Video Capture Device serial bus info platform:1cb0000.camera hw revision 0x0 driver version 5.10.21 Device topology - entity 1: sun6i-csi (1 pad, 1 link) type Node subtype V4L flags 0 device node name /dev/video1 pad0: Sink <- "ov5640 2-003c":0 [ENABLED] - entity 5: ov5640 2-003c (1 pad, 1 link) type V4L2 subdev subtype Sensor flags 0 device node name /dev/v4l-subdev0 pad0: Source [fmt:UYVY8_2X8/640x480@1/30 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range] -> "sun6i-csi":0 [ENABLED] Now I have video1 amd media1 created root@nanopiduo2:~# v4l2-ctl -d /dev/video1 -D Driver Info: Driver name : sun6i-video Card type : sun6i-csi Bus info : platform:camera Driver version : 5.10.21 Capabilities : 0x84200001 Video Capture Streaming Extended Pix Format Device Capabilities Device Caps : 0x04200001 Video Capture Streaming Extended Pix Format Media Driver Info: Driver name : sun6i-csi Model : Allwinner Video Capture Device Serial : Bus info : platform:1cb0000.camera Media version : 5.10.21 Hardware revision: 0x00000000 (0) Driver version : 5.10.21 Interface Info: ID : 0x03000003 Type : V4L Video Entity Info: ID : 0x00000001 (1) Name : sun6i-csi Function : V4L2 I/O Pad 0x01000002 : 0: Sink, Must Connect Link 0x02000009: from remote pad 0x1000006 of entity 'ov5640 2-003c': Data, Enabled how can I view the video stream root@nanopiduo2:~# media-ctl --device /dev/video1 --set-v4l2 '"ov5640 2-003c":0[fmt:YUYV8_2X8/1920x1080]' Failed to enumerate /dev/video1 (-25) root@nanopiduo2:~# media-ctl --device /dev/media1 --set-v4l2 '"ov5640 2-003c":0[fmt:YUYV8_2X8/1920x1080]' Thanks in advance
  10. Hi @rdeyes, Thank you for the reply I complied rreigner's overlay then I checked. root@nanopiduo2:/proc/device-tree/__symbols__# nano i2c2 GNU nano 4.8 i2c2 /soc/i2c@1c2b400^@ I2c2 is the same port root@nanopiduo2:~# ls /proc/device-tree/soc/i2c@1c2b400/ '#address-cells' compatible name pinctrl-0 reg '#size-cells' clocks interrupts phandle pinctrl-names resets status I did not find the camera@3c added overlay root@nanopiduo2:/boot/overlay-user# ls overlays_csi.dtbo No i2c found after complilation rreigner's overlay (Please find the attachment) root@nanopiduo2:~# ls /dev/i2c-* ls: cannot access '/dev/i2c-*': No such file or directory But when I remove the rreigner's overlay I2C 2 is working root@nanopiduo2:~# i2cdetect -y 2 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- I am not getting mine is also in 3C Thnaks in advance overlays_csi.dts
  11. Hi, Nano pi duo 2 module I2C is not working in kernal Armbian Focal 5.10.21. I have camera OV5640 attached to Nano PI duo 2 via I2C 2 I found my I2C2 is disable how can I enable? root@nanopiduo2:~# fdtget /boot/dtb/sun8i-h3-nanopi-duo2.dtb /soc/i2c@1c2b400 status disabled I found I2C 2 which is connect to camera is not working root@nanopiduo2:~# ls -l /sys/class/i2c-adapter/ total 0 the I2C detect command and sometimes armbianmonitor does not genetrate the link, root@nanopiduo2:~# i2cdetect -y 0 Error: Could not open file `/dev/i2c-0' or `/dev/i2c/0': No such file or directory root@nanopiduo2:~# i2cdetect -y 1 Error: Could not open file `/dev/i2c-1' or `/dev/i2c/1': No such file or directory root@nanopiduo2:~# i2cdetect -y 2 Error: Could not open file `/dev/i2c-2' or `/dev/i2c/2': No such file or directory root@nanopiduo2:~# sudo armbianmonitor -u System diagnosis information will now be uploaded to Please post the URL in the Please find the image the boot Environment is changes in the device (reffer attachment) but the link file its not changed which is real? System diagnosis information will now be uploaded to http://ix.io/2Tb2 Please post the URL in the forum where you've been asked for.
  12. Hi @rdeyes, For me I2C 2 is detecting do you have any idea v4l2 ctrl? root@nanopiduo2:~# i2cdetect -y 2 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- root@nanopiduo2:/dev# v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=JPG The pixelformat 'JPG' is invalid root@nanopiduo2:/dev# v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=jpg The pixelformat 'jpg' is invalid root@nanopiduo2:/dev# v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=png The pixelformat 'png' is invalid root@nanopiduo2:/dev# v4l2-ctl --set-fmt-video=width=1920,height=1080 root@nanopiduo2:/dev# v4l2-ctl -v width=1280,height=720,pixelformat=BGR3 The pixelformat 'BGR3' is invalid root@nanopiduo2:/dev# v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=YUYV The pixelformat 'YUYV' is invalid root@nanopiduo2:/dev# media-ctl --device /dev/media1 --set-v4l2 '"ov5640 1-003c":0[fmt:UYVY/1920x1080]' Failed to enumerate /dev/media1 (-2) root@nanopiduo2:/dev# media-ctl --device /dev/media0 --set-v4l2 '"ov5640 1-003c":0[fmt:UYVY/1920x1080]' Unable to setup formats: Invalid argument (22)
  13. Hi all, Thank you for the code. I have tried it in nano pi duo 2 with ov5640 in kernal version 5.10.21 armbian focal. can you give us the output for media-ctl --device /dev/media1 --print-topology media-ctl --device /dev/video0 --print-topology I have added the overlay by sudo armbian-add-overlay csi-ov5640.dts and did reboot my device (nano pi duo 2) my output for, root@nanopiduo2:~# ls /dev/ autofs loop3 rtc0 tty24 tty46 ttyS0 vcsa3 block loop4 shm tty25 tty47 ttyS1 vcsa4 btrfs-control loop5 snd tty26 tty48 ttyS2 vcsa5 bus loop6 stderr tty27 tty49 ttyS3 vcsa6 char loop7 stdin tty28 tty5 ttyS4 vcsu console loop-control stdout tty29 tty50 ttyS5 vcsu1 cpu_dma_latency mapper tty tty3 tty51 ttyS6 vcsu2 cuse media0 tty0 tty30 tty52 ttyS7 vcsu3 disk mem tty1 tty31 tty53 ubi_ctrl vcsu4 ecryptfs mmcblk0 tty10 tty32 tty54 uhid vcsu5 fd mmcblk0p1 tty11 tty33 tty55 uinput vcsu6 full mqueue tty12 tty34 tty56 uleds video0 fuse net tty13 tty35 tty57 urandom watchdog gpiochip0 null tty14 tty36 tty58 v4l watchdog0 gpiochip1 ppp tty15 tty37 tty59 vcs zero hwrng ptmx tty16 tty38 tty6 vcs1 zram0 initctl pts tty17 tty39 tty60 vcs2 zram1 input ram0 tty18 tty4 tty61 vcs3 zram2 kmem ram1 tty19 tty40 tty62 vcs4 kmsg ram2 tty2 tty41 tty63 vcs5 log ram3 tty20 tty42 tty7 vcs6 loop0 random tty21 tty43 tty8 vcsa loop1 rfkill tty22 tty44 tty9 vcsa1 loop2 rtc tty23 tty45 ttyGS0 vcsa2 here I have media0 and video0 so, I tried root@nanopiduo2:~# media-ctl --device /dev/media0 --set-v4l2 '"ov5640 1-003c":0[fmt:JPEG_1X8/1920x1080]' Unable to setup formats: Invalid argument (22) root@nanopiduo2:~# fswebcam -d /dev/video0 -r 1920x1080 -D 0 --jpeg 100 /tmp/test.jpg -bash: fswebcam: command not found can you also give me the I2C detect, i2cdetect -y 0 i2cdetect -y 1 i2cdetect -y 2 I found I2C 2 which is connect to camera is not working root@nanopiduo2:~# ls -l /sys/class/i2c-adapter/ total 0 I found my I2C2 is disable how can I enable? root@nanopiduo2:~# fdtget /boot/dtb/sun8i-h3-nanopi-duo2.dtb /soc/i2c@1c2b400 status disabled Thanks in advance
  14. kernal configs: CONFIG_I2C_GPIO=m CONFIG_V4L_PLATFORM_DRIVERS=y CONFIG_VIDEO_SUN6I_CSI=m CONFIG_V4L_MEM2MEM_DRIVERS=y CONFIG_VIDEO_MEM2MEM_DEINTERLACE=m CONFIG_VIDEO_OV5640=m Hi all, I did changes for kernal configs After that what should I need to change in sun8i-h3-nanopi-duo2.dts or/and add overlay to enable the camera As I am using Nano pi duo 2 with H3 chipset running under armhf(32bit) Armbian Focal (mainline based kernel 5.10.y) attached with OV5640 camera Thanks in advance
  15. Hi lex, Thank you for the kernal configs. I did that After that what should I need to change in sun8i-h3-nanopi-duo2.dts. AS I am using Nnao pi duo 2 with H3 chipset running under armhf(32bit) Armbian Focal (mainline based kernel 5.10.y) Thanks in advance
  16. Do we have support for OV5640 in NanoPIduo2? root@nanopiduo2:~# media-ctl --print-topology Media controller API version 5.10.16 Media device information ------------------------ driver cedrus model cedrus serial bus info platform:cedrus hw revision 0x0 driver version 5.10.16 Device topology - entity 1: cedrus-source (1 pad, 1 link) type Node subtype V4L flags 0 device node name /dev/video0 pad0: Source -> "cedrus-proc":0 [ENABLED,IMMUTABLE] - entity 3: cedrus-proc (2 pads, 2 links) type Node subtype Unknown flags 0 pad0: Sink <- "cedrus-source":0 [ENABLED,IMMUTABLE] pad1: Source -> "cedrus-sink":0 [ENABLED,IMMUTABLE] - entity 6: cedrus-sink (1 pad, 1 link) type Node subtype V4L flags 0 device node name /dev/video0 pad0: Sink <- "cedrus-proc":1 [ENABLED,IMMUTABLE]
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines