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

Re: USB packet loss.

Wed Sep 12, 2012 2:04 pm

If there would be place were all users could post their findings of a specific usb device, you would have a good idea if something wil likely work or not. It could contain the steps needed to get some stuff working as well. so, if I have keyboard x or intend to buy it, I can check other users review about the product. If 9/10 state it doesn't work, I have no reason to complain it doesn't. It would even show if the minor issues really are minor.

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

Re: USB packet loss.

Wed Sep 12, 2012 2:06 pm

I've never said I have seen the same problem on a model A

I've seen the problem with a Model A and an external 9512... That's the same as a model B...

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

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

Re: USB packet loss.

Wed Sep 12, 2012 2:15 pm

obcd wrote:If there would be place were all users could post their findings of a specific usb device, you would have a good idea if something wil likely work or not. It could contain the steps needed to get some stuff working as well. so, if I have keyboard x or intend to buy it, I can check other users review about the product. If 9/10 state it doesn't work, I have no reason to complain it doesn't. It would even show if the minor issues really are minor.
Well, that would be the Wiki, which anyone can edit as appropriate. There is already a list of compatible stuff there, but I don't know how accurate it is. The community is the best place to maintain that sort of information.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

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

Re: USB packet loss.

Wed Sep 12, 2012 2:22 pm

MaxK1 wrote:[...] I don't think the foundation is to blame for arch/raspbian/riscos/whatever not working the way some people seem to think it should.
I understand it's a problem with the firmware, and neither one with the Linux/RISC OS etc. distribution nor one with the hardware.
Rocket Scientist.

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

Re: USB packet loss.

Wed Sep 12, 2012 2:28 pm

It's likely a combination of a number of issues - the driver software (which incidentally is supplied by Synopsis, the people who designed the USB HW, but that Broadcom people are debugging) will likely need to be modified (as has already happened hence the improvements seen so far) to get round idiosyncrasies in the HW design, and of course any existing bugs in the driver itself. There are also possible issues with the speed of the CPU and Linux's ability to service interrupts fast enough (and not stall for too long at any time), which will require some good debugging and re-coding - perhaps in areas unrelated to the USB driver itself.

It's a difficult task, but good progress has already been made.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

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

Re: USB packet loss.

Wed Sep 12, 2012 2:48 pm

So, has it ever been tested with a model A without hub? It would limit the usb devices to just 1. You could connect a wireless keyboard/mouse dongle and check if the missing/stuck key issue still exists.

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

Re: USB packet loss.

Wed Sep 12, 2012 2:58 pm

There are not many Model A's about at the moment, but the driver runs on the USB on the SoC, so likely the same problem will exist on the Model A as well.

Note, that I was experiencing the sticky keys/missing keys last night. Changed power sourse and it all started working properly. I think that issue is not related to the driver problems, but is *almost* always power related.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

User avatar
Montala
Posts: 675
Joined: Mon Mar 05, 2012 11:54 pm
Location: Herefordshire (U.K.)

Re: USB packet loss.

Wed Sep 12, 2012 3:15 pm

jamesh wrote:Note, that I was experiencing the sticky keys/missing keys last night. Changed power sourse and it all started working properly. I think that issue is not related to the driver problems, but is *almost* always power related.
I agree James, and as you mentioned earlier although the wiki does contain lists of compatible PSU's and powered hubs, a lot of this information was entered in the 'early days', when users weren't perhaps quite so 'demanding' as they are now.

As I have said before, it is a shame we do not have a list of professionally tested devices, so that new (an old) users could purchase a PSU in the knowledge that it was an approved regulated model which which not immediately 'fry' their Pi, or possibly even itself, or deliver insufficient or unstable voltage under load conditions.

Someone just saying 'that particular model works OK for me', is not really enough, without knowing a lot more facts about the device in question and exactly how it has been tested.

It is also a little unfortunate perhaps that some of the ancillary products being sold by your two main distributors, do not always meet the expected standards, although I do appreciate that this is not under the Foundation's control although you could always (if you haven't done so already) strongly recommend certain PSU's and possibly powered hubs also, which may well go a long way to resolving many of the problems being discussed in this, and other threads.

milhouse
Posts: 641
Joined: Mon Jan 16, 2012 12:59 pm

Re: USB packet loss.

Wed Sep 12, 2012 3:30 pm

jamesh wrote: Note, that I was experiencing the sticky keys/missing keys last night. Changed power sourse and it all started working properly. I think that issue is not related to the driver problems, but is *almost* always power related.
I get those with a 2Amp HP Touchpad charger - I guess I'm not suffering from power issues, or rebooting your device (while you changed power source) fixed your problem, as it's often intermittent! :)

