bschwand Posted January 26 Share Posted January 26 (edited) Hi all, I am trying to get an OV5640 camera working on the orangePiOne. I found this thread and was wondering if the overlay (or some overlay) is still required. Without anything extra, the camera is not detected. It says that sun6i-csi and ov5640 kernel modules should be loaded, so I loaded them manually with modprobe but nothing happens and nothing is shown in dmesg. Adding the mentioned overlay with "sudo armbian-add-overlay csi-ov5640.dts" just gives me an error in dmesg at reboot time "failed on fdt_overlay_apply(): FDT_ERR_NOTFOUND Error applying DT overlays, restoring original DT" uname -a Linux orangepione2 6.1.63-current-sunxi #1 SMP Mon Nov 20 10:52:19 UTC 2023 armv7l GNU/Linux boot logs on https://paste.armbian.com/unoqesepov wondering what to try next... Edited January 26 by bschwand 0 Quote Link to comment Share on other sites More sharing options...
Gunjan Gupta Posted January 26 Share Posted January 26 Have you tried using this overlay - 0 Quote Link to comment Share on other sites More sharing options...
bschwand Posted January 26 Author Share Posted January 26 thanks, I tried that overlay now and there is some progress. A new device appeared in /dev/video, and I can see with lsmod that sun6i-csi and ov5640 kernel modules were loaded. However, trying ustreamer (https://github.com/pikvm/ustreamer) which I have used on the same board with a usb camera, unfortunately fails bruno@orangepione2:~$ sudo ustreamer --device=/dev/video0 --host=0.0.0.0 --port=8080 --resolution 1920x1080 -- INFO [680.044 main] -- Using internal blank placeholder -- INFO [680.045 main] -- Listening HTTP on [0.0.0.0]:8080 -- INFO [680.046 stream] -- Using V4L2 device: /dev/video0 -- INFO [680.046 stream] -- Using desired FPS: 0 -- INFO [680.047 http] -- Starting HTTP eventloop ... ================================================================================ -- INFO [680.049 stream] -- Device fd=8 opened -- INFO [680.049 stream] -- Using input channel: 0 -- INFO [680.049 stream] -- Using resolution: 1920x1080 -- INFO [680.049 stream] -- Using pixelformat: YUYV -- INFO [680.050 stream] -- Querying HW FPS changing is not supported -- INFO [680.050 stream] -- Using IO method: MMAP -- INFO [680.075 stream] -- Requested 5 device buffers, got 5 -- ERROR [680.076 stream] -- Unable to start capturing: Broken pipe -- INFO [680.081 stream] -- Device fd=8 closed -- INFO [680.081 stream] -- Sleeping 1 seconds before new stream init ... ================================================================================ I am going to try other formats, sizes and fps, see if it makes any difference... 0 Quote Link to comment Share on other sites More sharing options...
bschwand Posted January 26 Author Share Posted January 26 (edited) I found the program v4l2-compliance it has one failure : Format ioctls (Input 0): fail: v4l2-test-formats.cpp(263): fmtdesc.description mismatch: was 'Y/UV 4:2:0 (16x16 Linear)', expected 'Y/CbCr 4:2:0 (16x16 Linear)' test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: FAIL also very strange, I expected output like this instead I get this bruno@orangepione2:~$ v4l2-ctl -d 1 --list-ctrls --list-formats ioctl: VIDIOC_ENUM_FMT Type: Video Capture [0]: 'BA81' (8-bit Bayer BGBG/GRGR) [1]: 'GBRG' (8-bit Bayer GBGB/RGRG) [2]: 'GRBG' (8-bit Bayer GRGR/BGBG) [3]: 'RGGB' (8-bit Bayer RGRG/GBGB) [4]: 'BG10' (10-bit Bayer BGBG/GRGR) [5]: 'GB10' (10-bit Bayer GBGB/RGRG) [6]: 'BA10' (10-bit Bayer GRGR/BGBG) [7]: 'RG10' (10-bit Bayer RGRG/GBGB) [8]: 'BG12' (12-bit Bayer BGBG/GRGR) [9]: 'GB12' (12-bit Bayer GBGB/RGRG) [10]: 'BA12' (12-bit Bayer GRGR/BGBG) [11]: 'RG12' (12-bit Bayer RGRG/GBGB) [12]: 'YUYV' (YUYV 4:2:2) [13]: 'YVYU' (YVYU 4:2:2) [14]: 'UYVY' (UYVY 4:2:2) [15]: 'VYUY' (VYUY 4:2:2) [16]: 'RGBP' (16-bit RGB 5-6-5) [17]: 'RGBO' (16-bit A/XRGB 1-5-5-5) [18]: 'HM12' (Y/UV 4:2:0 (16x16 Linear)) [19]: 'NV12' (Y/UV 4:2:0) [20]: 'NV21' (Y/VU 4:2:0) [21]: 'YU12' (Planar YUV 4:2:0) [22]: 'YV12' (Planar YVU 4:2:0) [23]: 'NV16' (Y/UV 4:2:2) [24]: 'NV61' (Y/VU 4:2:2) [25]: '422P' (Planar YUV 4:2:2) [26]: 'RGBP' (16-bit RGB 5-6-5) [27]: 'RGBR' (16-bit RGB 5-6-5 BE) [28]: 'JPEG' (JFIF JPEG, compressed) also bruno@orangepione2:~$ media-ctl -d 0 --print-topology Media controller API version 6.1.63 Media device information ------------------------ driver sun6i-csi model Allwinner A31 CSI Device serial bus info platform:1cb0000.camera hw revision 0x0 driver version 6.1.63 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 crop.bounds:(0,0)/2624x1964 crop:(0,4)/2624x1944] -> "sun6i-csi":0 [ENABLED] Edited January 26 by bschwand 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.