kalehrl
Posts: 350
Joined: Tue Jul 24, 2012 10:49 am

Re: USB redux

Mon Mar 25, 2013 10:57 pm

The latest firmware hasn't fixed repeating keys issue.
I'm using Microsoft Comfort keyboard 5000.

M_P
Posts: 51
Joined: Sun Jan 06, 2013 5:40 pm

Re: USB redux

Tue Mar 26, 2013 1:30 am

The Logitech C600 camera wasn't working for me in Motion at all before regardless of resolution.

With the new kernel, it is now successfully capturing at 1280x720.

That's it for the cameras I can easily get my hands on - Microsoft LifeCam Cinema, Logitech C270 and C600. All seem to be working now up to and including full resolution. Thanks again for all the hard work!!! :D

gordon77
Posts: 5276
Joined: Sun Aug 05, 2012 3:12 pm

Re: USB redux

Tue Mar 26, 2013 8:26 am

M_P wrote:The Logitech C600 camera wasn't working for me in Motion at all before regardless of resolution.

With the new kernel, it is now successfully capturing at 1280x720.

That's it for the cameras I can easily get my hands on - Microsoft LifeCam Cinema, Logitech C270 and C600. All seem to be working now up to and including full resolution. Thanks again for all the hard work!!! :D
Could I ask are you using the cameras for video or stills capture ? Or have you tested both ?

Gordon77

gordon77
Posts: 5276
Joined: Sun Aug 05, 2012 3:12 pm

Re: USB redux

Tue Mar 26, 2013 9:07 am

gordon77 wrote:I have tested it on my Microsoft Vx2000 and Philips 740 webcams.

Using pygame.camera functions it doesn't appear to make any improvements. The VX2000 will still only work at 352x288, it maybe a bit smoother than before, but the Philips still produces no pictures.

Some improvement with FSWEBCAM I can get both cameras upto 640x480 but can be intermittent and very slow. I've never had pictures form the Philips before whatever I tried

Thanks for your excellent work

Gordon77
Apologies I think I made a mistake in testing and the Philips didn't produce any pictures, as before.

Gordon77

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: USB redux

Tue Mar 26, 2013 9:55 am

M33P wrote:
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?
One of them is here :

http://www.raspberrypi.org/phpBB3/viewt ... 59#p314159

Another I have to hand is an A4tech cheep'n'nasty IR jobby which is marked 'Model PK-333MB' I've had it years, but its still on their website : http://www.a4tech.com/product.asp?cid=1&scid=1&id=401 . The system requirements betray it's age (166Mhz Pentium ? makes the Pi look quick)

Code: Select all

[  114.172569] usb 1-1.3: new full-speed USB device number 6 using dwc_otg
[  114.276449] usb 1-1.3: New USB device found, idVendor=0ac8, idProduct=305b
[  114.276478] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  114.276493] usb 1-1.3: Product: PC Camera
[  114.276506] usb 1-1.3: Manufacturer: Vimicro Corp.
[  114.307852] gspca_main: gspca_zc3xx-2.14.0 probing 0ac8:305b
[  115.612415] input: gspca_zc3xx as /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/input/input1
[  115.616289] usbcore: registered new interface driver gspca_zc3xx
lsusb reports :

Bus 001 Device 006: ID 0ac8:305b Z-Star Microelectronics Corp. ZC0305 Webcam

Both work fine on a PC with Ubuntu and on a ARM Debian box I have.

Forgive me if I can't be bothered to dig the other 2 or 3 I have out. From memory, at least one of them is the same driver as the A4tech (gspca_zc3xx)
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

shuckle
Posts: 565
Joined: Sun Aug 26, 2012 11:49 am
Location: Finland

Re: USB redux

Tue Mar 26, 2013 11:19 am

Great success with my cheap EX00 web camera:
ID eb1a:2571 eMPIA Technology, Inc. M035 Compact Web Cam

motion worked with 640x480 resolution at 8 fps speed. CPU usage was about 80% (with turbo overclock).
This camera never worked before with high resolution; it worked with low resolution.

I also tested my PS3 web cams and they still worked fine.
But the effect to the PS3 web camera microphone is huge. It was basically unuseable low volume, but now it works nicely.
Unbelievable that this could be achieved only with software fixes. Looks like the USB hardware in Pi is actually fine. :)

Well done!!

M33P
Posts: 199
Joined: Sun Sep 02, 2012 1:14 pm

Re: USB redux

Tue Mar 26, 2013 4:17 pm

pluggy wrote:
One of them is here :

http://www.raspberrypi.org/phpBB3/viewt ... 59#p314159

