Karbono
Posts: 18
Joined: Mon Oct 01, 2012 7:08 pm

Re: USB - the Elephant in our Room

Wed Oct 03, 2012 1:24 pm

alright, I thought I'd post this here, since it seems related:

I have a RPi running Raspbmc and I connected an old Mustek VCAM-300 webcam via a powered USB hub. I can get screenshots from it using:

Code: Select all

streamer -c /dev/video0 -b 10 -o /home/pi/outfile.jpeg
Thing is, after a couple of times, the device "disappears" and I get these errors:

Code: Select all

v4l2: ioctl(fildes = 3 "/dev/video0 (deleted)", request = VIDIOC_DQBUF, struct v4l2_buffer *data = { index = 0, type = V4L2_BUF_TYPE_VIDEO_CAPTURE, memory = V4L2_MEMORY_MMAP }) failed, No such device (19, ENODEV)
libv4l2: error dequeuing buf: No such device
v4l2: ioctl(fildes = 3 "/dev/video0 (deleted)", request = VIDIOC_DQBUF, struct v4l2_buffer *data = { index = 0, type = V4L2_BUF_TYPE_VIDEO_CAPTURE, memory = V4L2_MEMORY_MMAP }) failed, No such device (19, ENODEV)^C
^C - one moment please
libv4l2: error turning off stream: No such device
ioctl VIDIOC_STREAMOFF: No such device
v4l2: ioctl(fildes = 3 "/dev/video0 (deleted)", request = VIDIOC_REQBUFS, struct v4l2_requestbuffers *data = { count = 0, type = V4L2_BUF_TYPE_VIDEO_CAPTURE, memory = V4L2_MEMORY_MMAP }) failed, Device or resource busy (16, EBUSY) because the video4linux character special device is in use by another process or by the system and this prevents the ioctl VIDIOC_REQBUFS system call from operating
I stop the process with CTRL+C and when I try the command again:

Code: Select all

pi@raspberrypi ~ $ streamer -c /dev/video0 -b 10 -o /home/pi/outfile5.jpeg
files / video: JPEG (JFIF) / audio: none
v4l2: open: open(pathname = "/dev/video0", flags = O_RDWR) failed, No such file or directory (2, ENOENT) because there is no "video0" regular file in the pathname "/dev" directory; did you mean the "video1" usb video4linux character special device instead?
vid-open: failed: libv4l
no grabber device available
I need to reconnect the webcam in order to make it work again.

Here's another example when I execute the command several times in a row:

Code: Select all

pi@raspberrypi ~ $ streamer -b 10 -o /home/pi/outfile5.jpeg
files / video: JPEG (JFIF) / audio: none
pi@raspberrypi ~ $ streamer -b 10 -o /home/pi/outfile5.jpeg
files / video: JPEG (JFIF) / audio: none
libv4l2: error turning on stream: Connection timed out
v4l2: ioctl(fildes = 3 "/dev/video0", request = VIDIOC_STREAMON, int *data = { V4L2_BUF_TYPE_VIDEO_CAPTURE }) failed, Connection timed out (110, ETIMEDOUT)
v4l2: oops: select timeout
v4l2: oops: select timeout
v4l2: oops: select timeout
^C^C - one moment please
I know the messages I get probably don't help, since they're just a consequence of the device getting disconnected.... :(

insanityideas
Posts: 20
Joined: Tue Oct 02, 2012 9:16 pm

Re: Devices that work and don't

Wed Oct 03, 2012 2:19 pm

Itsnothing todo with poly the fuse... the receiver uses way less power than my trusty wired turn of the century optical mouse. At the moment its just an annoyance, as any poject I am likely todo would not require regular keyboard and mouse interaction, ut it does stop hacking about in python or scratchon the thinggggggggggggggg. Ad my oru posts loklike the rabings of a crazy!!!
thradtke wrote: Have you brigded the polyfuses? Maybe the dongle runs on the edge here. Just guessing, of course.

Directly on the Pi's hub, I never had keyboard problems, no matter what I did. Things start getting bad when using a subsequent hub and mixing protocols on it.

User avatar
fbutler
Posts: 302
Joined: Thu Mar 15, 2012 4:09 pm
Location: Surrey, England

Re: USB - the Elephant in our Room

Thu Oct 18, 2012 6:07 am

gsh wrote:
So I do have another fix available (which will improve the latency further) but it may make some problems worse (like talking to a USB1 keyboard with integrated hub)...


What is likely to work and what is less likely...

1) USB2.0 devices work better than 1.0 or 1.1
You can check if a device is USB 2.0 by doing 'lsusb -v' and looking for the device bcdUSB version it will be 2.0 1.1 or 1.0)

