USB success & challenges

53 views
Skip to first unread message

Joker B

unread,
May 15, 2009, 11:30:25 PM5/15/09
to Beagle Board
Success: I realized I had one of those little Cisco USB-Ethernet
sticks in my briefcase! Pulled it out, plugged it in, and I'm posting
from my Beagle with no further fiddling around :)

Challenge: Is Angstrom meant to work with UVC cameras like the
Logitech 9000, or do I need to extend my build? The camera appears in
"lsusb" but I can't seem to get the OpenCV samples to capture from
it...

kb
(yes, I am excited!)

Frans Meulenbroeks

unread,
May 16, 2009, 11:25:45 AM5/16/09
to beagl...@googlegroups.com
2009/5/16 Joker B <kevin....@gmail.com>:

UVC cams work with angstrom. (haven't tried this myself)

Matthias Klostermann

unread,
May 16, 2009, 12:18:38 PM5/16/09
to beagl...@googlegroups.com
I have tried both Logitech 9000 and Logitech Quickcam Vision Pro (same
Cam, different Firmware, I think) and they both work like a charm.
Tested on BB Rev B5 (noticing a little USB-OTG-Bandwidth problem the
last time I tried) and (recently) Rev C2. The software I tried (e.g.
for Rev C2) was

mplayer tv:// -tv driver=v4l2:width=920:height=760:device=/dev/video0 -
fps 30 -vo sdl

and a little self-written v4l2 App. You could try mplayer to see if
you can capture at all... if you are capturing over OTG, you should
try to start with 320x240 and go up from there. Worked on kernel
2.6.27, 2.6.28 and 2.6.29 so far.

Regards,
Matthias

Joker B

unread,
May 16, 2009, 2:50:29 PM5/16/09
to Beagle Board
Thanks! Sadly I don't show any device named /dev/video0 or anything
similar... hmm

I'm running a narcissus build from last week, on rev c2.

mplayer does try, but quickly fails to find /dev/video0. Any
suggestions?

thx again,
kb

On May 16, 9:18 am, Matthias Klostermann <kodosc...@gmail.com> wrote:
> I have tried both Logitech 9000 and Logitech Quickcam Vision Pro (same  
> Cam, different Firmware, I think) and they both work like a charm.  
> Tested on BB Rev B5 (noticing a little USB-OTG-Bandwidth problem the  
> last time I tried) and (recently) Rev C2. The software I tried (e.g.  
> for Rev C2) was
>
> mplayer tv:// -tv driver=v4l2:width=920:height=760:device=/dev/video0 -
> fps 30 -vo sdl
>
> and a little self-written v4l2 App. You could try mplayer to see if  
> you can capture at all... if you are capturing over OTG, you should  
> try to start with 320x240 and go up from there. Worked on kernel  
> 2.6.27, 2.6.28 and 2.6.29 so far.
>
> Regards,
> Matthias
>
> On 16.05.2009, at 17:25, Frans Meulenbroeks wrote:
>
>
>
> > 2009/5/16 Joker B <kevin.bjo...@gmail.com>:

Frans Meulenbroeks

unread,
May 16, 2009, 2:51:12 PM5/16/09
to beagl...@googlegroups.com
note that non uvc cams might have issues. I've not been able to get my
webcam properly working. This one uses the pwc driver but apparently
some data is lost or corrupted. The same cam works perfectly under
opensuse.

FM

Frans Meulenbroeks

unread,
May 16, 2009, 4:30:27 PM5/16/09
to beagl...@googlegroups.com
2009/5/16 Joker B <kevin....@gmail.com>:

>
> Thanks! Sadly I don't show any device named /dev/video0 or anything
> similar... hmm
>
> I'm running a narcissus build from last week, on rev c2.
>
> mplayer does try, but quickly fails to find /dev/video0. Any
> suggestions?
>
> thx again,
> kb

Is the uvc module loaded? I don't think it it compiled in, so you
might need to modprobe it

FM

Joker B

unread,
May 16, 2009, 5:07:26 PM5/16/09
to Beagle Board
Thx for the suggestion, modprobe fails though, saying it can't find /
lib/modules/2.6.29/modules.dep

Looking in /lib/modules, I see three directories:

/lib/modules/2.6.2[789]-omap1/

though none of those contain modules.dep either.

Is there some option I could use for a narcissus build? I'm currently
in the midst of trying to build Angstrom myself under Ubuntu 9.0.4,
though I've so far had two failures (#1 ran out of disk space, #2
tried on an external disk but it failed for unknown reasons -- running
#3 now with better logging, but as you may know each build can take
ten or twelve hours each! heh)

Matthias, did you need to install anything special?

thanks,
kb



On May 16, 1:30 pm, Frans Meulenbroeks <fransmeulenbro...@gmail.com>
wrote:
> 2009/5/16 Joker B <kevin.bjo...@gmail.com>:
>
>
>

Frans Meulenbroeks

