El_Presidente
Posts: 36
Joined: Tue Apr 03, 2012 7:02 am
Location: Bolton, UK

Re: USB - the Elephant in our Room

Wed Aug 08, 2012 5:18 pm

Jim JKla wrote:Please stop throwing your toys out of the pram. We have work to do....
Well put +1
-----------------------------------------------------------------------------------------
Never trust a man, who when left alone with a tea cosey, doesn't try it on.

User avatar
jbeale
Posts: 3641
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: USB - the Elephant in our Room

Wed Aug 08, 2012 5:27 pm

gsh wrote:I've had a little while to understand what is going wrong with the USB and traced it back to a problem with poor interrupt latency in the kernel. This is causing the split transactions to be delayed beyond a 1ms frame which in turn means that the hub is dropping the packets it stores.
Thanks for this post, I am glad to hear of some progress being made. I look forward to further updates!

In hopes it may be useful to someone, just wanted to reference an observation in another thread: http://www.raspberrypi.org/phpBB3/viewt ... 28&t=13858
It appears that two different models of 10-port USB hub both fail to work on the R-Pi (although the specific error messages in dmesg are different). They are both internally two separate USB devices, a 7 port hub and from that is chained a 4-port hub; the first 6 ports of the 10-port hub work, but the the secondary hub and its attached 4 upper ports do not work. Separately, I found that I could not daisy-chain together two 4-port hubs. It's not a configuration I ever tried before, or one that I currently need, but it is interesting to know and this may shed light on other issues. At least one type of seven-port hub (which I gather is not internally a composite device) does work.

gritz
Posts: 449
Joined: Sat Jan 28, 2012 2:33 am

Re: USB - the Elephant in our Room

Wed Aug 08, 2012 5:31 pm

Jim JKla wrote:*rant*
I wouldn't push the Sinclair analogy too hard.

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

Re: USB - the Elephant in our Room

Wed Aug 08, 2012 5:41 pm

(Soto voce) I wish I knew enough about USB to help
(Out loud) Anyone know of a simple intro to USB?

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

Re: USB - the Elephant in our Room

Wed Aug 08, 2012 5:44 pm

sulge wrote:Once again:
But now you know about USB driver problems and still do not inform!

This is not "improvements" the drivers has many bugs this is not only RPi problems, but each which use this driver.

Even Linux experts think that this is not a trivial issue! So please inform potential buyers!!!!
How? Big banner on the front page? Blog posting?

For the majority of users it all works pretty well. Just like any Linux PC.
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
Montala
Posts: 675
Joined: Mon Mar 05, 2012 11:54 pm
Location: Herefordshire (U.K.)

Re: USB - the Elephant in our Room

Wed Aug 08, 2012 5:45 pm

jbeale wrote: In hopes it may be useful to someone, just wanted to reference an observation in another thread: http://www.raspberrypi.org/phpBB3/viewt ... 28&t=13858
It appears that two different models of 10-port USB hub both fail to work on the R-Pi (although the specific error messages in dmesg are different). They are both internally two separate USB devices, a 7 port hub and from that is chained a 4-port hub; the first 6 ports of the 10-port hub work, but the the secondary hub and its attached 4 upper ports do not work. Separately, I found that I could not daisy-chain together two 4-port hubs. It's not a configuration I ever tried before, or one that I currently need, but it is interesting to know and this may shed light on other issues. At least one type of seven-port hub (which I gather is not internally a composite device) does work.
As I mentioned in an earlier post, some so called 7 port hubs are actually comprised of two 4 port hubs 'daisy-chained' together internally, and are recognised as such.

I too was wondering if this sort of thing could be behind some of the problems which users are experiencing.

User avatar
abishur
Posts: 4477
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
Contact: Website

Re: USB - the Elephant in our Room

Wed Aug 08, 2012 6:26 pm

I think the elephant is turning into a dead horse, let's all get our clubs out.

On the serial issue... I find it someone bemusing that such a big deal is being made about this. I mean I have problems finding a laptop that includes a single native Serial device, largely due to the fact that serial is an every increasingly archaic architecture. One might as well be upset that you can't connect 5 PS/2 devices or 5 AT devices! I'm certainly not trying to dismiss your complaint, but I do think you're blowing things way out of proportion. Side note: Have you tried using only 4 usb->serial devices and using the GPIO serial interface for the 5th serial device?
Dear forum: Play nice ;-)

paulie
Posts: 275
Joined: Thu Jan 19, 2012 6:51 pm

