Can't get my webcam to work with OctoPi


#1

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.


#2

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.


#3

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

#4

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

Is there anything to do next?


#5

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


#6

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


#7

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!


#8

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.


#9

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.