USB redux


508 posts   Page 10 of 21   1 ... 7, 8, 9, 10, 11, 12, 13 ... 21
by thradtke » Wed Mar 20, 2013 6:18 am
pluggy wrote:Is anything stable enough to make the main apt-get upgrade path ?

You mean the dist-upgrade? I never do this as it is not in my offline-repo, but recently tried a bleeding edge firmware from github. No problems were introduced for me, so there's a chance the latest firmware is stable enough. YMMV, of course ;-).
Full-time noob forever.
Posts: 430
Joined: Wed May 16, 2012 5:16 am
Location: Germany / EL
by gsh » Wed Mar 20, 2013 6:39 am
Well I'm going to be working on Isochronous today, I was going to start with a USB 1 audio device and see whether I can make it work properly...

I don't have any webcam's do you know which ones work and which ones do not...

Gordon
Raspberry Pi Engineer
Raspberry Pi Engineer
Posts: 707
Joined: Sat Sep 10, 2011 11:43 am
by gordon77 » Wed Mar 20, 2013 7:58 am
I have a Philips 740, very popular with astronomers, which won't work, and a Microsoft vx2000 which will work up to 352 x 288.

Gordon77
Posts: 689
Joined: Sun Aug 05, 2012 3:12 pm
by shuckle » Wed Mar 20, 2013 7:59 am
PS3 webcam works fine. And it has workgin audio also. Except that the record volume is too low, but that probably is not related to USB issues.
Posts: 367
Joined: Sun Aug 26, 2012 11:49 am
by gordon77 » Wed Mar 20, 2013 8:03 am
Posts: 689
Joined: Sun Aug 05, 2012 3:12 pm
by BerryPicker » Wed Mar 20, 2013 10:35 am
gsh wrote: I don't have any webcam's do you know which ones work and which ones do not...
There's some potentially useful information here, the caveat being the undefined meaning of the term "work"! It's encouraging to see that this task has been assigned and resourced.
Posts: 114
Joined: Tue Oct 16, 2012 3:03 pm
Location: The East of England
by SteveDee » Wed Mar 20, 2013 11:06 am
It looks like there has been some improvement over the last couple of months, as some twitchy webcams are now less twitchy, and some that were completely blank now seem to give twitchy results on low resolution.

Video twitchy-ness is great increased by moving the mouse.

See attached results taken this morning using lsusb, lsmod & guvcview.

Pi = model B/256MB
Lower USB socket used for each camera tested. No Hub, shorted USB polyfuse.

I hope this is useful.
Attachments
2013-03-20_01.png
2013-03-20_01.png (48.57 KiB) Viewed 2878 times
Posts: 126
Joined: Thu Dec 29, 2011 2:18 pm
by pluggy » Wed Mar 20, 2013 8:07 pm
Wouldn't know about the mouse bit, non of my Pis have them, they are all headless. I just want viable stills.

Image

Despite the filename its one of these :

Image

Creative webcam instant.

Relevent bit from dmesg :

Code: Select all
[    2.723978] usb 1-1.3: Product: WebCam Instant
[    2.725964] usb 1-1.3: Manufacturer: Creative Labs 
[    2.908957] udevd[154]: starting version 175
[    3.884082] Linux media interface: v0.10
[    3.964561] Linux video capture interface: v2.00
[    4.016737] Registered led device: led0
[    4.021327] gspca_main: v2.14.0 registered
[    4.068348] gspca_main: gspca_zc3xx-2.14.0 probing 041e:4034
[    4.319206] input: gspca_zc3xx as /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/input/input0
[    4.367040] usbcore: registered new interface driver gspca_zc3xx


Latest Raspdian image with present updates in place.

Works fine with a PC running Ubuntu 12.04.

The PS2 Eyetoy2 works, but the pictures are blurry and the odd frame is minced.

Can't be bothered to dig the rest of my collection out. Hard day.....
Don't judge Linux by the Pi.......
User avatar
Posts: 2085
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
by Triode » Wed Mar 20, 2013 9:38 pm
gsh wrote:Well I'm going to be working on Isochronous today, I was going to start with a USB 1 audio device and see whether I can make it work properly...

I don't have any webcam's do you know which ones work and which ones do not...

Gordon


If you can get hold of an asychronous audio device this would be the most most interesting test as this requires an outbound and inbound isochronous connection at the same time. In the cases I've seen the outbound one will require one packet every 1ms frame and the inbound one will be one every 32 or 64. So you need to be able to deal with both in and out split transaction in the same frame.

Interested in testing if you get something working...
Posts: 4
Joined: Mon Nov 19, 2012 11:18 pm
by AndiDog » Thu Mar 21, 2013 9:51 pm
Anyone having suggestions for this problem, most probably related to USB issues?!: Consistent USB problems with RFID reader
Posts: 28
Joined: Sat Apr 07, 2012 6:01 pm
by sej7278 » Thu Mar 21, 2013 10:57 pm
gordon77 wrote:I have a Philips 740, very popular with astronomers, which won't work, and a Microsoft vx2000 which will work up to 352 x 288.


