Can't get any UVC camera to work with BeagleBone

1,300 views
Skip to first unread message

fluffy

unread,
Feb 12, 2012, 2:29:07 PM2/12/12
to Beagle Board
Once upon a time, before I upgraded a zillion Angstrom packages re
video libs, my UVC-able webcam (Gearhead) worked OK at 320x200 with
the Motion software. Post the upgrades, I can' get this camera or a
Logitech webcam, both of which work with my x86 Ubuntu system, to work
at all with any video app software on the Beaglebone.

Tried Motion, also Mjpeg_streamer. Each just hangs and eventually
times out without retrieving any image from the camera.

mjpeg_streamer generates the following in dmesg:

[315724.391608] uvcvideo: Found UVC 1.00 device <unnamed> (046d:0819)
[315724.492940] input: UVC Camera (046d:0819) as /devices/platform/
omap/ti81xx-usbss/musb-hdrc.1/usb1/1-1/1-1:1.0/input/input0
[316166.789571] uvcvideo: Failed to resubmit video URB (-1).
[316168.790155] uvcvideo: Failed to resubmit video URB (-1).
[316200.013265] musb_host_rx 1601: RX14 dma busy, csr 2020
[316204.511377] uvcvideo: Failed to resubmit video URB (-1).
[316295.902053] usb_process_rx_queue 1466: Invalid PD popped from Rx
completion queue
[316327.166354] gadget: high speed config #1: Linux File-Backed
Storage
[316500.031569] uvcvideo: Deprecated UVCIOC_CTRL_{ADD,MAP_OLD,GET,SET}
ioctls will be removed in 2.6.42.
[316500.031596] uvcvideo: See http://www.ideasonboard.org/uvc/upgrade/
for upgrade instructions.

Version of Motion, built from recent SVN snapshot hangs like this:

[1] [NTC] [VID] vid_v4lx_start: Using videodevice /dev/video0 and
input -1
[1] [NTC] [VID] v4l2_get_capability:
------------------------
cap.driver: "uvcvideo"
cap.card: "UVC Camera (046d:0819)"
cap.bus_info: "usb-musb-hdrc.1-1"
cap.capabilities=0x04000001
------------------------
[0] [NTC] [STR] httpd_run: motion-httpd/8.3.0 running, accepting
connections
[1] [NTC] [VID] v4l2_get_capability: - VIDEO_CAPTURE
[0] [NTC] [STR] httpd_run: motion-httpd: waiting for data on 0.0.0.0
port TCP 8080
[1] [NTC] [VID] v4l2_get_capability: - STREAMING
[1] [NTC] [VID] v4l2_select_input: name = "Camera 1", type 0x00000002,
status 00000000
[1] [NTC] [VID] v4l2_select_input: - CAMERA
[1] [WRN] [VID] v4l2_select_input: Device doesn't support VIDIOC_G_STD
[1] [NTC] [VID] v4l2_set_pix_format: Config palette index 17 (YU12)
doesn't work.
[1] [NTC] [VID] v4l2_set_pix_format: Supported palettes:
[1] [NTC] [VID] v4l2_set_pix_format: (0) YUYV (YUV 4:2:2 (YUYV))
[1] [NTC] [VID] v4l2_set_pix_format: 0 - YUV 4:2:2 (YUYV)
(compressed : 0) (0x56595559)
[1] [NTC] [VID] v4l2_set_pix_format: (1) MJPG (MJPEG)
[1] [NTC] [VID] v4l2_set_pix_format: 1 - MJPEG (compressed : 1)
(0x47504a4d)
[1] [NTC] [VID] v4l2_set_pix_format Selected palette YUYV
[1] [NTC] [VID] v4l2_do_set_pix_format: Testing palette YUYV (320x240)
[1] [NTC] [VID] v4l2_do_set_pix_format: Using palette YUYV (320x240)
bytesperlines 640 sizeimage 153600 colorspace 00000008
[1] [NTC] [VID] v4l2_scan_controls: found control 0x00980900,
"Brightness", range 0,255
[1] [NTC] [VID] v4l2_scan_controls: "Brightness", default 128,
current 128
[1] [NTC] [VID] v4l2_scan_controls: found control 0x00980901,
"Contrast", range 0,255
[1] [NTC] [VID] v4l2_scan_controls: "Contrast", default 32,
current 32
[1] [NTC] [VID] v4l2_scan_controls: found control 0x00980902,
"Saturation", range 0,255
[1] [NTC] [VID] v4l2_scan_controls: "Saturation", default 32,
current 32
[1] [NTC] [VID] v4l2_scan_controls: found control 0x00980913, "Gain",
range 0,255
[1] [NTC] [VID] v4l2_scan_controls: "Gain", default 0, current 0
[1] [DBG] [VID] v4l2_set_mmap: mmap information: frames=4
[1] [DBG] [VID] v4l2_set_mmap: 0 length=153600 Address (418a3000)
[1] [DBG] [VID] v4l2_set_mmap: 1 length=153600 Address (418f9000)
[1] [DBG] [VID] v4l2_set_mmap: 2 length=153600 Address (42135000)
[1] [DBG] [VID] v4l2_set_mmap: 3 length=153600 Address (42300000)
[1] [NTC] [VID] vid_v4lx_start: Using V4L2
[1] [NTC] [ALL] image_ring_resize: Resizing pre_capture buffer to 1
items
[1] [DBG] [VID] v4l2_next: 1) vid_source->pframe -1
[0] [ERR] [ALL] main: Thread 1 - Watchdog timeout, trying to do a
graceful restart
[0] [NTC] [STR] httpd_run: motion-httpd - Finishing
[0] [NTC] [STR] httpd_run: motion-httpd Closing
[0] [NTC] [STR] motion_web_control: motion-httpd thread exit

