Can't get my webcam to work with OctoPi

What is the problem?

I purchased a TeckNet FHD webcam, more specific - this one.
I looked up at the Webcams known to work page and it seems that someone got this webcam to work.
However, I'm not sure if we share the exact same model, but they do look very identical to each other.

The issue is that the webcam will not display any image via the OctoPrint control interface.

What did you already try to solve it?

I tried to edit the octopi.txt file in many different ways. I enabled the "camera_usb_options" and set it to
"-r FHD", as shown in the known webcams to work page. It didn't work for me so I tried different setups,
like adding -f 10 for framerate, even adding -y to elimante the option that my webcam doesn't support MJPG
by defaults.

I also typed lsusb command to see if the webcam shows up and it was listed, the Raspberry Pi definitely detects it.
I connected this webcam to my PC running Windows 10 and it works just fine, it's recognized and operating.

From what I can see in the webcamd.log file (link below), the webcam is not detected, altough it showed up in the lsusb. Any ideas why?

lsusb

Additional information about your setup

Running OctoPrint 1.3.7, OctoPi 0.14.0, TEVO Tarantula, Marlin 1.1.x.

webcamd.log file.

--

I would apprecite any tips and help in order to make this webcam to work, I don't know how to go on from here.

Did you try different frame rates? Mine didn't work until it had a frame rate it liked.
FYI - My USB camera is not the same kind.

Are you absolutely sure that is the camera?

Try unplugging the camera, running dmesg, plugging the camera back in and running dmesg again. Should print something out like this (this is for a Logitech C270):

[1968209.379374] usb 1-1.5: new high-speed USB device number 8 using dwc_otg
[1968209.721338] usb 1-1.5: New USB device found, idVendor=046d, idProduct=0825
[1968209.721351] usb 1-1.5: New USB device strings: Mfr=0, Product=0, SerialNumber=2
[1968209.721360] usb 1-1.5: SerialNumber: 0FC84C60
[1968209.722403] uvcvideo: Found UVC 1.00 device <unnamed> (046d:0825)
[1968209.812144] uvcvideo 1-1.5:1.0: Entity type for entity Extension 4 was not initialized!
[1968209.812163] uvcvideo 1-1.5:1.0: Entity type for entity Extension 6 was not initialized!
[1968209.812174] uvcvideo 1-1.5:1.0: Entity type for entity Extension 7 was not initialized!
[1968209.812186] uvcvideo 1-1.5:1.0: Entity type for entity Processing 2 was not initialized!
[1968209.812197] uvcvideo 1-1.5:1.0: Entity type for entity Extension 3 was not initialized!
[1968209.812207] uvcvideo 1-1.5:1.0: Entity type for entity Camera 1 was not initialized!
[1968209.812732] input: UVC Camera (046d:0825) as /devices/platform/soc/3f980000.usb/usb1/1-1/1-1.5/1-1.5:1.0/input/input1
[1968209.843166] usb 1-1.5: set resolution quirk: cval->res = 384

I'm pretty sure that is the camera. This the output from dmesg, after I reconnected the webcam:

Is there anything to do next?

@foosel, I'll apprentice any help from you. Do you know what should be done if the camera does being recognized by dmesg?

If I had an idea I'd have posted it already. Problems like these is why I avoid non brand webcams like the plaque.

Sorry for hijacking the thread... but I just re-installed my whole OctoPi installation and connected a new Logitech C270 cam. Iยดve tried several settings in "octopi.txt" according to tips and tricks on:

But all I get is this:

Capture0

It works just fine on my Win10 computer

I did the dmesg mentioned - and it found my camera. It DID however not state the "uvcvideo-lines"??? Do I need to enable that somehow?

I am not the most comfortable around Linux - but I can manage with step-by-step instructions and have been looking all over the place for something that can explain why the image is so wierd. :frowning:

Thank you for your time and help! :):grinning:

Cheers!

I just installed one of the latest nightly builds (4/17) onto a RP3b+. I got the wifi to work fine but I am having no luck with my raspberry pi v2 camera module. I installed the module and webcamd.log says that a camera couldn't be detected.

I would appreciate any advice on things I could try to get my camera module working. Thanks in advance.

I did a write-up for the Pi NoIR camera (as sold by Adafruit, for example). Mine is marked with "Camera v2" on the module so I'm guessing it's the same as yours, @docnesh .

$ ssh pi@octopi.local
$ sudo raspi-config
  # Interfacing Options -> choose Enable Camera
  # when prompted to reboot, choose Yes
  # choose Finish
$ (Remoting in again) cd ~
$ mkdir photos
$ cd photos
$ raspistill -o first-light.jpg
$ ls
first-light.jpg

You can test the camera with raspistill to take a JPG photo and save it into your current directory (having ssh'd into the Raspi of course).

My OctoPi image from the Nightlies appears to automatically startup the webcam service and will display the image on the appropriate tab within OctoPrint as expected.

To the best of my knowledge, that raspi-config option adds start_x=1 to the bottom of /boot/config.txt which means "load up the start_x.elf loader instead of some other one". And this version includes support for the camera. More info

Also, the OctoPrint configuration docs might help.

I am unable to get the log file, SSH says permission denied, and my camera is not working. Could these issues be interconnected?

If you're getting an access-denied error message trying to read a log file then you may be doing it wrong.

Wrong:

nameoffile.log

...since that tries to run the log file.

Right:

cat nameoffile.log

Thank you for your response, I am very new to programming in general. my question is very noob - where do I edit that file? Thank you again

To view its contents you could do:

cat ~/.octoprint/logs/octoprint.log

It would probably be more simple to just download it from OctoPrint -> Settings -> Logs, though.

My issue was I needed to run raspi-config then disable raspberry pi camera under interfacing options and reboot. Hope this helps someone.

4 Likes

Thank you so much. This was exactly what I was looking for.

I had the same problem as the original poster and the exact same camera.
After trying every suggestion I decided to remove all the plugins I installed and that did the trick!
So if you have this issue try removing all plugins related to webcam, especially OctoLapse and OctoprintAnywhere.