none of the philips ones work, i've got a 680, 690 and 840, must be the pi doesn't like the pwc driver as it works fine on my other wheezy boxes.

really i just think its pointless even trying to find a working webcam, might as well wait for the camera module.
Posts: 232
Joined: Tue Jan 22, 2013 6:43 pm
by pluggy » Fri Mar 22, 2013 7:13 pm
sej7278 wrote:really i just think its pointless even trying to find a working webcam, might as well wait for the camera module.


+1.

Been resigned to this view point for a while. I've bought ones on the working list ( http://elinux.org/RPi_VerifiedPeripherals#USB_Webcams ) only to find they half work. Limited resolution, poor quality etc.
Don't judge Linux by the Pi.......
User avatar
Posts: 2085
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
by jjplano » Fri Mar 22, 2013 8:30 pm
ok, but what about if you don't want to use a webcam? if you need to enter live video to the pi from another source?

if this issue prevents of using any video to USB capture device, I really don't think it's pointless to try to fix it
Posts: 11
Joined: Tue Mar 19, 2013 6:40 pm
by pluggy » Fri Mar 22, 2013 8:46 pm
I never said it was pointless trying to fix it, but its been going on for a while and whilst problems with some USB devices have improved dramatically (Mice and keyboards now have few issues, which wasn't the case when the Pi was launched), little if any improvement has been forthcoming with webcams. They don't usually tolerate the common dwc_otg.speed=1 workaround which fixes the bulk of audio problems either.

If they can fix the USB altogether, kudos to them, but since the major USB developer (Gordon aka gsh) has admitted he doesn't own a webcam. I'm not going to hold my breath. The camera module has been promised for April (2013 hopefully ;) )

At a hardware and software level, Video grabbers and webcams are very similar.
Don't judge Linux by the Pi.......
User avatar
Posts: 2085
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
by gordon77 » Fri Mar 22, 2013 8:56 pm
sej7278 wrote:
gordon77 wrote:I have a Philips 740, very popular with astronomers, which won't work, and a Microsoft vx2000 which will work up to 352 x 288.


none of the philips ones work, i've got a 680, 690 and 840, must be the pi doesn't like the pwc driver as it works fine on my other wheezy boxes.

really i just think its pointless even trying to find a working webcam, might as well wait for the camera module.


The Philips have very good sensitivity, we await to see the camera module.

Gordon77
Posts: 689
Joined: Sun Aug 05, 2012 3:12 pm
by M33P » Sun Mar 24, 2013 8:31 pm
Hi.

A new kernel is available via rpi-update that implements a more realtime-friendly method of handling completed USB transactions.

Please test if your use case involves:
    - USB webcams
    - USB audio devices where you are recording audio
    - DVB/TV capture devices using an Isochronous transport (which is most of them)
    - A HID device (keyboard/mouse) that previously had problems with missed keypresses or repeating keypresses

This change should reduce the number of dropped packets for Isochronous IN transactions and may also reduce dropped packets for Interrupt IN transactions. If your webcam worked but with subpar performance, this will probably improve performance. If the webcam didn't work in the first place, it is unlikely to fix it.

The change should also improve multiple-access use cases - if you have an Isoc device active while other USB transfers (ethernet, usb HDD) are active for example.

This patch is a bit of a departure from my previous simple bugfixes - it is quite a substantial change that moves USB transaction completion from an IRQ handler to a scheduled task - if anything breaks by this change then please update this thread with the device used and the conditions required to reproduce the breakage.
Posts: 199
Joined: Sun Sep 02, 2012 1:14 pm
by M_P » Sun Mar 24, 2013 9:15 pm
Hello M33P,

I just gave it a try and I already notice a difference. This is the first time I've been able to run a Logitech C270 at full resolution (1280x720) using the Motion package. Up until now, the most I could get was 1184x656 and it wasn't all that reliable.

It's been running for about seven minutes and no messages in the log so far (also an improvement). I'll keep an eye on it and post back with any news.

Thanks for all your work!

**EDIT** - the images are also coming across the wire more smoothly. Before this patch it would be a half-image, then a wait, then the other half... the whole thing is appearing at once now.
Posts: 42
Joined: Sun Jan 06, 2013 5:40 pm
by BerryPicker » Sun Mar 24, 2013 10:18 pm
M33P wrote:A new kernel is available via rpi-update
@MP33 Thank you. With my Philips Webcam SPC 900NC at 320x240 or below there are now no .xsession-errors reported by guvcview, whereas before there were extensive
Code: Select all
Could not grab image (select timeout): Resource temporarily unavailable
Posts: 114
Joined: Tue Oct 16, 2012 3:03 pm
Location: The East of England
by M_P » Mon Mar 25, 2013 12:10 am
I've now set up a second Pi, this one with the same Microsoft LifeCam Cinema that I was playing around with a couple of months ago. I ran a bunch of trials with that setup back in January, the longest the LifeCam ever ran was for 2148 seconds, and that was at a lower resolution (960x544, I believe).