Another I have to hand is an A4tech cheep'n'nasty IR jobby which is marked 'Model PK-333MB' I've had it years, but its still on their website : http://www.a4tech.com/product.asp?cid=1&scid=1&id=401 . The system requirements betray it's age (166Mhz Pentium ? makes the Pi look quick)

Code: Select all

[  114.172569] usb 1-1.3: new full-speed USB device number 6 using dwc_otg
[  114.276449] usb 1-1.3: New USB device found, idVendor=0ac8, idProduct=305b
[  114.276478] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[  114.276493] usb 1-1.3: Product: PC Camera
[  114.276506] usb 1-1.3: Manufacturer: Vimicro Corp.
[  114.307852] gspca_main: gspca_zc3xx-2.14.0 probing 0ac8:305b
[  115.612415] input: gspca_zc3xx as /devices/platform/bcm2708_usb/usb1/1-1/1-1.3/input/input1
[  115.616289] usbcore: registered new interface driver gspca_zc3xx
lsusb reports :

Bus 001 Device 006: ID 0ac8:305b Z-Star Microelectronics Corp. ZC0305 Webcam

Both work fine on a PC with Ubuntu and on a ARM Debian box I have.

Forgive me if I can't be bothered to dig the other 2 or 3 I have out. From memory, at least one of them is the same driver as the A4tech (gspca_zc3xx)
Oh lovely - gspca devices.

gspca is a mostly-unified driver bundle for webcams from the dark ages - where vendor-specific implementations of USB bridge chips were tied to vendor-specific implementations of sensors, the data returned would usually be vendor-specific huffman coded or jpeg.

For example the zc3xx driver caters for at least 19 separate i2c-attached sensor chips. The are over 5000 lines of chip-specific probing and initialization code, most of them reverse-engineered from flavour-of-the-month drivers for specific "Windows only" webcams.