Regarding the openness of the Foundation, I did find the introduction of the v2 hardware somewhat disappointing. Perhaps if the Foundation had been a little more open and accepting of the hardware faults (even acknowledging them, for a start) then the v2 board would not have been released with potentially sub-optimal changes, ie. leaving in 0.5 ohm resistors in place of the USB fuses would have been better than removing the fuses entirely. There was no real dialogue between the Foundation and the community regarding the hardware faults and how to resolve them, just an awful lot of discussion solely within the community. Then bam! A new hardware release out of nowhere which still has potential USB hardware issues (hot plugging etc.).

On the software front, though, the Foundation does seem a little more open, which is at least something.

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

Re: USB packet loss.

Wed Sep 12, 2012 3:39 pm

HW changes are very difficult to get right with regards to timing - read up on the Osbourne Effect. Even the Rev 2 was announced earlier than it should have been - ie before the channels were empty of rev1's.

Note that I think many if not all the HW changes of the Rev2 were discussed and designed around before the community came up with possible solutions. We do pay attention to what said here and elsewhere so as soon as issues arise, people are thinking about fixing them
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

milhouse
Posts: 641
Joined: Mon Jan 16, 2012 12:59 pm

Re: USB packet loss.

Wed Sep 12, 2012 3:50 pm

jamesh wrote: Note that I think many if not all the HW changes of the Rev2 were discussed and designed around before the community came up with possible solutions. We do pay attention to what said here and elsewhere so as soon as issues arise, people are thinking about fixing them
But there is precious little - if any - dialogue, that's my point, and which runs counter to the claim of "openness". I appreciate you can't reveal new revisions ahead of time, but not engaging with the community is what lead to the USB hardware fix in v2 being not perhaps the best it could have been.

If, for instance, the Foundation had entered into dialogue with the community stating that removing the fuses might be the best solution (months ago, when the Foundation probably already had that fix in mind for v2) then the community would have tested the proposed fix and responded that no, leaving in a bit of resistance is an even better solution. No need to give dates or even talk about v2, just talk about fixes for the v1 board, which could be tested with early feedback before committing to production of the v2. Not always possible I grant you, but it was in this particular case.

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

Re: USB packet loss.

Wed Sep 12, 2012 3:59 pm

milhouse wrote: If, for instance, the Foundation had entered into dialogue with the community stating that removing the fuses might be the best solution (months ago, when the Foundation probably already had that fix in mind for v2) then the community would have tested the proposed fix and responded that no, leaving in a bit of resistance is an even better solution. No need to give dates or even talk about v2, just talk about fixes for the v1 board, which could be tested with early feedback before committing to production of the v2. Not always possible I grant you, but it was in this particular case.
you are damned it you do and damned it you don't

people would whine whine that V2 is not out NOW as they NEED it now because the e-ponies are wanting it

when you make one change , there is no way you can test that on a production board over all conditions you are likely to find it out there.


in software
release often , release early works
in hardware
that is not the way to go
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

milhouse
Posts: 641
Joined: Mon Jan 16, 2012 12:59 pm

Re: USB packet loss.

Wed Sep 12, 2012 4:05 pm

RaTTuS wrote: in hardware
that is not the way to go
Perhaps not always, but in this particular instance discussion of some of the hardware changes could have been handled better, and more openly. The Foundation prides itself on being open, but here I think they under achieved and missed an opportunity to implement the correct fix - I'll just leave it at that. :)

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

Re: USB packet loss.

Wed Sep 12, 2012 4:32 pm

milhouse wrote:
RaTTuS wrote: in hardware
that is not the way to go
Perhaps not always, but in this particular instance discussion of some of the hardware changes could have been handled better, and more openly. The Foundation prides itself on being open, but here I think they under achieved and missed an opportunity to implement the correct fix - I'll just leave it at that. :)
Respectfully, one needs only look at the post count of the people affliated with the RPF or even within this thread to see that the assertion that the RPF does things without getting feedback is simply not true.

Also you're referring to the "correct fix" as you deem "correctness". Looking at the USB current boost fix thread, it's clear that there is a lack of consensus even among the users what the absolute correct fix is. The RPF has chosen what they deem as the best option available at the time based off their own professional knowledge and the feedback provided on these forums. Calling it the wrong fix before it even gets out in the wild where wide ranging field testing can be done is a bit like seeing your favorite (American) football couch setting up for a running play and getting mad that they aren't doing a passing play before the ball is ever hiked ;-)
Dear forum: Play nice ;-)

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

Re: USB packet loss.

Wed Sep 12, 2012 4:36 pm