Re: USB - the Elephant in our Room

Wed Aug 08, 2012 6:31 pm

I'm quite happy with the progress made, & don't think that USB is a big issue: i have an ASDA wireless keyboard/mouse which works out of the
box, and a poundshop 4-port hub: I cut power to pi & fed power to hub from shack psu. Asus N10 works with raspbian .

An analogy: ferries work all around the world with no problems : occasionally one gets overloaded way beyond its official capacity and sinks. Is this the responsibility of the designer, or the ferry captain ?
Let's all be reasonable and keep things in proportion.
It has been my custom to use Xeyes

User avatar
jackokring
Posts: 816
Joined: Tue Jul 31, 2012 8:27 am
Location: London, UK
Contact: ICQ

Re: USB - the Elephant in our Room

Wed Aug 08, 2012 6:42 pm

I intend to get an apparently non working 13 port powered hub, I as assume it has a 4 as a (4 4 4 1) extension via 3 more internal hubs. On the list equipment is a matter of time,an only happens when people go off list, and develop the system. The USB protocol does not have to provide more mA than that provided, as "negotiate to get more, does not mean more is provided at the end of the negotiation.", and low power design should be encouraged as a teaching and efficiency skill.

I want an X server plugin for using a USB 4 way, 6 button joypad as a mouse, but the experimental Pi, may allow me to have it, when the development board has been programmed to be.

Cheers Jacko
Pi[NFA]=B256R0USB CL4SD8GB Raspbian Stock.
Pi[Work]=A+256 CL4SD8GB Raspbian Stock.
My favourite constant 1.65056745028

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

Re: USB - the Elephant in our Room

Wed Aug 08, 2012 7:39 pm

A 13 port powered hub. Wow, that would basically need a 6 - 7 Amp power supply.
Is there actually a limit upon the maximum number of usb devices that can be connected with hubs on one usb port? They all have to share the same bandwith if I remember well.
Most x86 pc's have multiple host controllers, and normally every host only feeds a 2 port root hub.

sulge
Posts: 21
Joined: Tue Aug 07, 2012 4:08 pm

Re: USB - the Elephant in our Room

Wed Aug 08, 2012 7:47 pm

paulie wrote:An analogy: ferries work all around the world with no problems : occasionally one gets overloaded way beyond its official capacity and sinks. Is this the responsibility of the designer, or the ferry captain ?
Oh my Goodness this is not problem with overload! It is problem with driver! Linux kernel specialists says that without specification there will be very hard to correct this driver or write new one.
jamesh wrote: How? Big banner on the front page? Blog posting?
Here: http://www.raspberrypi.org/ it is good place.
jamesh wrote:For the majority of users it all works pretty well. Just like any Linux PC.
So you think that there is no need to formally inform users?
I bought a new power supply and two active hubs because I found the information on this forum that this may be the cause. Since there was no official information about this issue.

I am a programmer and for me it's normal that customers complain if something does not work. In my team, when a client reports a problem, we do our best to correct it as soon as possible. And we inform the client about progress. I think it is a professional approach....
Last edited by sulge on Wed Aug 08, 2012 8:11 pm, edited 1 time in total.

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

Re: USB - the Elephant in our Room

Wed Aug 08, 2012 8:03 pm

sulge wrote:
paulie wrote:An analogy: ferries work all around the world with no problems : occasionally one gets overloaded way beyond its official capacity and sinks. Is this the responsibility of the designer, or the ferry captain ?
Oh my Goodness this is not problem with overload! It is problem with driver! Linux kernel specialists says that without specification there will be very hard to correct this driver or write new one.
Now, I'm not saying the driver is a paragon of software elegance, it isn't. It's also a third party driver, not produced by the Foundation or Broadcom, which makes getting hold of the specs somewhat difficult, and fixing it also somewhat difficult.

And yet there has already been significant progress made to improve things.....
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.

rspitz
Posts: 58
Joined: Tue Jul 31, 2012 7:25 pm

Re: USB - the Elephant in our Room

Wed Aug 08, 2012 8:13 pm

It's quite interesting to observe how thin-skinned some people react when one dares criticize their present favorite toy. And anyone claiming that there is no problem with the USB implementation on the RPi is simply in denial. Just see Liz's post where she "tasked" gsh with researching the issue.