2) USB 1.0 devices, don't use an extra USB hub only one USB1 device per port.

3) Bulk and Interrupt work better than isochronous, (this is mostly assumption from the stuff we've got from your reports). I'm assuming that we're getting hit by the occasional terrible interrupt latency and the streaming camera's / audio devices are over-running their fifo's.


Will try to make another bug fix in the next few days ...

Gordon
Hi, Any updates on when the latest fix will be available for testing?

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26660
Joined: Sat Jul 30, 2011 7:41 pm

Re: USB - the Elephant in our Room

Thu Oct 18, 2012 6:37 am

Been very busy at work last week or two, not sure how much Gordon will have managed to get done, so no news at the moment.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

User avatar
fbutler
Posts: 302
Joined: Thu Mar 15, 2012 4:09 pm
Location: Surrey, England

Re: USB - the Elephant in our Room

Thu Oct 18, 2012 7:20 am

jamesh wrote:Been very busy at work last week or two, not sure how much Gordon will have managed to get done, so no news at the moment.
OK, thanks for the update

User avatar
Burngate
Posts: 6303
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: USB - the Elephant in our Room

Thu Oct 18, 2012 11:13 am

jamesh wrote:Been very busy at work last week or two
C'mon! What's more important, earning enough to pay the mortgage and feed the kids, or the Pi?

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

Re: USB - the Elephant in our Room

Thu Oct 18, 2012 11:40 am

Unfortunately I've been unable to create a more credible improvement for the USB issues we currently have. Improvements to latency actually have a detrimetal effect to some types of transport (split transactions) which isn't going to be fixed any time soon.

So instead I've been spending a little time horsing around with the EHCI interface to see if I can create a software implementation of the EHCI host interface for the DWC_OTG hardware, this would solve our problems because then we can push this code onto the VPU which has a very low interrupt latency and interrupt overhead.

But unfortunately it is going to take time and I could probably do with some volunteers to help do the EHCI interface. I'm hoping to get a simple one in place first (that works with most simple transactions) then people can begin helping in the spirit of open software!

Thanks

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

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26660
Joined: Sat Jul 30, 2011 7:41 pm

Re: USB - the Elephant in our Room

Thu Oct 18, 2012 11:51 am

ECHI??
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

thradtke
Posts: 492
Joined: Wed May 16, 2012 5:16 am
Location: Germany / EL

Re: USB - the Elephant in our Room

Thu Oct 18, 2012 12:16 pm

Could anyone summarize where we are now? What works and what doesn't?

Could a new board revision fix the problems?
Rocket Scientist.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26660
Joined: Sat Jul 30, 2011 7:41 pm

Re: USB - the Elephant in our Room

Thu Oct 18, 2012 12:56 pm

thradtke wrote:Could anyone summarize where we are now? What works and what doesn't?

Could a new board revision fix the problems?
Changes to the board (except to change the SoC) would make little difference. Gordon could summarise when he gets time.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

p4trykx
Posts: 127
Joined: Wed Jan 11, 2012 2:55 pm

Re: USB - the Elephant in our Room

Fri Oct 19, 2012 12:29 am

So Model A will have the same issues with USB? I thought that the lan/hub chip was to blame.

User avatar
Lob0426
Posts: 2198
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: USB - the Elephant in our Room

Fri Oct 19, 2012 2:13 am

p4trykx wrote:So Model A will have the same issues with USB? I thought that the lan/hub chip was to blame.
No it apppears the problem is with the USB drivers from the SoC. They are working on it.
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

thradtke
Posts: 492
Joined: Wed May 16, 2012 5:16 am
Location: Germany / EL

Re: USB - the Elephant in our Room

Fri Oct 19, 2012 5:20 am

jamesh wrote:Changes to the board (except to change the SoC) would make little difference.
Maybe Broadcom could *modify* the SoC? I imagine these problems might show up on handhelds also.
Rocket Scientist.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26660
Joined: Sat Jul 30, 2011 7:41 pm

Re: USB - the Elephant in our Room

Fri Oct 19, 2012 8:06 am

thradtke wrote:
jamesh wrote:Changes to the board (except to change the SoC) would make little difference.
Maybe Broadcom could *modify* the SoC? I imagine these problems might show up on handhelds also.
Approximate cost to modify the SoC to use a different USB controller, about $3M? Seriously.

The reason the problem doesn't exhibit on handhelds is that they are generally not USB hosts, which is where the problem arises.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

p4trykx
Posts: 127
Joined: Wed Jan 11, 2012 2:55 pm

Re: USB - the Elephant in our Room

Fri Oct 19, 2012 8:24 am

Is there a possibility to use external USB controller in future models?
It would be a little more expensive but probably less than $3 milion ;-).
I have a router with some Broadcom SoC which uses VIA USB controller and it works with all USB devices.