With the new update, the Pi has been running with the LifeCam at 1280x720 for over 5400 seconds now, and there are no USB-related messages in the logs.

The Pi with the C270 camera has been running for 8500 seconds now, also with no problems.

Both are using the Motion package to grab data from the camera.
Posts: 42
Joined: Sun Jan 06, 2013 5:40 pm
by mos6510 » Mon Mar 25, 2013 2:22 am
Wow. An immediate improvement.
I have a hand-full of cheap webcams (0ac8:3420 Z-Star Microelectronics Corp) that I have never been able to run at 640x480 on a Pi.
Today, after upgrading to kernel 3.6.11+ #399, it is running perfectly with motion software.
With the way the developers are headed with bug fixes/work-arounds, eventually we'll all forget that these great little computers ever had USB issues....
To M33P and the other fine people working on USB drivers - a huge "THANKS".
Posts: 8
Joined: Mon Mar 25, 2013 2:09 am
by gordon77 » Mon Mar 25, 2013 12:14 pm
Thanks for your excellent work

Gordon77
Last edited by gordon77 on Sat Mar 30, 2013 6:56 pm, edited 1 time in total.
Posts: 689
Joined: Sun Aug 05, 2012 3:12 pm
by pluggy » Mon Mar 25, 2013 5:44 pm
Possible slight improvement in picture quality on a Sony PS2 Eyetoy, still corrupts the odd frame grabbing stills. My only other working webcam has already been tested (MS VX2000) so I haven't tried it. It doesn't make my non working webcams work, but you said that.
Don't judge Linux by the Pi.......
User avatar
Posts: 2085
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
by M33P » Mon Mar 25, 2013 6:51 pm
pluggy wrote:Possible slight improvement in picture quality on a Sony PS2 Eyetoy, still corrupts the odd frame grabbing stills. My only other working webcam has already been tested (MS VX2000) so I haven't tried it. It doesn't make my non working webcams work, but you said that.


Of the cameras that don't work and never have

- What's the manufacturer/model of the cams?
- What are the USB IDs reported by lsusb?
- What modules are loaded on camera insertion?
Posts: 199
Joined: Sun Sep 02, 2012 1:14 pm
by lingon » Mon Mar 25, 2013 7:47 pm
M33P wrote: Of the cameras that don't work and never have

- What's the manufacturer/model of the cams?
- What are the USB IDs reported by lsusb?
- What modules are loaded on camera insertion?


My Logitech Quickcam Vision Pro has so far been unusable on the Raspberry Pi.
With the upgrade to version
Linux rpicam 3.6.11+ #399 PREEMPT Sun Mar 24 19:22:58 GMT 2013 armv6l GNU/Linux
it is working great! I was able to stream 1600x1200 pixels with 5 frames/s with mjpeg_streamer.
Thank you very much for this great improvement!

Bus 001 Device 005: ID 046d:09a6 Logitech, Inc. QuickCam Vision Pro
It is using the uvcvideo driver.

Here are all modules loaded:
lsmod
Module Size Used by
evdev 9426 1
snd_usb_audio 104097 0
snd_usbmidi_lib 18067 1 snd_usb_audio
snd_hwdep 5929 1 snd_usb_audio
snd_seq_midi 4591 0
snd_seq_midi_event 6544 1 snd_seq_midi
snd_rawmidi 21160 2 snd_usbmidi_lib,snd_seq_midi
uvcvideo 68510 0
videobuf2_vmalloc 2425 1 uvcvideo
videobuf2_memops 2584 1 videobuf2_vmalloc
videobuf2_core 26995 1 uvcvideo
videodev 104342 2 uvcvideo,videobuf2_core
media 13424 2 uvcvideo,videodev
snd_bcm2835 15846 0
snd_pcm 77560 2 snd_bcm2835,snd_usb_audio
snd_page_alloc 5145 1 snd_pcm
snd_seq 53329 2 snd_seq_midi_event,snd_seq_midi
snd_seq_device 6438 3 snd_seq,snd_rawmidi,snd_seq_midi
snd_timer 19998 2 snd_pcm,snd_seq
snd 58447 9 snd_bcm2835,snd_usb_audio,snd_hwdep,snd_timer,snd_pcm,snd_seq,snd_rawmidi,snd_usbmidi_lib,snd_seq_device
8192cu 489429 0
leds_gpio 2235 0
led_class 3562 1 leds_gpio
Posts: 101
Joined: Fri Aug 26, 2011 7:31 am
by M_P » Mon Mar 25, 2013 10:18 pm
Further to my posts yesterday, both the LifeCam Cinema and the C270 are still running. There are no USB, Motion, or camera-related entries in the logs. Everything seems to be working.
Posts: 42
Joined: Sun Jan 06, 2013 5:40 pm