I don't think I was expecting too much from the RPi when I thougt it should handle something my old NSLU2 with much less RAM and processor power has been doing for years. I had to learn that it is not ready yet for that kind of thing, but that's acceptable for me and I'm grateful that volunteers are dedicating their time and skills to resolve that issue.

However, I will not be told to shut up or ridiculed by some [self-censored for politeness] in this forum.

I now return to my regularly scheduled tinkering with the RPi and various peripherals, trying to find that one combination that miraculously works ;)

pygmy_giant
Posts: 1562
Joined: Sun Mar 04, 2012 12:49 am

Re: USB - the Elephant in our Room

Wed Aug 08, 2012 8:24 pm

Well, the USB on my windows PC sometimes goes peculiar - certain devices work in certain sockets and others in others and sometimes I have to unplug and re-plug them in to get them noticed.

I dont think I'm clever enough to understand the problem, but I've heard other people say that more hardware info from Broadcom would help.

If this is the case then improving the Pi's performance would surely be good PR for them with minimal loss of IP - I dont think the SOC in the Pi is quite Area 51 level super top-secret bleeding edge technology - is it?
Last edited by pygmy_giant on Wed Aug 08, 2012 8:25 pm, edited 1 time in total.

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

Re: USB - the Elephant in our Room

Wed Aug 08, 2012 8:24 pm

You misunderstand - there are problems with the USB that appear under certain circusmtances - this is a known issue, and things are being done to sort it out. No-ones denying it.
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.

pygmy_giant
Posts: 1562
Joined: Sun Mar 04, 2012 12:49 am

Re: USB - the Elephant in our Room

Wed Aug 08, 2012 8:29 pm

cross posting - I think jamesh is talking to rspitz? Anyway, I'll just be patient - thanks again to those working behind the scenes to iron things out...

PaulCheffus
Posts: 381
Joined: Tue May 29, 2012 2:51 pm
Location: Lincolnshire UK

Re: USB - the Elephant in our Room

Wed Aug 08, 2012 8:31 pm

sulge wrote: I am a programmer and for me it's normal that customers complain if something does not work. In my team, when a client reports a problem, we do our best to correct it as soon as possible. And we inform the client about progress. I think it is a professional approach....
Hi

Yes and you get paid to do this just like I do. The people working on this are volunteers and are not being paid.

See the difference?

Cheers

Paul
Procrastination - The Thief of Time.

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

Re: USB - the Elephant in our Room

Wed Aug 08, 2012 8:33 pm

It's a problem with the driver producing to much interrupts and the interrupt latency becoming 2 high. The more usb devices you have on your Pi, the more devices that need to be serviced. The Pi cpu it's purpose is normally small tablets and smartphones. That are not the kind of devices that people would connect with multiple usb devices. The Pi is not a full featured high performance personal computer. It's difficult to place it's position on the market. If I create an embedded system with a microcontroller and I wan't to give it ethernet connectivity, I have to connect a module that costs like 60 euro. If I wan't to give it wireless connectivity, I have to either connect a 120 euro module or I have to connect it's ethernet connection to a 45 euro router modified to act as a wireless client.
In case of the Pi, I only need a 10 euro usb wifi stick. I have a number of package I can try out for free.
I have free development tools, and pretty much everything is open source. I can think of a zillion things I can design with it, but replacing my desktop pc is not one of them.
I can understand that people are dissapointed. The demo's where very impressive.
It runs xbmc in hd and it can run quake 3 in full hd At xx frames/sec..and
you can connect pretty much any device trough it's usb ports..
And, as berry on the Pi, you have to wait 3 months for it because the demand is giant.
It is like it is now. If we are patient, it will likely become better.
If you can't wait or if it doesn't furfill your expectations, than you better sell it. I am sure you will not loose much on the deal.
A wise guy once said: If something sounds to good to be true, it usually is.
It's a bit like that with the Pi. It is a new and innovative product, and at introduction it had a giant wow factor. Complaining about it won't change the way it is.
As explained, it's a cheap alternative for a lot of things.
I do believe that people considering buying one now have all the information they need to decide for themself if it is what they are looking for.
It got me into learning linux, something my desktop pc couldn't do. So, as a learning device, it succeeded cum laude.

sulge
Posts: 21
Joined: Tue Aug 07, 2012 4:08 pm

Re: USB - the Elephant in our Room

Wed Aug 08, 2012 8:49 pm

PaulCheffus wrote: Hi

Yes and you get paid to do this just like I do. The people working on this are volunteers and are not being paid.

See the difference?

Cheers