milhouse wrote:
RaTTuS wrote: in hardware
that is not the way to go
Perhaps not always, but in this particular instance discussion of some of the hardware changes could have been handled better, and more openly. The Foundation prides itself on being open, but here I think they under achieved and missed an opportunity to implement the correct fix - I'll just leave it at that. :)
I won't. You are wrong. Openness or not will NOT make the fixing of the USB driver go any faster. The rev2 board has all the required HW mods needed (at our current knowledge state) - it's all software from now on. Discussion of other HW changes would not have made any difference to the rev2 in other respects either - just read the 'I want this on rev2 ' threads to see why.

The driver problem *could* have been be fixed on the rev1 board (I think Gordon uses a rev1 to debug it!)- the community hasn't been of much help there, and that's not surprising - it's complex stuff and they don't have access to the RTL that people at Broadcom/Synopsys do. Previous community efforts on other devices using same IP have also been unsuccessful (apparently)

Just out of interest, what do you think an open discussion on Rev2 HW revisions would have helped with?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

milhouse
Posts: 641
Joined: Mon Jan 16, 2012 12:59 pm

Re: USB packet loss.

Wed Sep 12, 2012 5:00 pm

jamesh wrote: I won't. You are wrong. Openness or not will NOT make the fixing of the USB driver go any faster.
I'm not actually suggesting it would - my point related to the hardware (not software) changes for the v2 that were made with very little open discussion.
jamesh wrote: Just out of interest, what do you think an open discussion on Rev2 HW revisions would have helped with?
Replacing the fuses with 0 ohm links seems to fix a lot of USB problems, but replacing them with very low resistance seems to resolve remaining issues, such as hot plugging no longer causing reboots. My point is that, assuming the low resistance links are the optimal solution, this may have been identified/discussed/tested earlier "in the field" via the community if there had been appropriate discussion/dialogue suggesting that the removal of the fuses is the long term solution. That particular discussion just seems like an opportunity missed if the Foundation already intended to remove those fuses.

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

Re: USB packet loss.

Wed Sep 12, 2012 5:37 pm

milhouse wrote:Replacing the fuses with 0 ohm links seems to fix a lot of USB problems, but replacing them with very low resistance seems to resolve remaining issues, such as hot plugging no longer causing reboots. My point is that, assuming the low resistance links are the optimal solution, this may have been identified/discussed/tested earlier "in the field" via the community if there had been appropriate discussion/dialogue suggesting that the removal of the fuses is the long term solution. That particular discussion just seems like an opportunity missed if the Foundation already intended to remove those fuses.
I agree that a small resistor is a better solution. But we didn't miss that due to a lack of openness. Both myself and Gert had posted photos of boards we has modded to short out the polyfuses long before that was discovered.
The problem was that by the time the first report of the small resistor fixing the reset problem was posted, the rev2 PCB had already been laid out.
It's unfortunate that it takes a number of weeks from making a decision to improve something, to that improvement to get delivered. There's always a danger a better solution will show up during that time.

The Pi was only designed to work with single current devices, and there's no evidence of a reset problem with those. If you have a higher current device, you will have more joy with a rev2 board than a rev1 board.

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

Re: USB packet loss.

Wed Sep 12, 2012 6:04 pm

Just to be contentious, for me the rev 2 board is a backward step 8-)

I've removed the usb fuses and provided an alternative power loop. I could do that with the 0 ohms as well.
But I can't do it on Rev 2 :evil:

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

Re: USB packet loss.

Wed Sep 12, 2012 7:27 pm

Just out of curiosity, what specific devices cause reboot when hot-plugging? I would expect the voltage glitch to be strictly a function of the capacitance ratios (cap on Pi +5V rail, vs cap on USB device). Is the glitch a microsecond or millisecond-timescale? Are the problem USB devices known to be USB-compliant (max 10 uF capacitance)? With what power supplies feeding the Pi? (needless to say if the power supply is marginal to start with, even a tiny dip from hotplug surge current will cross the threshold). Is there a separate thread(s) devoted to this subject (?)

milhouse
Posts: 641
Joined: Mon Jan 16, 2012 12:59 pm

Re: USB packet loss.

Wed Sep 12, 2012 7:32 pm

jbeale wrote:Is there a separate thread(s) devoted to this subject (?)
http://www.raspberrypi.org/phpBB3/viewt ... =63&t=8591

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

Re: USB packet loss.

Wed Sep 12, 2012 8:03 pm

