Sonix webcam not working after update?

General PhidgetSBC Discussion.
stevosaurus
Fresh meat
Posts: 4
Joined: Mon Feb 04, 2013 4:27 pm
Contact:

Sonix webcam not working after update?

Postby stevosaurus » Mon Feb 04, 2013 6:41 pm

I have been using The Sonix technology USB webcam (phidget standard issue) with a phidget sbc 1072 for image capture and video streaming, quite happily until yesterday.

After updating all packages yesterday, I can no longer connect to the webcam. It's got me stumped because this camera worked fine before the update, and continues to work on other machines.

I get this error when using the web interface

"
Found a webcam - but it does not support MJPEG or YUYV, which are required for streaming.
Please plug in your webcam to continue. PhidgetSBC supports UVC (USB Video Class) compatible webcams which support MJPEG.
"

and this error when running a simple webcam capture script onboard:

Code: Select all

import cv
webcam = cv.CaptureFromCAM(0)
frame = cv.QueryFrame(webcam)
cv.SaveImage("snapshot.jpg", frame)


HIGHGUI ERROR: V4L2: Pixel format of incoming image is unsupported by OpenCV
Unable to stop the stream.: Device or resource busy
Unable to stop the stream.: Bad file descriptor
HIGHGUI ERROR: V4L: Pixel format of incoming image is unsupported by OpenCV
OpenCV Error: Null pointer (NULL array pointer is passed) in cvGetMat, file /build/buildd-opencv_2.1.0-3+squeeze1-armel-elCYu0/opencv-2.1.0/src/cxcore/cxarray.cpp, line 2376
Traceback (most recent call last):
File "webcam_snapshot.py", line 18, in <module>
cv.SaveImage("snapshot.jpg", frame)
cv.error: NULL array pointer is passed



output of dmesg on sbc:

Linux video capture interface: v2.00
uvcvideo: Found UVC 1.00 device USB 2.0 Camera (0c45:62f1)
input: USB 2.0 Camera as /devices/platform/s3c2410-ohci/usb1/1-1/1-1.5/1-1.5:1.0/input/input0
usbcore: registered new interface driver uvcvideo
USB Video Class driver (v0.1.0)
3:3:1: cannot get freq at ep 0x84
usbcore: registered new interface driver snd-usb-audio


output of luvcstats -L on sbc:

luvcview version 0.2.1
video /dev/video0
/dev/video0 does not support read i/o
{ pixelformat = 'MJPG', description = 'MJPEG' }
{ discrete: width = 640, height = 480 }
Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 352, height = 288 }
Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 320, height = 240 }
Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 176, height = 144 }
Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,
{ discrete: width = 160, height = 120 }
Time interval between frame: 1/30, 1/25, 1/20, 1/15, 1/10, 1/5,


any idea what's gone wrong?

thanks.

User avatar
burley
Human-Cyborg Relations
Posts: 441
Joined: Tue Sep 27, 2011 2:37 pm
Location: Calgary
Contact:

Re: Sonix webcam not working after update?

Postby burley » Tue Feb 05, 2013 8:58 am

I just updated my SBC and it still runs the webcam just fine. Are you sure you haven't installed any packages that might be interfering with the drivers for it?
Brian Burley
403-282-7335 ext. 6003
support@phidgets.com

User avatar
Patrick
Lead Developer
Posts: 3155
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Sonix webcam not working after update?

Postby Patrick » Tue Feb 05, 2013 10:16 am

Are you using the camera from Phidgets? It looks like you are.

The latest release moves from luvcstats to uvcdynctrl. Can you post the output of: uvcdynctrl -f

We also brought in uvcdynctrl - this is probably what's messing up your camera. Have a look at /var/log/uvcdynctrl-udev.log

You can turn off this by moving away the file /lib/udev/rules.d/85-uvcdynctrl.rules then unplug/replug and see if it helps

You may need to reset the SBC2 and see if the camera comes back.

-Patrick

stevosaurus
Fresh meat
Posts: 4
Joined: Mon Feb 04, 2013 4:27 pm
Contact:

Re: Sonix webcam not working after update?

Postby stevosaurus » Tue Feb 05, 2013 7:39 pm

strangely, uvcdynctrl was not installed.

a quick apt-get install later, and following your instructions, ran uvcdyncntrl -f:

Listing available frame formats for device video0:
Pixel format: MJPG (MJPEG; MIME type: image/jpeg)
Frame size: 640x480
Frame rates: 30, 25, 20, 15, 10, 5
Frame size: 352x288
Frame rates: 30, 25, 20, 15, 10, 5
Frame size: 320x240
Frame rates: 30, 25, 20, 15, 10, 5
Frame size: 176x144
Frame rates: 30, 25, 20, 15, 10, 5
Frame size: 160x120
Frame rates: 30, 25, 20, 15, 10, 5


that looked pretty encouraging, so I checked webcam feed via the web interface, and it worked a treat!

Also checked the capture script, and it's working as designed, allthough I notice you have to disable the webcam in the web interface to make it accessible from onboard the SBC.

If uvcdyncntrl was missing from my SBC, is it possible the update process went awry?

At least it's working now, so thanks for the tip Patrick!

User avatar
Patrick
Lead Developer
Posts: 3155
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Sonix webcam not working after update?

Postby Patrick » Thu Feb 07, 2013 10:26 am

It does seem a bit odd - uvcdynctrl is a prereq. of phidgetsbcwebif 2.0.5 - if you are running that version of the webif, then it shouldn't have installed without also pulling its prerequisites.

-Patrick

User avatar
Patrick
Lead Developer
Posts: 3155
Joined: Mon Jun 20, 2005 8:46 am
Location: Canada
Contact:

Re: Sonix webcam not working after update?

Postby Patrick » Thu Feb 07, 2013 5:05 pm

I may know what's happening. It's possible to install web interface 2.0.5 without uvcdynctrl - but after it installs, you will see that there are a new set of packages to install, so basically you need to run the update twice. After the 1st one - webcam stops working.

-Patrick


Return to “General”

Who is online

Users browsing this forum: No registered users and 0 guests