unread,
May 17, 2009, 3:53:13 AM5/17/09
to beagl...@googlegroups.com
2009/5/16 Joker B <kevin....@gmail.com>:
>
> Thx for the suggestion, modprobe fails though, saying it can't find  /
> lib/modules/2.6.29/modules.dep

insmod /libmodules/2.6.29/ernel/drivers/media/video/uvc/uvcvideo.ko
kernel might do the trick.
Not sure if additional modules are needed, but if the insmod fails
with unknown symbol this is definitely the case
guess some video modlues might also be needed.

after doing that you might want to run a depmod -a but I am not really
a modules wizard.


>
> Looking in /lib/modules, I see three directories:
>
>   /lib/modules/2.6.2[789]-omap1/
>
> though none of those contain modules.dep either.
>
> Is there some option I could use for a narcissus build? I'm currently
> in the midst of trying to build Angstrom myself under Ubuntu 9.0.4,
> though I've so far had two failures (#1 ran out of disk space, #2
> tried on an external disk but it failed for unknown reasons -- running
> #3 now with better logging, but as you may know each build can take
> ten or twelve hours each! heh)

Rebuild time depends on your hardware. For me (dual core D920, 3 Ghz,
2 GB ram, 2 years old, opensuse, a bake of console-image from scratch
definitely takes less than 6 hrs (not counting download time, I
already had a lot of stuff in my downloads).

out of space used to happen for me as well. Make some room :-)
external disk: I vaguely recall that there could be issues with
symlinks in the path. Not sure if this is still true.
The fact that it is external should not make a difference.
We need an error message to be able to diagnose this (and for a quick
answer you could try #beagle on freenode irc).
No need to start from scratch after a build. If you try again it will
just continue where it was.

Good luck. FM.

Koen Kooi

unread,
May 17, 2009, 4:00:09 AM5/17/09
to beagl...@googlegroups.com

Op 17 mei 2009, om 09:53 heeft Frans Meulenbroeks het volgende
geschreven:
> .

> The fact that it is external should not make a difference.

Most people mount those with -o user, which implies the 'noexec' flag.
Figuring out the implications are left as an excercise to the reader :)

regards,

Koen

PGP.sig

Matthias Klostermann

unread,
May 17, 2009, 6:25:25 AM5/17/09
to beagl...@googlegroups.com

Matthias, did you need to install anything special?

Nothing special, as far as I remember. The last try was with a narcissus image built on wednesday last week. I have the habit of checking the "All kernel modules" option when creating the images... maybe that's it, if you haven't tried it already? The modules get loaded automatically when my cam is plugged in. No modprobing required. I recall, that there are problems with older models of the Quickcam 9000 under Linux. Have you tried the cam on a Linux-PC?

Regards,
Matthias

Joker B

unread,
May 17, 2009, 1:05:23 PM5/17/09
to Beagle Board
thanks, I'll do that.

The cam is new this week, and the first thing I did with it is connect
o my nadros Eee - worked perfectly without effort

off to narcissus-- thx!
kb

Frans Meulenbroeks

unread,
May 19, 2009, 10:28:13 AM5/19/09
to beagl...@googlegroups.com
2009/5/17 Koen Kooi <ko...@beagleboard.org>:

You mean, people actually *use* mount options? Wauw.
For 25 years I just used:
mount /dev/whatever /mnt
always served me well. Only option that is sometimes needed is -t )
(ok I admit, a notable exception is mounting a SMB/CIFS share, which
is a pain-in-the-ass when it comes to credentials etc.

FM

Joker B

unread,
May 19, 2009, 12:54:23 PM5/19/09
to Beagle Board
Actually by "external" I just meant the system's second drive, since
the boot drive (with my home directory) is old and small :)

Still having compile troubles though so I'm guessing (when I get back
to that machine) that I'll have to move the home directory to that
second drive, rather than just setting $OE_HOME and hoping it all
sorts itself.

kb

On May 19, 7:28 am, Frans Meulenbroeks <fransmeulenbro...@gmail.com>
wrote:
> 2009/5/17 Koen Kooi <k...@beagleboard.org>:

Joker B

unread,
Jun 3, 2009, 1:34:44 PM6/3/09
to Beagle Board
The basic issues with narcissus versus my Begle have finally been
solved thanks to Koen & Dan (see
http://groups.google.com/group/beagleboard/browse_thread/thread/b1c6396ba57bb722?hl=en#
)

Running

> mplayer tv:// -tv driver=v4l2:width=920:height=760:device=/dev/video0-
> fps 30 -vo sdl

and indeed it sees my camera right away!!!!! mplayer starts, the vid
cam "on" LED lights up, and... I get a black screen. Switching to res
320x240 makes no difference. Does the "tv://" specification mean that
the output is going to the S-Video port, rather than the HDMI/X
display, perhaps?

(next message: will try to copy-and-paste an mplayer log, since my BB
i once agan seeing both video and the internet, so I can switch
machines...)

thanks
kb

Joker B