So you think the usb devices aren't compliant and the capacitors on the supply are 2 big?
What about the usb supply decoupling capacitors on the pi? Yes, they can't be wrong since they don't exist.
It's like the guy driving on the wrong way of the highway hearing on the radio someone is driving in the wrong direction.
One, he is thinking, they are all driving in the wrong direction here.
That's what we keep hearing with the Pi. All our usb devices that won't work are crap...
Openness or not will NOT make the fixing of the USB driver go any faster.
Does the foundation think the same about the software and the way it's worked at?
Every request for more information about it is simply ignored.
So , where is the discussion that shorting the polyfuses or replacing them with low ohmic resistors is an improvement? And why does it still voids the warranty, even when it's properly done?
If the keyboard issues are only caused by crappy power supplies, wouldn't it be possible in the lab to connect it to an adjustable lab supply and see how it reacts upon 0.2V more or less?
There aren't many A boards out, but removing the usb hub/lan chip shouldn't be that difficult for companies with the right equipment?
When Gordon was working on the 8000 int/sec issue, how many posts have we seen about the progress beween 12 august and beginning september when the fix was added to the kernel by dom? You call that openness? Isn't the correct term mushroom policy?

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

Re: USB packet loss.

Wed Sep 12, 2012 8:10 pm

obcd wrote:So you think the usb devices aren't compliant and the capacitors on the supply are 2 big?
What about the usb supply decoupling capacitors on the pi? Yes, they can't be wrong since they don't exist.
It's like the guy driving on the wrong way of the highway hearing on the radio someone is driving in the wrong direction.
One, he is thinking, they are all driving in the wrong direction here.
That's what we keep hearing with the Pi. All our usb devices that won't work are crap...
Openness or not will NOT make the fixing of the USB driver go any faster.
Does the foundation think the same about the software and the way it's worked at?
Every request for more information about it is simply ignored.
So , where is the discussion that shorting the polyfuses or replacing them with low ohmic resistors is an improvement? And why does it still voids the warranty, even when it's properly done?
If the keyboard issues are only caused by crappy power supplies, wouldn't it be possible in the lab to connect it to an adjustable lab supply and see how it reacts upon 0.2V more or less?
There aren't many A boards out, but removing the usb hub/lan chip shouldn't be that difficult for companies with the right equipment?
When Gordon was working on the 8000 int/sec issue, how many posts have we seen about the progress beween 12 august and beginning september when the fix was added to the kernel by dom? You call that openness? Isn't the correct term mushroom policy?
Why are you still going on about this? Nobody is saying your USB devices are crap if they don't work (although some hubs have pretty bad designs, and some devices probably assume the machine they are plugged in to can handle ridiculous amounts of traffic because they are 2GHz desktops, which the Pi patently isn't). We are saying there are problem with the USB driver, and they are being worked on. Not sure how many times or ways I can keep saying that! What more information do you want? You already get possible fixes as soon as they are developed, to help with testing. It not like the community efforts in the past have got anywhere with this problem, and since the RTL cannot be released the community doesn't have the advantage that Broadcom have on debugging it.

Please stop going on about this - it's wasting your time and everyone else's repeating the same old same old.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I think it’s wrong that only one company makes the game Monopoly.” – Steven Wright

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

Re: USB packet loss.

Wed Sep 12, 2012 8:41 pm

Please stop going on about this - it's wasting your time and everyone else's repeating the same old same old.
You are right, but since all we can do is wait....
What more information do you want?
If the problem is the hub dropping the packets, than why does it still occur on the model A Pi?
And what about the FTDI or prolific devices sending those huge number of NAK's?
Isn't an usb microframe 125 uS? So, why do we get NAK's every 16 - 20 uS?
This for instance hasn't been answered.
Gordon denies he was also seeing dropped packets on the model A
You assume as it's using the same RTL and driver, it likely wil have the issues as well.
You are right again. It's a waste of time.

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

Re: USB packet loss.

Wed Sep 12, 2012 8:52 pm

Just to make it clear , the USB packet loss (with USB1.0 and USB1.1 devices) does NOT occur with the model A...

I ran a test before leaving work today running Yocupuce's test and it is still running now (it normally failed after a few seconds on the original stack)

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

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

Re: USB packet loss.

Wed Sep 12, 2012 9:04 pm

Thanks for clearing that up.
Another thing I was wondering. Is it possible to force an usb device to enumerate at usb 1.1 instead of usb 2.0 (I have trouble with the high speed and full speed terms (which is which..))I was thinking about ftdi and prolific adapters. They don't need the usb 2.0 speed and might behave better at usb 1.1 speed?
You can force the whole bus to become usb 1.1, but that isn't very interesting for the other devices that could benefit from the usb 2.0 speed. It might help to figure out if they indeed behave better.

Return to “Troubleshooting”