Paul
obcd wrote:I do believe that people considering buying one now have all the information they need to decide for themself if it is what they are looking for.
Well, but why there is no official information at http://www.raspberrypi.org. Many of the users do not look in the forum. So people do not have all the information they need....

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

Re: USB - the Elephant in our Room

Wed Aug 08, 2012 8:59 pm

sulge wrote: Well, but why there is no official information at http://www.raspberrypi.org. Many of the users do not look in the forum. So people do not have all the information they need....
What would you regard as 'official' information and where would you put it? That *some* USB peripherals don't work as you might expect/at all because of a driver problem currently being sorted out? Do you see that on Microsoft's website? Or Canonical's? Or Apples?
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.

sulge
Posts: 21
Joined: Tue Aug 07, 2012 4:08 pm

Re: USB - the Elephant in our Room

Wed Aug 08, 2012 9:06 pm

jamesh wrote:
sulge wrote: Well, but why there is no official information at http://www.raspberrypi.org. Many of the users do not look in the forum. So people do not have all the information they need....
What would you regard as 'official' information and where would you put it? That *some* USB peripherals don't work as you might expect/at all because of a driver problem currently being sorted out? Do you see that on Microsoft's website? Or Canonical's? Or Apples?
Here http://www.raspberrypi.org.

The Microsoft has http://support.microsoft.com !
Canonical and Apple: I do not use their products so I do not know.

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

Re: USB - the Elephant in our Room

Wed Aug 08, 2012 9:12 pm

sulge wrote:
jamesh wrote:
sulge wrote: Well, but why there is no official information at http://www.raspberrypi.org. Many of the users do not look in the forum. So people do not have all the information they need....
What would you regard as 'official' information and where would you put it? That *some* USB peripherals don't work as you might expect/at all because of a driver problem currently being sorted out? Do you see that on Microsoft's website? Or Canonical's? Or Apples?
Here http://www.raspberrypi.org.

The Microsoft has http://support.microsoft.com !
Canonical and Apple: I do not use their products so I do not know.
Sorry I don't see anything on that page that says that the Primefilm1800U Film scanner doesn't work on windows 7.

Do you see the problem? You just given me a link to a home page. That page contains no information that some USB peripherals will not work. So where is it on the site? You need to search. Just like you need to search here for any information. In addition, MS are a multi billion dollar company, with 10's of thousands of employees. The Raspi Foundation has one part time employee, who is non-technical.
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.

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

Re: USB - the Elephant in our Room

Wed Aug 08, 2012 9:14 pm

A bit more information...

So currently I'm not convinced that there is a bug in the USB driver at all, the main problem is that the linux interrupt latency is in general terrible! Currently I'm seeing interrupts not being serviced for up to 1ms! Because of this we're dropping split transactions which is making any low or full speed transactions fail.

I've been trying to understand better what the worst case is in latency terms but the only tools available in linux just make the latency quite significantly worse and don't seem to find the problems I'm trying to diagnose!

Also note that there is a deficiency in the driver which means we're limited currently to a maximum of 8 periodic endpoints, this is because the driver reserves a channel (of which there are eight) for each periodic endpoint. Now I believe that for each hub port you have at least one interrupt endpoint so once you get to seven hub ports then you run out of channels!

If you want to have a look at what endpoints you have just do:

lsusb -v

This will output quite a bit of information about each of the devices on the usb host and what endpoints each one has. Once you add up one interrupt endpoint for mouse, keyboard, hub, ethernet you've already used five of the eight channels (we may even reserve a channel for the root hub)... I'd be interested in seeing how many periodic endpoints (interrupt or isochronous) people have working before they find problems...

Anyway, that problem is one for another day!

As a final note to those complaining about lack of work on this stuff and lack of support / documentation from Broadcom (of which I'm a full time employee), all the work I've been doing needs absolutely none of Synopsys' documentation for the OTG module, its useful to understand how it works, but I've learnt most of that from the code rather than their documentation.

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

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

Re: USB - the Elephant in our Room

Wed Aug 08, 2012 9:17 pm

I think a sticky post on this forum or on wiki would be enough. I unnecessarily bought a second hub and a webcam from the 'working' list that does not work :(

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

Re: USB - the Elephant in our Room

Wed Aug 08, 2012 9:21 pm

Might be worth getting in touch with Greg K-H (you may be already, kernel developer) - he's pretty good on USB and latency stuff from what I hear!
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.

Return to “Troubleshooting”