• Register
    • Login
    • Search

    Unsolved Raspberry pi camera module 3 capture error

    EXT-Selfies
    2
    11
    119
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • O
      oturan last edited by

      Hi guys,

      I managed to take selfies by a microsft usb camera.

      However I can’t get a picture from raspberry pi module 3. (after unpluging USB cam and plugging pi module v3)

      I tested camera module v3 with libcamera commands and camera working on the OS side.

      I started debugging on EXT-Selfie module and it gets below:

      [02.06.2023 14:20.12.037] [LOG] [SELFIES] Shoot payload: {
      options: {
      playShutter: true,
      autoValidate: true,
      showResult: true,
      TBkey: null,
      useTBKeyOnly: false
      }
      }
      [02.06.2023 14:20.12.046] [LOG] fswebcam -r 640x480 --jpeg 100 -d /dev/video1 --no-banner /home/ozgur/MagicMirror/modules/EXT-Selfies/photos/230602_142012.jpeg
      [02.06.2023 14:20.12.163] [LOG] — Opening /dev/video1…
      Trying source module v4l2…
      /dev/video1 opened.
      No input was specified, using the first.
      Unable to find a compatible palette format.

      I tried fswebcam commands separatly on the termial but it gets error by this device.

      My device list is:

      ozgur@magicmirror:~ $ v4l2-ctl --list-devices
      bcm2835-codec-decode (platform:bcm2835-codec):
      /dev/video10
      /dev/video11
      /dev/video12
      /dev/video18
      /dev/video31
      /dev/media1

      bcm2835-isp (platform:bcm2835-isp):
      /dev/video13
      /dev/video14
      /dev/video15
      /dev/video16
      /dev/video20
      /dev/video21
      /dev/video22
      /dev/video23
      /dev/media2
      /dev/media3

      unicam (platform:fe801000.csi):
      /dev/video0
      /dev/video1
      /dev/media4

      rpivid (platform:rpivid):
      /dev/video19
      /dev/media0

      ** Unicam should be the “camera module v3”. I tried writing video0, video1, media4 with command fswebcam command, no luck.

      Do you have any idea?

      best regards

      1 Reply Last reply Reply Quote 0
      • bugsounet
        bugsounet Main Coder last edited by bugsounet

        Hi,

        Can you try this and give me the result ?

        fswebcam -r 640x480 --jpeg 100 -D 1
        

        It seem that your camera is not registred in the system

        My place in France Top committers of Github:
        committers.top badge

        1 Reply Last reply Reply Quote 0
        • O
          oturan last edited by

          zgur@raspberrypi:~$ fswebcam -r 640x480 --jpeg 100 -D 1
          — Opening /dev/video0…
          Trying source module v4l2…
          /dev/video0 opened.
          No input was specified, using the first.
          Delaying 1 seconds.
          Error starting stream.
          VIDIOC_STREAMON: Invalid argument
          Unable to use mmap. Using read instead.
          — Capturing frame…
          VIDIOC_DQBUF: Invalid argument
          Segmentation fault

          1 Reply Last reply Reply Quote 0
          • bugsounet
            bugsounet Main Coder last edited by

            do you enable Legacy Camera in raspi-config ? (Interface Options > Legacy Camera)

            My place in France Top committers of Github:
            committers.top badge

            1 Reply Last reply Reply Quote 0
            • O
              oturan last edited by

              I enabled before and couldn’t make it work wit raspistill command. After search on google, I realized that the legacy mode is finishing and libcamera commands are working instead of raspistill commands.

              If you want me to try it, I can re-enable legacy mode to see if fswebcam works…

              1 Reply Last reply Reply Quote 0
              • bugsounet
                bugsounet Main Coder last edited by

                I know but there are so many weird things from one kernel to another…

                by the way, is it a x64 or 32bit kernel?

                uname -a
                

                send the result, thx

                My place in France Top committers of Github:
                committers.top badge

                1 Reply Last reply Reply Quote 0
                • O
                  oturan last edited by

                  ozgur@raspberrypi:~ $ uname -a
                  Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux

                  1 Reply Last reply Reply Quote 0
                  • bugsounet
                    bugsounet Main Coder last edited by

                    I suspect the x64 kernel is the problem,
                    can try 32bits kernel for testing ?
                    see there my /boot/config.txt modification to force 32bits Kernel

                    My place in France Top committers of Github:
                    committers.top badge

                    1 Reply Last reply Reply Quote 0
                    • O
                      oturan last edited by

                      Sorry for late reply, I reinstalled the magicmirror from scracth and applied the config: (added “arm_64bit=0” to /boot/config.txt

                      now: uname -a returns:
                      Linux magicmirror 6.1.21-v7l+ #1642 SMP Mon Apr 3 17:22:30 BST 2023 armv7l GNU/Linux

                      However failed again:

                      From startup logs:

                      [16.07.2023 20:37.29.224] [LOG] [SELFIES] Searching camera devices…
                      [16.07.2023 20:37.29.228] [LOG] [SELFIES] Detected devices: [
                      ‘/dev/video0’, ‘/dev/video1’,
                      ‘/dev/video10’, ‘/dev/video11’,
                      ‘/dev/video12’, ‘/dev/video13’,
                      ‘/dev/video14’, ‘/dev/video15’,
                      ‘/dev/video16’, ‘/dev/video18’,
                      ‘/dev/video19’, ‘/dev/video20’,
                      ‘/dev/video21’, ‘/dev/video22’,
                      ‘/dev/video23’, ‘/dev/video31’
                      ]
                      [16.07.2023 20:37.29.230] [LOG] [SELFIES] Default camera ‘/dev/video0’ will be used.

                      When shooting for selifie:

                      16.07.2023 22:18.10.604] [LOG] [SELFIES] Shoot payload: {
                      options: {
                      playShutter: true,
                      autoValidate: false,
                      showResult: true,
                      TBkey: null,
                      useTBKeyOnly: false
                      }
                      }
                      [16.07.2023 22:18.10.622] [LOG] fswebcam -r 1280x720 --jpeg 100 --no-banner /home/ozgur/MagicMirror/modules/EXT-Selfies/photos/230716_221810.jpeg
                      [16.07.2023 22:18.10.839] [ERROR] [SELFIES] Capture Error! Error: Command failed: fswebcam -r 1280x720 --jpeg 100 --no-banner /home/ozgur/MagicMirror/modules/EXT-Selfies/photos/230716_221810.jpeg
                      — Opening /dev/video0…
                      Trying source module v4l2…
                      /dev/video0 opened.
                      No input was specified, using the first.
                      Error starting stream.
                      VIDIOC_STREAMON: Invalid argument
                      Unable to use mmap. Using read instead.
                      — Capturing frame…
                      VIDIOC_DQBUF: Invalid argument
                      Segmentation fault (core dumped)

                      at ChildProcess.exithandler (node:child_process:430:12)
                      at ChildProcess.emit (node:events:513:28)
                      at maybeClose (node:internal/child_process:1091:16)
                      at Socket.<anonymous> (node:internal/child_process:449:11)
                      at Socket.emit (node:events:513:28)
                      at Pipe.<anonymous> (node:net:322:12) {
                      

                      code: 139,
                      killed: false,
                      signal: null,
                      cmd: ‘fswebcam -r 1280x720 --jpeg 100 --no-banner /home/ozgur/MagicMirror/modules/EXT-Selfies/photos/230716_221810.jpeg’
                      }

                      1 Reply Last reply Reply Quote 0
                      • bugsounet
                        bugsounet Main Coder last edited by

                        Hi, no other idea for this
                        I haven’t any pi camera module 3 for testing

                        My place in France Top committers of Github:
                        committers.top badge

                        1 Reply Last reply Reply Quote 0
                        • O
                          oturan last edited by

                          Thanx anyway… Have a nice day…

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post
                          Powered by NodeBB | @bugsounet ©2023