javatmn
Posts: 6
Joined: Fri Aug 03, 2012 8:14 am

Re: USB - the Elephant in our Room

Fri Oct 19, 2012 1:06 pm

I appreciate the hardwork Gordon and others made on this issue, but knowing there is little hope to fix it is really disappointing :(

Trafalgar
Posts: 72
Joined: Fri May 18, 2012 6:40 pm

Re: USB - the Elephant in our Room

Fri Oct 19, 2012 1:41 pm

jamesh wrote:Disagree with the conclusion on Pt5. The USB system is not broken, but there do appear to be issues for SOME people. It is being looked at (recent software release for the USB interrupts/s issue for example).

The Foundation does pay attention on on stuff like this!
You've got to be joking. My kid has just got one of these bits of rubbish machines. Mouse won't work (it's new), no help, no support and still same nonsense with power cables and power settings, x months later.

Way to put a 10 year old off computing with bad components (the flash memory shipped with the machine didn't work either) and unfathomable geekery and a lack of guidance. :(

I really just want my money back now.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26660
Joined: Sat Jul 30, 2011 7:41 pm

Re: USB - the Elephant in our Room

Fri Oct 19, 2012 1:52 pm

Trafalgar wrote:
jamesh wrote:Disagree with the conclusion on Pt5. The USB system is not broken, but there do appear to be issues for SOME people. It is being looked at (recent software release for the USB interrupts/s issue for example).

The Foundation does pay attention on on stuff like this!
You've got to be joking. My kid has just got one of these bits of rubbish machines. Mouse won't work (it's new), no help, no support and still same nonsense with power cables and power settings, x months later.

Way to put a 10 year old off computing with bad components (the flash memory shipped with the machine didn't work either) and unfathomable geekery and a lack of guidance. :(

I really just want my money back now.
So, the >half a million people who seem to get on fine are lying?

Instead of going off on one, why not ask some questions to try and get the problem sorted? Of course, unfathomable geekery we can't do much about, but we can try and help with some guidance, if you go about it the right way. You have claimed 'no help' and yet this is only your second post - you haven't even asked for help here which is the first point of call, so I'd have to take you to task on that one.

Firstly, what do you mean by the 'flash memory' not working. Was the SD card corrupt in some way, or some other issue? What do you mean by cables and power issues? We haven't had any issues in this area commented on here for some time, so can you give us some idea of where your problem lies in this area.

As to the mouse not working, I presume you have got to the stage of the desktop starting up, and at that point he mouse doesn't work. Does the keyboard work? Does the mouse work in another machine (i.e. is it broken). Is it a wired or a wireless mouse - in afct what sort of mouse is it?

Please give us something to work on...
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

User avatar
RaTTuS
Posts: 10559
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: USB - the Elephant in our Room

Fri Oct 19, 2012 1:53 pm

Trafalgar wrote:
jamesh wrote:Disagree with the conclusion on Pt5. The USB system is not broken, but there do appear to be issues for SOME people. It is being looked at (recent software release for the USB interrupts/s issue for example).

The Foundation does pay attention on on stuff like this!
You've got to be joking. My kid has just got one of these bits of rubbish machines. Mouse won't work (it's new), no help, no support and still same nonsense with power cables and power settings, x months later.

Way to put a 10 year old off computing with bad components (the flash memory shipped with the machine didn't work either) and unfathomable geekery and a lack of guidance. :(

I really just want my money back now.
erm it is more than likely not a usb problem but something else - post in a help thread
ranting hear wont help
if you want cash back then go to the supplier not the usb thread
Last edited by RaTTuS on Fri Oct 19, 2012 1:57 pm, edited 1 time in total.
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26660
Joined: Sat Jul 30, 2011 7:41 pm

Re: USB - the Elephant in our Room

Fri Oct 19, 2012 1:55 pm

javatmn wrote:I appreciate the hardwork Gordon and others made on this issue, but knowing there is little hope to fix it is really disappointing :(
Who said there was little hope? Whilst there are still avenues to explore, there is always hope!
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

thradtke
Posts: 492
Joined: Wed May 16, 2012 5:16 am
Location: Germany / EL

Re: USB - the Elephant in our Room

Fri Oct 19, 2012 1:57 pm

jamesh wrote:Approximate cost to modify the SoC to use a different USB controller, about $3M? Seriously.
That's not much to get a bugfree Pi and an entry to other markets where the USB controller matters, so I'm in good faith we'll see a solution sooner or later :-).
Rocket Scientist.

User avatar
fbutler
Posts: 302
Joined: Thu Mar 15, 2012 4:09 pm
Location: Surrey, England

Re: USB - the Elephant in our Room

Fri Oct 19, 2012 2:29 pm

jamesh wrote:
javatmn wrote:I appreciate the hardwork Gordon and others made on this issue, but knowing there is little hope to fix it is really disappointing :(
Who said there was little hope? Whilst there are still avenues to explore, there is always hope!
Indeed. Gordon's latest update, with the change in approach, makes me more hopeful than ever that a GOOD fix will be found!
gsh wrote:So instead I've been spending a little time horsing around with the EHCI interface to see if I can create a software implementation of the EHCI host interface for the DWC_OTG hardware, this would solve our problems because then we can push this code onto the VPU which has a very low interrupt latency and interrupt overhead.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 26660
Joined: Sat Jul 30, 2011 7:41 pm

Re: USB - the Elephant in our Room

Fri Oct 19, 2012 3:28 pm

thradtke wrote:
jamesh wrote:Approximate cost to modify the SoC to use a different USB controller, about $3M? Seriously.
That's not much to get a bugfree Pi and an entry to other markets where the USB controller matters, so I'm in good faith we'll see a solution sooner or later :-).
$3M spent, on a 3 year old chip when there are much better ways to make money...??? Also, time to do it, about 9-12 months, by which time the chip is even more out of date.

I'm thinking a SW solution..
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

obcd
Posts: 917
Joined: Sun Jul 29, 2012 9:06 pm

Re: USB - the Elephant in our Room

Fri Oct 19, 2012 9:40 pm

And how long will it take for a software solution assuming we have one (maybe 2) person(s) working on it in spare time? :(
Maybe a rev. C Pi will be announced soon with a broadcom soc using another
usb implementation, the same way the 512Mbyte Pi suddenly saw the light?
I understand this has to remain a secret as there is still plenty of rev. B stock that needs to be sold.

rmistero
Posts: 27
Joined: Mon Feb 20, 2012 9:14 pm

Re: USB - the Elephant in our Room

Fri Oct 19, 2012 11:34 pm

Oye !

Like some others my board happens to have problems even without USB devices connected it just the NIC is enough to hang the USB system.. Let's say it comes from a bad batch.. Fair enough.. RMA... 1 in a 1000 Eben says..
But reading this thread I'm really confused about the aim of this board... it aims to be cheap/affordable but then you need to buy expensive class 10 SD card, expensive good PSU, expensive good keyboard... So it is cheap for the foundation, it is not for the poor children... Really good for specialised Electronic shops..

Also, I could read here and there that it was not designed to be used with Wifi adapters or exotic USB adapters like an external HDD.. ( elinux wiki on USB,..), just keyboard and mouse...

The 80's are long time gone..

Anyway, since it seems it was about the children in mind when designed,bla bla bla.. as far as I know, home users use WiFi nowadays. Ok.. It is a computer for "poor" children with a TV (a quite recent/expensive one with a HDMI port) and the TV is 2-10M away from the router modem but that's OK because they are poor so they are supposed to live in small council flats hence no need for WiFi in first place and actually they didn't have Internet.. Same goes with schools.. Everyone knows that schools are rich and can buy 20+ TVs with HDMI ports..

Basically without a steady reliable USB system, this board is useless.. Everyone knows it, especially the "foundation"...

I really like this expression "the Elephant in our Room" . It is perfect, no need to add more, the rest was just bla bla bla and self pity.. Specially this very post.. but it is therapeutic... :p

Return to “Troubleshooting”