unread,
Jun 3, 2009, 1:43:46 PM6/3/09
to Beagle Board
Here is the mplayer log, as you can see it seems to be lacking a few
files. I also tried using the "-vf screenshot" video filter and
pressing "s" a few times, but saw no results -- maybe it was only
copying to the clipboard, or to some location I've yet to figure out?

thx again, kb

(configuration: using narcissus, with "beagleboard demo" and "opencv"
both selected... for not, this time, "all kernel modules")

---- log begins --

bjorke@beagleboard:~$ mplayer tv://
driver=v4l2:width=320:height=240:device=/dev
/video0 -fps 30 -vo sdl
MPlayer dev-SVN-r28346-4.3.3 (C) 2000-2009 MPlayer Team
CPU: ARM

Playing tv://.
TV file format detected.
Selected driver: v4l2
name: Video 4 Linux 2 input
author: Martin Olschewski <olsch...@zpr.uni-koeln.de>
comment: first try, more to come ;-)
v4l2: your device driver does not support VIDIOC_G_STD ioctl,
VIDIOC_G_PARM was used instead.
Selected device: UVC Camera (046d:0990)
Capabilites: video capture streaming
supported norms:
inputs: 0 = Camera 1;
Current input: 0
Current format: YUYV
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set format failed: Invalid argument
v4l2: ioctl set format failed: Invalid argument
tv.c: norm_from_string(pal): Bogus norm parameter, setting default.
v4l2: ioctl enum norm failed: Invalid argument
Error: Cannot set norm!
Selected input hasn't got a tuner!
v4l2: ioctl set mute failed: Invalid argument
v4l2: ioctl query control failed: Invalid argument
==========================================================================
Opening video decoder: [raw] RAW Uncompressed Video
VDec: vo config request - 640 x 480 (preferred colorspace: Packed
YUY2)
VDec: using Packed YUY2 as output csp (no 0)
Movie-Aspect is undefined - no prescaling applied.
VO: [xv] 640x480 => 640x480 Packed YUY2
Selected video codec: [rawyuy2] vfm: raw (RAW YUY2)
==========================================================================
Audio: no sound
Starting playback...
v4l2: select timeout
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
New_Face failed. Maybe the font path is wrong.
Please supply the text font file (~/.mplayer/subfont.ttf).
subtitle font: load_sub_face failed.
v4l2: ioctl set mute failed: Invalid argument
v4l2: 58 frames successfully processed, -57 frames dropped.

Exiting... (Quit)

Dan

unread,
Jun 3, 2009, 1:47:19 PM6/3/09
to beagl...@googlegroups.com


I've been able to use mplayer and my webcam by using this command:

mplayer tv:// -tv
driver=v4l2:width=320:height=240:fps=90:device=/dev/video0 -nosound

Try that. It's slightly different from what you've been doing.

- Dan

Joker B

unread,
Jun 3, 2009, 2:23:36 PM6/3/09
to Beagle Board
Thanks again Dan. Sadly, I still get the same result... same messages
in the log, too.

WIll keep poking at it...

kb

Dan

unread,
Jun 3, 2009, 2:25:27 PM6/3/09
to beagl...@googlegroups.com

You're welcome. Which webcam/driver are you using?

- Dan

Joker B

unread,
Jun 3, 2009, 8:49:52 PM6/3/09
to Beagle Board
camera: A new Logitech 9000 which is UVC and works swimmingly under
windows, ubuntu, and xandros on my other machines

driver: v4l2

Running 'facedetect' also lights up the camera LED and it *seems* to
be doing something though no image is displayed. It might be
delivering noise but I get the impression that it's processing
multiple frames.

I'll try using a different Angstrom SD with all kernels added later on
tonight....

kb

-- facedetect log --

bjorke@beagleboard:~$ facedetect --cascade="cascade/
haarcascade_frontalface_alt.
xml"
/usr/share/themes/Clearlooks/gtk-2.0/gtkrc:46: Clearlooks
configuration option "menuitemstyle" is not supported and will be
ignored.
/usr/share/themes/Clearlooks/gtk-2.0/gtkrc:47: Clearlooks
configuration option "listviewitemstyle" is not supported and will be
ignored.
/usr/share/themes/Clearlooks/gtk-2.0/gtkrc:48: Clearlooks
configuration option "progressbarstyle" is not supported and will be
ignored.
detection time = 8539.15ms
detection time = 8554.2ms
detection time = 11761.4ms
Camera decode error (-1): Corrupt JPEG data: premature end of data
segment

----------------------------------

Joker B

unread,
Jun 5, 2009, 2:41:47 AM6/5/09
to Beagle Board
Wow, what an unexpected change:

I made a new image with the same setup but with "All Kernel Modules"
checked.

Copied it to a new card (2MB, the large partition expanded by gparted
before un-tarballing)

Launched in Beagle-- started right up

BUT: no "lsusb" available (even as root), no internet connectivity, no
sign of the video device in /dev/... It was, to my surprise, a step
BACK in terms of USB functionality. Stranger and stranger....

kb
Reply all
Reply to author
Forward
0 new messages