This seems like a problem with the uvcvideo driver, but I am not
sure. Using the "stock" kernel originally installed on the SD card in
my Beaglebone:

Linux beaglebone 3.1.0+ #1 Tue Nov 15 15:51:15 CET 2011 armv7l GNU/
Linux

Saw a suggestion to enable DMA in a thread here, but am unsure how to
do that, or if it would help. Any suggestions welcome.

RichardB

unread,
Mar 4, 2012, 10:13:22 PM3/4/12
to beagl...@googlegroups.com
I have a UVC webcam (Logitect C270) which appears to be working well -- reports as /dev/video0 in dmesg and in the /dev directory
--> FLUFFY -- upgrading to latest kernel (e.g. on 2/14/2012 Angstrom build) looks to be advice on the boards on the easiest way to get UVC working.  Experts, is that right?


My question -- Now I have my UVC webcam, working ...
Are there pre-built (opkg packages) of mjpeg-streamer or motion for BeagleBone? 

I've looked at gstreamer but I'm baffled by the configuration

Simple streaming of video from UVC webcam on the BeagleBone to a browser would be great which is what mjpeg-streamer looks to do

Any suggestions?


I haven't yet done any compilation of source on the 'Bone so I can see mjpeg-streamer on Github but I'm confused how to proceed

--> Documentation request -- a walk-through of how to download source from Github and configure and run compile/make on the 'Bone under Angstrom would be VERY HELPFUL for those of us learning and moving up from Arduino, etc


Thanks!
Richard

David Lambert

unread,
Mar 4, 2012, 10:43:25 PM3/4/12
to beagl...@googlegroups.com
On 03/04/2012 09:13 PM, RichardB wrote:
> I have a UVC webcam (Logitect C270) which appears to be working well
> -- reports as /dev/video0 in dmesg and in the /dev directory
> --> FLUFFY -- upgrading to latest kernel (e.g. on 2/14/2012 Angstrom
> build) looks to be advice on the boards on the easiest way to get UVC
> working. Experts, is that right?
>
>
> My question -- Now I have my UVC webcam, working ...
> Are there pre-built (opkg packages) of mjpeg-streamer or motion for
> BeagleBone?
>
> I've looked at gstreamer but I'm baffled by the configuration
>
> Simple streaming of video from UVC webcam on the BeagleBone to a
> browser would be great which is what mjpeg-streamer looks to do
>
> Any suggestions?
>
>
I have had on/off experiences with the Beaglebone kernels regarding UVC
streaming especially with memory mapped YUYV captures. Someone mentioned
that it was an issue with DMA being disabled by default. I never got to
the root cause, but I have an intermediate kernel that works for me. If
you would like this please mail me off list and I can send it (without
warranty ;-) ).

In the meantime I am hoping that the Beaglebone gurus will get this
fixed once the kernel matures.

Regards,

Dave.

David Lambert

unread,
Dec 12, 2012, 3:59:08 PM12/12/12
to beagl...@googlegroups.com
I believe the newer kernels have USB isochronous DMA disabled by default.
On 12/12/2012 01:57 PM, Halil Can Kaşkavalcı wrote:
David, how did you managed that? I guess that requires rebuilding the kernel? I see the camera on dmesg, however when I try to access it via OpenCV, I cannot. I couldn't figure out a solution. Any help is appreciated. (Dmesg output is below)

[10187.153612] usb 1-1: USB disconnect, device number 2
[10192.940776] usb 1-1: new high-speed USB device number 3 using musb-hdrc
[10193.293111] usb 1-1: New USB device found, idVendor=046d, idProduct=0825
[10193.293133] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=2
[10193.293147] usb 1-1: SerialNumber: 1E4C61A0
[10193.294086] uvcvideo: Found UVC 1.00 device <unnamed> (046d:0825)
[10193.391258] input: UVC Camera (046d:0825) as /devices/platform/omap/musb-ti81xx/musb-hdrc.1/usb1/1-1/1-1:1.0/input/input1
--
For more options, visit http://beagleboard.org/discuss
 
 

dave.vcf
Reply all
Reply to author
Forward
0 new messages