I have an ancient Creative Webcam Live Pro, long forgotten in the cupboard, that uses the m5603c chipset coupled to a non-standard mt9v011 sensor. Drivers were only ever released for winXP and gspca doesn't support it. With infinite time I could probably get it working, but for all the hassle it's now just easier to get a UVC-based cam (which they now all are - more or less - Logitech I'm looking at you).

Given that your cams work on desktop PCs with Linux it seems odd that they don't work *at all* - perhaps compiling a kernel with gspca debugging enabled would help track down the problem.

That cam listed is also a wierd one - it's a full-speed device. This wouldn't help things at all even if it did work - you would fall foul of the ongoing issues with dropped split transactions unless you ran with dwc_otg.speed=1.

M_P
Posts: 51
Joined: Sun Jan 06, 2013 5:40 pm

Re: USB redux

Tue Mar 26, 2013 10:08 pm

gordon77 wrote:Could I ask are you using the cameras for video or stills capture ? Or have you tested both ?

Gordon77
All of the testing I've done so far has been still captures - I'm using Motion version 3.2.12 and set it to 2fps. I've played with Motion for a couple of years now, and didn't want to test with something that I'd never used before. I'm trying to keep the "I'm inept" factor out of the equation as much as possible. :D

I do have an extra Pi and cameras, though. If you'd like me to try a particular piece of software (and can tell me how to run it), I'd be more than happy to test it.

gordon77
Posts: 5276
Joined: Sun Aug 05, 2012 3:12 pm

Re: USB redux

Tue Mar 26, 2013 10:17 pm

Thanks.

Do you know if you can call motion from within python, ie with a command line, to take a single snapshot ?

Gordon77

M_P
Posts: 51
Joined: Sun Jan 06, 2013 5:40 pm

Re: USB redux

Wed Mar 27, 2013 1:57 am

gordon77 wrote:Thanks.

Do you know if you can call motion from within python, ie with a command line, to take a single snapshot ?

Gordon77
Not nicely. I think you'd need to configure Motion to take a screenshot every minute or hour or something. Start it up, it would take a picture, then you'd have to shut it down again. Not very clean. I'm sure there's something out there much better suited to something like that.

User avatar
SteveDee
Posts: 343
Joined: Thu Dec 29, 2011 2:18 pm
Location: Sunny Southern England
Contact: Website

Re: USB redux

Wed Mar 27, 2013 10:14 am

This looks like a big step in the right direction. I've re-tested my dodgy collection of old webcams (see previous results: http://www.raspberrypi.org/phpBB3/viewt ... ux#p313785)

Results with new kernel (...#399) attached.

Observations:-
Its a great result for my webcam using the uvcvideo driver.
cpu% seems to have increased in most cases.
Mouse movement is no longer causing video breakup, but may be delaying video.
Still no joy with the gspca drivers.

Just a note that all these dreadful webcams work fine on Lubuntu.

I'd be (very) happy to do some testing with my Empia based EzCap, if some kind person has a properly compiled em28xx driver that they can let me have.

Good job guys! (I've spoken to Liz and she has agreed to give you the weekend off.... just make sure you are back at your desks Tuesday morning).

Have a great Easter break.
Attachments
2013-03-27_56.png
2013-03-27_56.png (41.58 KiB) Viewed 9291 times

User avatar
pluggy
Posts: 3635
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: USB redux

Wed Mar 27, 2013 10:36 am

M33P wrote: Given that your cams work on desktop PCs with Linux it seems odd that they don't work *at all* - perhaps compiling a kernel with gspca debugging enabled would help track down the problem.
The creative one produces pictures like my earlier post, mangled blotches of colour basically. The A4 tech produces small pictures with washed out colour for a few seconds and then crashes. This is what the A4tech produces when hooked up to a device comparible to the Pi, my hacked
Seagate Dockstar. ARM processor, Debian. 128 MB of RAM. Hardly wonderful but useable.

Image

I'm not going to worry about it, the camera module will do what I want when it comes out and the picture quality is stunning from the few pictures I've seen.
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

kalehrl
Posts: 350
Joined: Tue Jul 24, 2012 10:49 am

Re: USB redux

Wed Mar 27, 2013 2:56 pm

One would have thought that fixing repeating keyboard presses is more important than adding support for cameras and such addons but obviously that is not the case!

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1608
Joined: Sat Sep 10, 2011 11:43 am

Re: USB redux

Wed Mar 27, 2013 3:02 pm

That is not correct, I've been working for three months on this and we're close, but this fix was much easier!

Gordon
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

MaxK1
Posts: 1043
Joined: Sun Aug 26, 2012 11:34 pm

Re: USB redux

Wed Mar 27, 2013 3:04 pm

Are you _SURE_ your keyboard problem isn't caused by your power supply? Plenty of keyboard issues solved
by replacing a deficient "charger"...
You are in a maze of twisty little passages, all alike.
When General Failure and Major Disaster get together, Private Parts usually suffers.

kalehrl
Posts: 350
Joined: Tue Jul 24, 2012 10:49 am

Re: USB redux

Wed Mar 27, 2013 3:09 pm

No it's not because I use a powered hub.
The keyboard works fine with

Code: Select all

dwc_otg.speed=1
ugly workaround so it's definitely usb driver issue.

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1608
Joined: Sat Sep 10, 2011 11:43 am

Re: USB redux

Wed Mar 27, 2013 3:15 pm

I have a driver that will work perfectly with your keyboard, unfortunately it breaks a couple of other things at the moment...

Gordon
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

User avatar
scrishton
Posts: 49
Joined: Mon May 07, 2012 8:48 pm
Location: Settle, in the Yorkshire Dales
Contact: Website

Re: USB redux

Wed Mar 27, 2013 3:43 pm

Hi Gordon.

Which bits does it break? I'm trying to get keyboard, ContourShuttleXpress device and FTDI RS422 adapters to play well together, and have had them working together sometimes on a Model A. Latest few updates from rpi-update have broken it though, such that the keyboard stops responding. I can roll back to an old version and get it to work reliably without the Shuttle Xpress, so I have a good workable system when I need it, but it would be good to get the whole thing working. Can I try your 'work in progress' version and see if it works for my device?

Simon R.

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5663
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: USB redux

Wed Mar 27, 2013 3:51 pm

scrishton wrote:Which bits does it break? I'm trying to get keyboard, ContourShuttleXpress device and FTDI RS422 adapters to play well together, and have had them working together sometimes on a Model A. Latest few updates from rpi-update have broken it though, such that the keyboard stops responding. I can roll back to an old version and get it to work reliably without the Shuttle Xpress, so I have a good workable system when I need it, but it would be good to get the whole thing working. Can I try your 'work in progress' version and see if it works for my device?
Identifying the exact kernel that broke it would make fixing it more likely.

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1608
Joined: Sat Sep 10, 2011 11:43 am

Re: USB redux

Wed Mar 27, 2013 4:00 pm

Dom,

I was saying that the FIQ fix currently breaks the stty -F thing...

But I should be able to sort that out soon...

Gordon
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

M33P
Posts: 199
Joined: Sun Sep 02, 2012 1:14 pm

Re: USB redux

Wed Mar 27, 2013 8:55 pm

scrishton wrote:Hi Gordon.

Which bits does it break? I'm trying to get keyboard, ContourShuttleXpress device and FTDI RS422 adapters to play well together, and have had them working together sometimes on a Model A. Latest few updates from rpi-update have broken it though, such that the keyboard stops responding. I can roll back to an old version and get it to work reliably without the Shuttle Xpress, so I have a good workable system when I need it, but it would be good to get the whole thing working. Can I try your 'work in progress' version and see if it works for my device?

Simon R.
Are you accessing the FTDI devices with a program that keeps the serial ports "open"? Does a recent kernel work with the keyboard if you unplug one or more of the FTDI devices?

vmsda
Posts: 32
Joined: Tue Mar 12, 2013 5:02 pm

Re: USB redux

Thu Mar 28, 2013 11:35 am

In the "Graphics, sound and multimedia" forum I have complained about occasional crackling noises in the reproduction of CD-quality music files, and the absolute impossibility of servicing 96khz/24bit music downloads. "azeam" has kindly informed me that "This is a known issue and there are several threads about this. It is caused by a USB bug that is being worked on. The current workaround is to limit the USB to 1.1 by adding dwc_otg.speed=1 to /boot/cmdline.txt". Since the workaround does not in fact solve anything, I have been resigned to waiting for the solution to the aforementioned "known issue". I think I have solved the crackling issue by coding nrpacks=10 in /etc/modprobe.d options for usb_snd_audio. But the problem of high-rez music downloads has not bugdged half an inch.

Interestingly, I have been alerted - in the previous post - that USB issues can be addressed in original ways: "I'd be happy to send you a significant quantity of chocolate if it could help get my USB problems fixed. :) " ! So as not to be outperformed, I want to add my weight to those sweet ways by volunteering to send another significant quantity of chocolate to the same address :lol:.
Samsung 900X, Ubuntu 12.04 host, VirtualBox, Windows 7 guest.
Raspberry Pi running 2013-02-09-wheezy-raspbian.img; Edimax EW-7811Un 802.11b/g/n adapter; Plugable USB2.0 4-port Hub.

chriglu
Posts: 27
Joined: Thu Mar 28, 2013 10:17 pm

Re: USB redux

Thu Mar 28, 2013 10:24 pm

Hello

I'm running motion with two logitech webcams and have some errors. I just updated to the latest kernel and it seems that the most are gone by now. Thanks for that :-)

But one or both webcams die after some minutes/seconds with this message:

Code: Select all

Mar 28 23:13:22 earlybirdpi kernel: [  565.758648] uvcvideo: Non-zero status (-5) in video completion handler.
Mar 28 23:13:22 earlybirdpi motion: [2] Video device fatal error - Closing video device
Mar 28 23:13:22 earlybirdpi motion: [2] Closing video device /dev/video1
Mar 28 23:15:21 earlybirdpi motion: [2] Video signal lost - Adding grey image
Mar 28 23:17:16 earlybirdpi kernel: [  799.829951] uvcvideo: Non-zero status (-5) in video completion handler.
Mar 28 23:17:22 earlybirdpi motion: [1] Video device fatal error - Closing video device
Mar 28 23:17:22 earlybirdpi motion: [1] Closing video device /dev/video0

Code: Select all

Bus 001 Device 006: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
Bus 001 Device 007: ID 046d:081b Logitech, Inc. Webcam C310
Bus 001 Device 008: ID 046d:0991 Logitech, Inc. QuickCam Pro for Notebooks
Any Ideas? I'm using motion with two threads and v4l2_palette 2 (MJPEG).
Thanks in advance, i hope to get this thing running for my birdcam :-)

Oh and let me know if you need further information!

M_P
Posts: 51
Joined: Sun Jan 06, 2013 5:40 pm

Re: USB redux

Fri Mar 29, 2013 3:51 am

Hello chriglu,

Can you remove one camera and test with a single thread to see if it your cameras work individually?

Does your USB hub have its own power supply?

User avatar
SteveDee
Posts: 343
Joined: Thu Dec 29, 2011 2:18 pm
Location: Sunny Southern England
Contact: Website

Re: USB redux

Fri Mar 29, 2013 8:15 am

chriglu wrote:Hello

I'm running motion with two logitech webcams and have some errors...
I'm surprised they run even for a short time. I've never been able to get 2 webcams to run on Linux with a single USB controller. My understanding is that each cam is allocated/consumes over half the bandwidth (see: http://www.lavrsen.dk/foswiki/bin/view/Motion).

But maybe that's not the case with mjpeg....have you tried this config on a Linux pc through a single USB controller?

Be sure to let us know if you do get it working on a Pi.

Return to “Troubleshooting”