Camera module not recognized

Apr 30, 2020 - 3:35 PM

  • I am using the default bionic image with Pi version I get to use my webcamera once. Changed settings to H264 and the camera never came back to life. How do I even troubleshoot? There is no entry for /dev/video*. Dmesg shows no mention of the camera and so does lsusb. Any help will be really appreciated.

  • Check your camera connection.

    This post was edited May 3, 2020 02:29PM
  • I'm finding the camera connections to be flakey.
    I can usually get the samples/camera/ to show an image, but if I move the camera a bit it often crashes guvcview and it usually doesn't work again until I unplug and re-plug the camera -- these connectors are not made for this!!

    I'm using the Lubuntu 18.04 image that came pre-installed,with all updates. does:

    exec v4l-wrap guvcview

    What does v4l-wrap actually do? Where is it?

    Running in a terminal throws a ton of errors and warnings but eventually works.

    The example doesn't work at all.

    Running the in a terminal: might have some useful information, but I can't seem to capture it. It does produce a video.h264 file that plays back in GnomeMPV. does:
    exec v4l-wrap mplayer -fps 30 -vc ffh264 tv://

    ls /dev/video*
    /dev/video0 /dev/video1
    ai@AtomicPi:~/samples/camera$ ls /dev/v*
    /dev/vcs /dev/vcs3 /dev/vcs6 /dev/vcsa1 /dev/vcsa4 /dev/vcsa7 /dev/vhost-net /dev/video1
    /dev/vcs1 /dev/vcs4 /dev/vcs7 /dev/vcsa2 /dev/vcsa5 /dev/vga_arbiter /dev/vhost-vsock
    /dev/vcs2 /dev/vcs5 /dev/vcsa /dev/vcsa3 /dev/vcsa6 /dev/vhci /dev/video0

    by-id by-path

    ai@AtomicPi:~/samples/camera$ ls /dev/v4l/by-path
    pci-0000:00:14.0-usb-0:2:1.0-video-index0 pci-0000:00:14.0-usb-0:2:1.2-video-index0
    ai@AtomicPi:~/samples/camera$ ls /dev/v4l/by-id

    Digital-loggers needs to be forthcoming with some real examples of how to use actually the camera. These examples don't accomplish anything, or give a clue as to how to use it in normal situations like OpenCV or a zoom meeting.

    For example:
    fswebcam -r 1280x720 grab.jpg
    --- Opening /dev/video0...
    Trying source module v4l2...
    /dev/video0 opened.
    No input was specified, using the first.
    Unable to find a compatible palette format.

    exec v4l-wrap fswebcam -r 1280x720 grab.jpg
    --- Opening /dev/video0...
    Trying source module v4l2...
    /dev/video0 opened.
    No input was specified, using the first.
    Adjusting resolution from 1280x720 to 0x0.
    libv4l2: error set_fmt gave us a different result then try_fmt!
    --- Capturing frame...
    Captured frame in 0.00 seconds.
    --- Processing captured image...
    GD Warning: one parameter to a memory allocation multiplication is negative or zero, failing operation gracefully
    Out of memory.
    AND crashes the terminal.

    Plugging in a normal webcam, that makes /dev/video2 everything works as expected when I use /dev/video2

    The fact that the example doesn't work with the default image that came with my board may explain why it doesn't seem to work in OpenCV with anything I've tried.