purple_fish

Members
  • Content Count

    6
  • Joined

  • Last visited

  1. Contemplating whether or not I should pull the trigger and buy a new camera. Images were taken with an OV5640 camera attached to an orange pi PC. The first image is a good image, then after a few hours of use I start getting issues; reading images either times out and/or results in corrupted images. (Note: All images were rotated 90 degrees clockwise) https://imgur.com/a/LEyl1h9
  2. Unfortunately I don't have spares of either right now, but I'll think about getting another one for testing. Have you had problems with the CSI connectors getting loose over time and needing to be reseated?
  3. I recently got my OV5640 camera working with an orange pi PC board, but I've found that after a while of leaving it powered on unused, I'm unable to access /dev/video0. When it's in this non-working state, trying to access /dev/video0 results in the following in dmesg: [ 99.571841] [OV5640@lex]CSI_SUBDEV_STBY_OFF! [ 99.608221] [OV5640@lex]enable oe! [ 99.609039] [OV5640@lex]sensor write retry=2 [ 99.609050] [OV5640@lex]error at sensor_write_array [ 99.609058] [OV5640@lex]enable oe falied! [ 99.609847] [OV5640@lex]sensor write retry=2 [ 99.609856] [OV5640@lex]error at sensor_write_array [ 99.609864] [OV5640@lex]soft stby off falied! [ 99.620049] [OV5640@lex]sensor_init 0x0 [ 99.620901] [OV5640@lex]sensor read retry=2 [ 99.620911] [OV5640@lex]error at sensor_detect [ 99.620919] [OV5640@lex]chip found is not an target chip. [ 99.620929] [VFE_ERR]sensor initial error when selecting target device! I've tried toggling many different combinations of the pins that are connected to the CSI port in an attempt to power cycle or reset the camera; RESET, STDBY_EN, CSI_PWR_EN (AVDD), CSI_EN (DVDD), DOVDD (AFCC_EN), the i2c pins, camera clock pins, and data lines. Plus rebooting the pi as well. Nothing seems to get the camera working again. When the pi boots up again, dmesg shows the following, which appears promising: [ 56.367129] [OV5640@lex]init_sensor - frame_rate: 0, max_win_size: 11 [ 56.442539] [ISP] isp platform_id = 5! [ 56.462290] [OV5640@lex]CSI_SUBDEV_PWR_ON! [ 56.530043] [OV5640@lex]sensor_init 0x0 [ 56.570376] [OV5640@lex]CSI_SUBDEV_STBY_ON! [ 56.570397] [OV5640@lex]sensor_s_release_af [ 56.582757] [OV5640@lex]disalbe oe! [ 56.607058] [OV5640@lex]CSI_SUBDEV_STBY_OFF! [ 56.642114] [OV5640@lex]enable oe! [ 56.654668] [OV5640@lex]sensor_init 0x0 [ 56.694904] [OV5640@lex]sensor_s_ctrl id: 9963797 - value: 0 [ 56.694924] [OV5640@lex]sensor_s_ctrl id: 9963796 - value: 0 [ 56.695437] [OV5640@lex]CSI_SUBDEV_STBY_ON! [ 56.695449] [OV5640@lex]sensor_s_release_af [ 56.707808] [OV5640@lex]disalbe oe! but then trying to access /dev/video0 results in the same dmesg output as the first; "chip found is not an target chip." etc. I've also tried physically unplugging the power to the whole orange pi for a minute, and replugging it in, to hard reset the camera, but even this doesn't solve the problem. I actually have to unplug the camera and replug it again for it to work. Frankly this makes no sense to me, the only reasoning I can come up with is the camera cable is getting knocked loose and needs to be reseated, but that's unlikely as this has happened several times to me, and the orange pi & camera sits up high on a shelf, untouched by anyone. Does anyone have any ideas? In the mean time I think I'll try to see if the problem still occurs if I'm using the camera continuously; perhaps the camera is entering some kind of standby mode that I can't get it out of again. Thanks
  4. [UPDATE] Finally got it working; here's the new script.fex. Also need to remember to run: sunxi-pio -m "PA17<1><0><1><1>" # AVDD / CSI_PWR_EN sunxi-pio -m "PG13<1><0><1><1>" # DOVDD / AFCC_EN before loading ov5640 and vfe_v4l2. The opencv error is still there though, so i'll have to figure out a workaround to pipe the image data in from ffmpeg or something.
  5. Hi everyone, I bought this Orange Pi PC with this OV5640 5MP camera module. I've been following the other threads online for directions on getting it to work, and I'm up to the point where there exists a /dev/video0 entry, but I'm unable to use it through avafinger's cap-v4l2 program, opencv, or fswebcam. The best I can get is a black image from it. What I've done so far: Editted the [twi2] and [csi0] sections of my script.fex file, converted it back to script.bin with fex2bin sudo modprobe ov5640 sudo modprobe vfe_v4l2 this is the output of dmesg following boot, and this is the output of v4l2-ctl --all. Here's a link to my current script.fex. I've tried many different variations of the [csi0] section to no avail so far. cap-v4l2 fails with the error message: v4l2: errno: 22 - check sensor, something wrong. v4l2: failed to retrieve frame. fswebcam gives me: Error setting pixel format. VIDIOC_S_FMT: Operation not permitted and opencv fails with: mmap: Invalid argument munmap: Invalid argument /dev/video0 does not support memory mapping VIDEOIO ERROR: V4L: can't open camera by index 0 munmap: Invalid argument /dev/video0 does not support memory mapping I've been trying for over a week now and I'm basically out of ideas. Does anyone have any suggestions? Thanks in advance.