87 Replies Latest reply on Aug 27, 2012 6:02 AM by jamodio

    USB discussions getting a bit heated

      On the other forum, discussions of USB and networking problems have been

      getting a bit heated recently, with one user, Sulge, banned yesterday by abishur

      for a 1-week cooling off period.  Maybe we will see him here soon.

       

      http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=12097&start=177

      http://www.raspberrypi.org/phpBB3/viewtopic.php?f=24&t=14151

      http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=5249

       

      Some of the USB issues are being blamed on Linux latency, which

      doesn't sound easy to fix.

        • Re: USB discussions getting a bit heated
          John Beetem

          From what I've read, it seems that the fundamental problem is that the BCM2835 SoC has a bare-bones USB host controller which requres a lot of the ARM processor.  Such a USB host controller works fine in BCM2835 intended applications, such as Roku, but if you try to use the ARM11 as a high-performance GNU/Linux engine talking to dozens of USB devices you will run into limitations.  It also sounds like documentation for the SoC's USB host controller is not available and that the low-level "open source" software suffers from "security through obscure code".  If this is indeed the case, it will be hard to improve things.

           

          Please let me know if my impressions are incorrect.  I would be delighted to hear that open documentation for the USB host controller is available (link?) and that the low-level driver is perfectly understandable and well-documented (link?).

            • Re: USB discussions getting a bit heated

              Apparently the documentation for the USB controller isn't even available

              to Broadcom, and they are apparently trying to figure out how it works by

              reading the code for the driver.

              • Re: USB discussions getting a bit heated
                morgaine

                John Beetem wrote:

                 

                From what I've read, it seems that the fundamental problem is that the BCM2835 SoC has a bare-bones USB host controller which requres a lot of the ARM processor.  Such a USB host controller works fine in BCM2835 intended applications, such as Roku, but if you try to use the ARM11 as a high-performance GNU/Linux engine talking to dozens of USB devices you will run into limitations.  It also sounds like documentation for the SoC's USB host controller is not available and that the low-level "open source" software suffers from "security through obscure code".  If this is indeed the case, it will be hard to improve things.

                 

                This is EXACTLY the same conclusion that I have reached.

                 

                The Pi is in reality not a general purpose computer.  It's half a computer, with the ARM being used to fill in the hardware gaps that let the SoC be designed at the lowest possible cost.  If you try to use the ARM at the same time for normal computing, you can kiss your SoC's correct functioning goodbye.

                 

                It's this that is wreaking havoc when you attach a correctly-working self-powered hub with added devices downstream.  Linux accepts it, because it doesn't realize what the purpose of the ARM is within the BCM2835.  In reality it should say "Sorry Dave, I don't have the CPU headroom for that" and refuse to attach.

                 

                Morgaine.

                  • Re: USB discussions getting a bit heated

                    it should say "Sorry Dave, I don't have the CPU headroom for that" and refuse to attach.

                    LOL...  but does sound work well enough for it to sing the song ?

                     

                    • Re: USB discussions getting a bit heated
                      John Beetem

                      Morgaine Dinova wrote:

                       

                      The Pi is in reality not a general purpose computer.  It's half a computer, with the ARM being used to fill in the hardware gaps that let the SoC be designed at the lowest possible cost.  If you try to use the ARM at the same time for normal computing, you can kiss your SoC's correct functioning goodbye.

                      The BCM2835 is a powerful media processor with a cheap ARM11 hanging off the side as an I/O processor to take care of housekeeping tasks like USB.  We're allowed to use the housekeeping processor for pretty much anything we want, and it's a pretty nice little GNU/Linux processor.  It's sure a lot more powerful than the PDP-11/45 I first used for Unix   We have limited access to the media processor, i.e., we've been given a book of spells and we're allowed to invoke those spells but have no idea what magic makes the spells work.

                       

                      RasPi does meet its requirements for being a good platform for learning about programming.  Kudos.  RasPi is cheap enough that you can play without worrying about breaking the family PC, and it's a very responsive platform for compiling and running reasonably sized programs.  It can also be a nice little platform for some embedded projects, such as the Pi in the Sky.

                       

                      I like to compare RasPi to a supercomputer.  It has a powerful supercomputing engine, but we're only allowed free access to the I/O processor.  It's disappointing for people who see that RasPi could so easily be so much more if they would just release documentation, but sometimes life is like that.  There are plenty of alternatives for people who want a more open system.

                        • Re: USB discussions getting a bit heated
                          morgaine

                          John Beetem wrote:

                           

                          We're allowed to use the housekeeping processor for pretty much anything we want, and it's a pretty nice little GNU/Linux processor.

                           

                          We're allowed to use it, sure.  The trouble is that when we do start to use it, the SoC's housekeeping is compromised and perfectly normal computer operations (like receiving USB events) start failing.

                           

                          The ARM core is working perfectly, but that's not the whole computer.  Add in the I/O systems and it is no longer working perfectly.

                          • Re: USB discussions getting a bit heated
                            e82492184

                            John Beetem wrote:

                            RasPi does meet its requirements for being a good platform for learning about programming.  Kudos.  RasPi is cheap enough that you can play without worrying about breaking the family PC, and it's a very responsive platform for compiling and running reasonably sized programs.  It can also be a nice little platform for some embedded projects, such as the Pi in the Sky.

                            If everything worked as it should, it would be ideal for everything you mentioned. However if one can't rely on it to function reliably, then instead of worrying about breaking the PC, one has to worry about having the right setup to get the Pi to work.

                             

                            Morgaine wrote:

                             

                            It should be pointed out that this isn't a case of the community being over-demanding, and the complaints aren't coming from people intent on destructive stress testing.  They come from ordinary users who are expecting (shock horror!) that when they attach a common USB device and it is recognized by an available driver, that it should then work.

                             

                            +1

                      • Re: USB discussions getting a bit heated

                        One possible problem is an interaction with something in the SD card code that uses a long timeout causing USB packets to be lost https://github.com/raspberrypi/linux/pull/72 but again, those fixes haven't been pulled yet, so even if that's the major fix very few people will be running it.

                         

                        Either way, the synopsis OTG controller seems to have a lot of problems, but also a lot of users.  There were some rumblings a while back that the mainline kernel folks were looking at writing a better driver. That'll take time though and would likely be written against whatever the then 'current' kernel is, not the already out of date 3.1.x. There's a lot of churn in mainline arm right now with devicetree and such like, so forward or back porting stuff really isn't simple..

                        • Re: USB discussions getting a bit heated
                          e82492184

                          Those threads are terrible They downplay most of the problems people have encountered and add confusion.

                           

                          But it's a timebomb waiting to go off...

                          I guess user Kernel sums it up pretty nicely http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=12097&start=197

                           

                           

                          Frankly even though the Foundation people are not making profit on Raspi, I think it doesn't make them any less responsible for the quality of the device they designed and have been (indirectly) selling.

                           

                          Regardless of the cause (software, power, design) of Pi's problems, they are frustrating to deal with and are likely to cause many to lose interest at some point (even children, or perhaps especially them).

                           

                            • Re: USB discussions getting a bit heated

                              Those threads are terrible They downplay most of the problems people have encountered and add confusion.

                              Thing is, the issues are complex. A lot of the confusion is being caused by people who mostly don't have a grasp of either the hardware or software problems.  Lets face it, with a usb IP block that nobody seems to have much information about, we're all in the dark and what makes it tick may as well be black magic

                               

                              Still, at this point the Pi really is a development board - there's lots of development happening and various people working on fixing issues. Unfortunately due to all the hype there's lots of them landing in the hands of people who are used to a device that's been in development for years with budgets in the billions and expect everything to 'just work' instantly, instead they have a device that was designed to a strict budget with all the compromises that entails. This was bound to cause some friction.

                               

                              I suspect the RPF was very much unprepared for the amount of destructive stress testing a couple of hundred thousand users can do in such a short time with devices that were never thought of during the design.

                                • Re: USB discussions getting a bit heated
                                  morgaine

                                  selsinork wrote:

                                   

                                  I suspect the RPF was very much unprepared for the amount of destructive stress testing a couple of hundred thousand users can do in such a short time with devices that were never thought of during the design.

                                   

                                  I think everyone would agree that the Foundation was unprepared.  The Pi doesn't work properly even with very common devices and very unambitious setups that work on all other systems tested.

                                   

                                  It should be pointed out that this isn't a case of the community being over-demanding, and the complaints aren't coming from people intent on destructive stress testing.  They come from ordinary users who are expecting (shock horror!) that when they attach a common USB device and it is recognized by an available driver, that it should then work.

                                   

                                  Morgaine.

                                    • Re: USB discussions getting a bit heated

                                      It should be pointed out that this isn't a case of the community being over-demanding, and the complaints aren't coming from people intent on destructive stress testing.  They come from ordinary users who are expecting (shock horror!) that when they attach a common USB device and it is recognized by an available driver, that it should then work.

                                      and as any decent engineer knows, best way to test your device is to put it into the hands of those ordinary users.. Agreed that they're not deliberately going to do destructive stress testing, but often that's the result as they'll think of things to do with it and ways to use it that you didn't think of and never designed it to cope with.  Most stuff indended for consumer hands would go through many iterations of that before a general release. The Pi didn't, it has some issues. Surprise !

                                       

                                      over-demanding ?  expecting random, even if common, untested devices to work ?  IMHO maybe some people are expecting too much, it's easy enough to find a common usb device where the manufacturer provides zero linux/mac support as he designed it for windows and there's either no community linux driver or a very poor one. Funnily enough those are usually usb wifi adaptors (or synopsis usb otg controllers)

                                       

                                      I think it would be interesting to see what would happen if all the Pi were recalled, to be replaced with an OlinuXino or Beagleboard. Would either of them fare differently in the hands of 300K+ ordinary users ?  I'm sure the issues would be different, but equally sure that someone would be complaining about something.

                                       

                                      Hopefully if there ever is a Pi-v2.0 some lessons will have been learned from this time round on all sides. Not holding my breath on that one

                                        • Re: USB discussions getting a bit heated
                                          morgaine

                                          selsinork wrote:

                                           

                                          over-demanding ?  expecting random, even if common, untested devices to work ?

                                           

                                          Yes, fully expected to work, if they're class-compliant USB devices.  That's why we have standards in this business, so that you don't have to test each device individually with each different brand of computer.

                                            • Re: USB discussions getting a bit heated
                                              morgaine

                                              It's experiences such as I've just described in a new thread about RF mice used with self-powered hubs that provide a perfect example of the Pi being a complete dog rather than a properly behaving computer.

                                               

                                              This is so far from normal in the industry that engineers who aren't affected by the "Pi aura" must be staring in disbelief at what is going on here.  Any normal product exhibiting these faults would be withdrawn immediately from sale and existing units recalled, because it's pretty close to being a non-working product.

                                               

                                              And yes, it is a PRODUCT, not a prototype --- people are paying for it, and therefore it is a commercial product by definition.  What's more, the BIS defined it as a consumer product in the UK when they explained why it required certification.

                                               

                                              Of course the Pi hype won't permit normal engineering practice to be followed, because there would be too much egg on people's faces and too many plans spoiled.  It's too late, we will have to live with it.  But that doesn't mean that as engineers we should pretend that all is well or as expected.  It's not.  The Pi is faulty.

                                               

                                              Morgaine.

                                              • Re: USB discussions getting a bit heated

                                                Yes, fully expected to work, if they're class-compliant USB devices.  That's why we have standards in this business, so that you don't have to test each device individually with each different brand of computer.

                                                There's an implicit assumption in there that the Pi is class-compliant or is following the standards. At this point, I'm not convinced that's a realistic expectation   It may end up that the Synopsis usb core in host mode just isn't ever going to work properly with linux. Nothing can be done about what's in the silicon today, regardess of what we think of the result, too late for that.  All we could ever hope for is that a Pi v2.0 uses something better. Either that or ditch the Pi and move to a different board altogether.

                                                • Re: USB discussions getting a bit heated

                                                  Yes, fully expected to work, if they're class-compliant USB devices.

                                                  Morgaine, you raise an interesting side issue here. How do I know my device or host is actually compliant ? 

                                                   

                                                  Looking at http://www.usb.org/developers/compliance/ we can find some details of the various certification and compliance requirements. But I'm struggling to find any device that actually has the logo on it. Almost everything has the CE, FCC and equivalent logos, but I don't appear to own a single usb device that shows any of the usb compliance logos and like most people I have lots of usb things. The integrators list is closed, so I can't exactly look it up and even if it was open I likely couldn't lookup RPF or Broadcom, I'd need to know the exact detail of whatever Synopsis IP core was used.

                                                   

                                                  So other than an assumption on my part that something with a plug that looks somewhat like a usb one will work, there's no simple way for me to know it's tested, is compliant, won't kill the thing I plug it into or burst into flames. (ok, CE probably ought to say it won't burst into flames, but same issue, how do I verify it actually meets whatever CE requirement ?)

                                                   

                                                  IMHO, just because things mostly work doesn't mean you can expect them to work or that they're guaranteed to work. Even with the logo there's no guarantee, but it would at least give an indication they should generally be compliant with the standard and therefore they ought to interoperate.

                                                  However as your other thread on the Dynamode hub that has all the certified logos shows even the logos presence probably isn't good enough.

                                                    • Re: USB discussions getting a bit heated
                                                      John Beetem

                                                      selsinork wrote:

                                                       

                                                      So other than an assumption on my part that something with a plug that looks somewhat like a usb one will work, there's no simple way for me to know it's tested, is compliant, won't kill the thing I plug it into or burst into flames. (ok, CE probably ought to say it won't burst into flames, but same issue, how do I verify it actually meets whatever CE requirement ?)

                                                      Let's just hope that CE doesn't stand for caveat emptor

                                                       

                                                      Unfortunately, there doesn't seem to be any policing of compliance.  The actual manufacturers are often no-name entities in far-away places with no reputation to protect, so there's nothing to prevent them from trying to cut every corner they can get away with.  I ran into this last year when I was trying to get cheap HDMI cables to work with my BeagleBoard.  It turned out that the cable makers didn't bother to hook up the individual ground/shield lines in the HDMI connectors, relying instead on the outer shell and a common foil shield to do the job.  This works as long as the cable is short and HDMI shields at both ends are connected to circuit ground, so few people will notice that it's out of compilance.  The manufacturer saves a penny, and if they get caught nobody gets punished.

                                                       

                                                      It's generally difficult or impossible to tell whether actual products bought these days are in compliance.  A lot of the time it doesn't matter because you don't use the product in a way that exposes the problem.

                                                      • Re: USB discussions getting a bit heated
                                                        morgaine

                                                        Oh, it's much simpler than locating certification registrations or believing certification marks (which as we've seen, sometimes lie).  For those of us in the open source world there is an excellent pragmatic answer to your question:

                                                         

                                                        A class-compliant USB device is one that works with open source drivers for that class, ie. requires no device-specific drivers.

                                                         

                                                        None of my USB hubs, RF or wired mice, nor keyboards require device-specific drivers.  They use only the standard Linux drivers for their respective classes, and hence they are class-compliant as far as Linux is concerned.  This is obviously not an O/S-independent answer, but since only Linux is relevant in the current context, it is a sufficient one.

                                                         

                                                        PS.  This is  true even in the Microsoft world.  Unfortunately I don't hold onto old packaging, but I've bought several devices that proclaimed something like "Class-compliant, requires no additional drivers" -- I look for that specifically, since it usually implies perfect operation in Linux out of the box.

                                                         

                                                        Morgaine.

                                                          • Re: USB discussions getting a bit heated
                                                            A class-compliant USB device is one that works with open source drivers for that class, ie. requires no device-specific drivers.

                                                            and when the open source driver is 'fixed' and your device stops working ?

                                                             

                                                            I understand where you're coming from and the pragmatic answer is a good one. Reality doesn't always want to play ball.. 

                                                             

                                                            So we have open source keyboard/mouse/whatever drivers that are known to work, but you have problems when you plug your device into the Pi - must be the device since it fails to work with the open source class driver    Ok, so I'm definetly playing devils advocate here, but as engineers I'm sure we realise it's never as simple as we'd like.

                                                              • Re: USB discussions getting a bit heated
                                                                morgaine

                                                                selsinork wrote:

                                                                 

                                                                So we have open source keyboard/mouse/whatever drivers that are known to work, but you have problems when you plug your device into the Pi - must be the device since it fails to work with the open source class driver    Ok, so I'm definetly playing devils advocate here, but as engineers I'm sure we realise it's never as simple as we'd like.

                                                                 

                                                                Not so fast, cowboy.

                                                                 

                                                                When a device is pragmatically class-compliant when used with 500 trillion other Linux machines, but doesn't work with the open source driver for the class in Pi, then it's not reasonable to claim that the device is not class-compliant.  It may indeed be so, but it's not the leading candidate for an explanation, particularly when multiple devices exhibit the same behavior.

                                                                  • Re: USB discussions getting a bit heated

                                                                    Not so fast, cowboy.

                                                                    hehe..

                                                                     

                                                                    When a device is pragmatically class-compliant when used with 500 trillion other Linux machines

                                                                    however those 500 trillion other systems don't all share the same usb host controller, so not necessarily a valid comparison. It does help us narrow down the scope of the difference though.

                                                                    It may indeed be so, but it's not the leading candidate for an explanation, particularly when multiple devices exhibit the same behavior.

                                                                    Sure, but as we dig into some detail it gets harder to pin the tail on the donkey.  Lacking any certification audit trail we can't completely rule out everything else being broken, unlikely as it may be. So we assume the device is ok and the class driver is ok. We're still left with the low level driver, the IP core itself, or the Pi power design. We have some ability to modify the Pi power design, and the low level driver but don't know if a silicon issue could be compensated for in either of those ways.

                                                                    Time may provide a solution, would certainly be disappointing if it didn't, and a software fix would be the best outcome..

                                                                      • Re: USB discussions getting a bit heated
                                                                        morgaine

                                                                        selsinork wrote:

                                                                         

                                                                        Time may provide a solution, would certainly be disappointing if it didn't, and a software fix would be the best outcome..

                                                                         

                                                                        A software fix is quite likely to be able to resolve the problem, no matter how broken the controller core, just by working within its limitations.  In the same way that USB drivers reserve bandwidth for audio channels for example (and reject connections which they know cannot work), a driver that understands the controller's limits could allow only such devices that can work together to connect.

                                                                         

                                                                        This could limit the choices, but we would at least have a 100% working platform within well defined constraints, and that is crucial.  Flakey operation has no place in USB.

                                                                         

                                                                        Morgaine.

                                                              • Re: USB discussions getting a bit heated
                                                                dharr19

                                                                Hi Morgaine,

                                                                 

                                                                You seem good at explaining things to non-engineer types.  My question to you is this.  I attached an Abe Bluetooth dongle directly to my Pi.  On the dongle there are to light diodes (I think) one turns and stays red the other green and it flashes during data transmissions.  During bootup I saw that the system did pick up the bluetooth and the generic bluetooth driver was loaded.  So is it possible that a system can pick up a device that is connected to its usb ports but not have enough to power it?  Or is it possible for the bluetooth to be broken but still be recognized. I ask this because no lights appeared at all and given the conversation regarding usb ports ...

                                                                 

                                                                Cheers

                                                                David

                                                                  • Re: USB discussions getting a bit heated
                                                                    morgaine

                                                                    @David: I'll try to answer.

                                                                     

                                                                    All of the fault scenarios that you mention are feasible as a combination of Pi power constraints, Pi USB faults, and ARM driver non-working.  I don't know whether your particular Bluetooth dongle is known to work with ARM using class-compliant drivers, but let's assume that it does otherwise there is little point in further analysis.

                                                                     

                                                                    (Eg. if it only works with a binary x86 driver blob then obviously there is no chance of it working on ARM, and if it is not class-complaint and hence requires its own bespoke Linux driver which hasn't yet been ported to ARM then again, there is little a non-developer can do.  Therefore let's assume that it works with ARM, so we're just trying to get an ARM-capable device to work with Pi.)

                                                                     

                                                                    Your first question can be answered even without any testing:

                                                                     

                                                                    David Harrison wrote:

                                                                     

                                                                    During bootup I saw that the system did pick up the bluetooth and the generic bluetooth driver was loaded.  So is it possible that a system can pick up a device that is connected to its usb ports but not have enough to power it?

                                                                     

                                                                    Yes, it is possible, because before a USB Bluetooth dongle transmits RF, it will attempt to get connected into the USB device chain.  That involves only the USB interface circuitry on the dongle and not its RF circuits, which would normally be quiescent at this stage and hence not consuming much power.  (Significantly more power is consumed by the dongle when it transmits Bluetooth RF than when it is not transmitting.)  So, the dongle could in principle need only a little current during the connect phase, well within the Pi's capabilities, but then later require in excess of the Pi's power limits when transmitting.

                                                                     

                                                                    USB has a way of dealing with this "I need more current" situation because it is quite common.  Host ports are required to be able to deliver an initial unit of current, and then additional units are negotiated between the USB host and the power-hungry device.  Unfortunately I don't think we know exactly how this negotiation works on Pi, because although the LAN9512 chip contains a hub and is (presumably) USB-compliant, that hub is not self-powered but takes power from the Pi board under SoC control, which has some idiosyncracies.

                                                                     

                                                                    The Pi has polyfuses with high on-resistances in series with its USB power lines, so the current available to devices that request more is limited by the voltage dropping as more current is provided, until eventually the voltage drops below USB spec or the polyfuse trips and pretty much turns it off altogether.  What's more, we have no idea whether the Pi's highly broken USB driver understands that there are polyfuses in those lines and hence that it cannot just offer additional units up to the USB maximum if it does grant such requests.  Even if it does or could, the wide variation in polyfuses on-resistance would make this very hit-or-miss.  I hope that is not happening.

                                                                     

                                                                    The best we can hope for is that the Pi's driver has been set up to refuse to grant additional units of current above 100mA.  We could then have the situation that a Bluetooth dongle gets enough power from the USB port to allow the Pi's USB driver to enumerate it and to commence the power negotiation.  The extra power request would then be rejected, and if the dongle has the smarts to recognize the rejection, then the dongle's RF transmitters would never be enabled.  The device would be inoperative as you hypothesized, but recognized as a USB device.

                                                                     

                                                                    I hope that answers your first question and explains the reasoning behind the answer.

                                                                     

                                                                    To get some more info on what actually happens within Pi we would have to read the USB driver source to see whether it handles power negotiation and whether requests are granted or rejected, and we'd have to look for messages that would be logged if a power request were refused.  You would then have to look for such refusal messages in your error messages log.

                                                                     

                                                                    Your second question (separate from the power question) isn't easy to answer in any detail:

                                                                    Or is it possible for the bluetooth to be broken but still be recognized. I ask this because no lights appeared at all and given the conversation regarding usb ports ...

                                                                     

                                                                    Because the USB interface circuitry is generally separate from the rest of a device, that is certainly possible in principle.  However, assuming that we're talking about class-compliant devices that are known to work on ARM, I would think that it's unlikely for the non-USB part of the device to be totally inoperative on Pi unless it's caused by the generally broken state of Pi's USB system.  It's very hard to say.

                                                                     

                                                                    Morgaine.

                                                                      • Re: USB discussions getting a bit heated
                                                                        dharr19

                                                                        Thank you so much for all your help

                                                                         

                                                                        Cheers

                                                                        David

                                                                        • Re: USB discussions getting a bit heated
                                                                          pegwag

                                                                          ah ha Morgaine!  We may be "clueless" and walking around in the dark - - - but we sure know how to find someone with a light

                                                                           

                                                                          great explanation to @David.

                                                                          Best

                                                                          peg

                                                                            • Re: USB discussions getting a bit heated
                                                                              morgaine

                                                                              Funny comment, Peg, but I hope the references to 'clueless' weren't misunderstood.

                                                                               

                                                                              The 'clueless' aren't those who don't know --- the more you know, the more you realize that you don't know, so not knowing is not the defining property.  It's only those who don't wish to know and don't wish to think, or cannot think.

                                                                               

                                                                              Walking around in the dark is what we all do, but the desire for illumination is what takes us to the nearby planets today, and one day to the stars.  Civilization is all about riding on the shoulders of those who went before, so if you know how to find someone with a light then you're helping to carry that torch forward and build that pyramid of knowledge and capability.

                                                                               

                                                                              Welcome to the dark.  But as you said so well, we sure know how to find someone with a light.

                                                                               

                                                                              Morgaine.

                                                                                • Re: USB discussions getting a bit heated
                                                                                  jamodio

                                                                                  Let me clarify the context related to my "clueless" comment.

                                                                                   

                                                                                  I have no issue or problems with people that don't have a clue and are asking the right questions and in a proper manner. I've been clueless and I'm clueless in many many things and we all at sometime are "newbies." That's not the issue.

                                                                                   

                                                                                  The issue is with a forum where moderators are supposed to, among other things "moderate" some comments so wrong information doesn't get widespread.

                                                                                   

                                                                                  In the case of the R-Pi forum if somebody states something like "The chips in the RPi are supposed to run hot, they are designed to operate safely to 120 degrees C," I've not seen any moderator or anybody from RPF to reply to that comment so the clueless person that made it can get un-clueless, or even providing the right information about what is the correct operating temperature range for the R-Pi and its parts.

                                                                                   

                                                                                  On the other hand people reporting real problems, and providing valuable information, get bashed, harassed, called names and banned.

                                                                                   

                                                                                  This is from where my "clueless" comment came from.

                                                                                   

                                                                                  -J


                                                                                  • Re: USB discussions getting a bit heated
                                                                                    pegwag

                                                                                    Morgaine. . . I've become a fan of yours...please see my reply to jamodio

                                                                                      • Re: USB discussions getting a bit heated
                                                                                        morgaine

                                                                                        Peg Wagner wrote:

                                                                                         

                                                                                        Morgaine. . . I've become a fan of yours...please see my reply to jamodio

                                                                                         

                                                                                        Yay, I have a fan!  I'm not sure what to do now, I've never had one before.

                                                                                         

                                                                                        PS. I can't improve on your last line to jamodio --- "keep the light coming".  That's glorious!

                                                                                          • Re: USB discussions getting a bit heated
                                                                                            obcd

                                                                                            One light that stays off is that of the backfeeding usb hubs. If the Pi is powered from the a downstream port of the same hub, wouldn't that basically ensure that the Pi receives the full voltage, and shouldn't it boot normally, besided getting some voltage as well on one of it's usb ports? This would basically just short the main and usb polyfuse on the board. But reading from reports, people say that keyboard and mouse behavour is bad with a hub providing power to it's upstream port. This doesn't make sense.

                                                                                             

                                                                                            Considering the power negotiation of usb ports. When you run into issues on a windoze pc, it simply shows a warning message that a device needs more power and should be connected to a self powered hub. Since the driver is not loaded, the device can't start to consume the power it needs. The usb port will keep providing current untill a Polyfuse trips (or some other protection turns on.) On cheap mobo's, they will even provide just one 1Amp fuse for 2 usb ports. It will have a lower resistance under normal operating conditions, and power hungry usb harddisks will work as long as the second usb port isn't badly loaded as well. Maybe it's an idea to improve the price on the Pi2.

                                                                                    • Re: USB discussions getting a bit heated
                                                                                      dharr19

                                                                                      I connected my bluetooth to my Mac and I get a power light.  When I connected it to my Pi nothing happened as before but while it was on I checked my voltage and it was 4.89 so at this point I'm not sure.  Any ideas

                                                                                       

                                                                                      Cheers

                                                                                      David

                                                                                        • Re: USB discussions getting a bit heated
                                                                                          John Beetem

                                                                                          David Harrison wrote:

                                                                                           

                                                                                          I connected my bluetooth to my Mac and I get a power light.  When I connected it to my Pi nothing happened as before but while it was on I checked my voltage and it was 4.89 so at this point I'm not sure.  Any ideas

                                                                                          I don't know anything about bluetooth other than it's wireless and local, but here goes: are you plugging the bluetooth dongle directly into a RasPi USB port or into an externally-powered (self-powered) hub?  Is your 4.89V measured at TP1-TP2 (4.89V should be fine) or at the USB port, i.e., on the USB port side of F1 or F2?

                                                                                           

                                                                                          If the dongle requires more than 100mA the voltage drop across F1 or F2 may be too much for the dongle.  Also, the dongle may require even more current when transmitting -- you may only be able to see this on a 'scope.

                                                                                           

                                                                                          Just some ideas -- I don't know bluetooth specifics.

                                                                                          • Re: USB discussions getting a bit heated
                                                                                            7point62

                                                                                            David Harrison wrote:

                                                                                             

                                                                                            I connected my bluetooth to my Mac and I get a power light.  When I connected it to my Pi nothing happened as before but while it was on I checked my voltage and it was 4.89 so at this point I'm not sure.  Any ideas

                                                                                             

                                                                                            Cheers

                                                                                            David

                                                                                            Not having a Bluetooth ->Pi thinger going myself I can't be definitive, but I do recall a couple of threads on the other forum mentioning compatibility issues with certain Bluetooth devices (possibly regarding Broadcom chipsets, but my memory is rather less than optimal...). Might be worth having a search over there as well as asking here. The way that USB devices try to "negotiate" power over USB is quite complicated too, so it *may* simply fail to initialise because of insufficient current at connection (long story). This wouldn't be obvious with the average multimeter, which isn't sensitive to very quick events. Have you tried connecting via a powered hub (if you have one)?

                                                                                             

                                                                                            Sorry I can't be more help.

                                                                                             

                                                                                            Edit: - John beat me to it.

                                                                                    • Re: USB discussions getting a bit heated
                                                                                      John Beetem

                                                                                      selsinork wrote:

                                                                                       

                                                                                      I think it would be interesting to see what would happen if all the Pi were recalled, to be replaced with an OlinuXino or Beagleboard. Would either of them fare differently in the hands of 300K+ ordinary users ?  I'm sure the issues would be different, but equally sure that someone would be complaining about something.

                                                                                       

                                                                                      Hopefully if there ever is a Pi-v2.0 some lessons will have been learned from this time round on all sides. Not holding my breath on that one

                                                                                       

                                                                                      I don't have any experience with OlinuXino, but BeagleBoard would probably fare OK.  The hardware is now very stable, having gone through many improvements including bringing out the LCD control pins so you can use VGA or an LCD panel.  The early problems with OTG and the serial port were solved long ago, and there's a good wiki.  OTOH, I'm not sure how easy it is to downloads an OS.  Finding a blessed version of a RasPi OS is easy, and downloading it is straightforward.  BeagleBoard wasn't anywhere as easy the last time I looked into this.  I'd be happy to hear other opinions.

                                                                                       

                                                                                      Regarding Pi-v2.0, I don't think the RasPowersThatBe are in any hurry to go through compliance testing again.  It takes a special kind of person to be willing to deal with that chore.

                                                                                    • Re: USB discussions getting a bit heated
                                                                                      John Beetem

                                                                                      Morgaine Dinova wrote:

                                                                                       

                                                                                      It should be pointed out that this isn't a case of the community being over-demanding, and the complaints aren't coming from people intent on destructive stress testing.  They come from ordinary users who are expecting (shock horror!) that when they attach a common USB device and it is recognized by an available driver, that it should then work.

                                                                                      JMO/YMMV: As far as I know, this is still the developer version of RasPi, so anyone who buys a RasPi should realize they're participating in a beta test and that problems will most likely occur (and recur due to regression) and they should help the community by reporting problems and work-arounds.  Part of the fun, n'est-ce pas?

                                                                                       

                                                                                      From the forum comments at raspberrypi.org, it's clear that lots of people bought a RasPi without realizing it's a beta product.  I think it's fair to criticize the RasPowersThatBe for not having been more energetic about making this clear, but it can be hard to get the tech media to report tech accurately.  If they've got more than 50% right, you're in great shape.  The RasPTB may have just figured that "hey, we told you so, how can you imagine that an uncased board with no power supply could be anything other than beta?"

                                                                                       

                                                                                      I would hope the USB issues get ironed out in time.  We'll see.  Maybe they'll end up with permanent beta software.

                                                                                       

                                                                                      JMO/YMMV

                                                                                      • Re: USB discussions getting a bit heated
                                                                                        jamodio

                                                                                        After reading the interview on the last MagPi, I find now more difficult to understand what is the mission and the goal of RPF's besides being a self promotion for the Upton's, and a tax free shelter.

                                                                                         

                                                                                        Claiming all the time "we are a charity", or "I'm the only full time employee" is 100% BS.

                                                                                         

                                                                                        I was really surprised that they are not going to do anything related to produce educational materials.

                                                                                         

                                                                                        They clearly demonstrated that can not manage and deliver on such a relatively complex endeavour as producing the R-pi board, their own arrogance transmitted to the clueless minions managing the blog and forum is awful.

                                                                                         

                                                                                        Plus the lack of any system to seriously track and analyse problems, the lack of a decent knowledge base, compounded by the blindness that like it or not "sh1t happens."

                                                                                         

                                                                                        I totally lost my confidence on anything coming out of RPF, I'm really sad because some of the people at Cambridge are good engineers and have a very interesting vision, but it seems that they no longer have much of a say against the Queen-of-Pi.

                                                                                         

                                                                                        I already decided that I'll NOT recommend any of the local schools to get into this nightmare.

                                                                                         

                                                                                        -J

                                                                                  • Re: USB discussions getting a bit heated
                                                                                    vijay10jan

                                                                                    Thanks ! this is very informatic.

                                                                                    • Re: USB discussions getting a bit heated
                                                                                      John Beetem

                                                                                      I'm seeing a lot of USB problems being reported at raspberrypi.org forum, especially with powered hubs.  It might just be my imagination and/or more new users coming up with new failure modes, but there seems to be a higher concentration of USB hub problems.  I wonder if they're caused by recent changes to the "blessed" operating system?

                                                                                       

                                                                                      I think I'll stick with Debian "Squeeze" 6-19-04-2012 for now until this gets resolved.

                                                                                        • Re: USB discussions getting a bit heated
                                                                                          morgaine

                                                                                          John Beetem wrote:

                                                                                           

                                                                                          I'm seeing a lot of USB problems being reported at raspberrypi.org forum, especially with powered hubs.  It might just be my imagination and/or more new users coming up with new failure modes, but there seems to be a higher concentration of USB hub problems.

                                                                                           

                                                                                          Interesting.

                                                                                           

                                                                                          The original goal in my hub + RF mice tests (which you've already seen) was to find a combination of common generic USB devices including an RF mouse that would work correctly with 100% reliability with my Pi, since I wanted to draw a line under the commissioning phase and start developing something useful with the board.

                                                                                           

                                                                                          It didn't turn out that way, because my Pi doesn't work correctly with any combination of my generic RF mice and my generic well-known hubs.  As a result, the tests turned into a black/white sanity check for Pi USB operation, which wasn't the original goal.  None of my RF mice work at all in a hub, so I'm left with my original wired USB HID devices which "work" but suffer event or data loss every now and then.  To be blunt, I do not have a properly working Pi system, regardless of what I use.

                                                                                           

                                                                                          It's worth pointing out that RPF themselves recommend using self-powered hubs with the Pi to overcome power supply problems, but even if they didn't, correct handling of devices plugged into downstream hubs is a required part of USB operation, so we're faced with a major hard fault here.  Even the partial data loss that is so common is a hard fault.

                                                                                           

                                                                                          USB data loss is harder to quantify since it's not black/white, but I recall some company that produces USB devices measuring this with good instrumentation and reporting the problem to the RPF forum.  Is the Foundation responding to those technical posts?  (And I don't mean by banning ...)

                                                                                           

                                                                                          Morgaine.

                                                                                        • Re: USB discussions getting a bit heated
                                                                                          morgaine

                                                                                          Reading that "USB - the Elephant in our Room" thread on the RPF forum again is really depressing.

                                                                                           

                                                                                          From the fanbois' typical "It works for me so your complaints make no sense", or "You shouldn't expect it to work because the Foundation makes no money", to JamesH's repeated strawman of "We would need to test EVERY SINGLE USB DEVICE", it makes you wonder what it is about the Foundation that its most vocal defence comes from those with impaired logic ability.  The correlation seems strong.

                                                                                           

                                                                                          There's probably some kind of thesis in psychiatry available there.

                                                                                            • Re: USB discussions getting a bit heated

                                                                                              Reading that "USB - the Elephant in our Room" thread on the RPF forum again is really depressing.

                                                                                              Don't read it then   I think it's unfortunate that while there's a couple of people who seem willing to discuss solutions, Pete & dom spring to mind, most of the productive discussions are getting swamped in the noise.

                                                                                                • Re: USB discussions getting a bit heated
                                                                                                  morgaine

                                                                                                  selsinork wrote:

                                                                                                   

                                                                                                  Don't read it then

                                                                                                   

                                                                                                  I haven't been following RPF for months personally, which has greatly improved my quality of life.

                                                                                                   

                                                                                                  But when one of you masochists links to something over there then I do follow your links to understand what you're talking about.  Fortunately it doesn't happen often!

                                                                                                   

                                                                                                  I think it's unfortunate that while there's a couple of people who seem willing to discuss solutions, Pete & dom spring to mind, most of the productive discussions are getting swamped in the noise.

                                                                                                   

                                                                                                  Amid all the noise and illogic, I did notice one positive thing:  the Foundation is now admitting openly that Pi's USB is faulty, you don't need to read between the lines to infer it,  The admission is done very much through gritted teeth, and fanboi logic is of course still unable to grasp that it has been admitted, but nevertheless the existence of the problem is now official.

                                                                                                   

                                                                                                  Also, the extent of the problem is now accepted to be all Pi boards, not just a few rogue ones.  Anyone who thinks that their Pi doesn't have the problem will find that actually it does if they add a USB device or two.

                                                                                                   

                                                                                                  There seems to be a limit of 8 endpoints, and by default the Model B seems to use one for the host, one for the LAN9512 hub itself, one for Ethernet, and one for each of the LAN9512's host ports, which is 5 altogether.  Add an external hub and that adds one endpoint for a 4-port or two endpoints for a 7-port (because a 7-port is usually implemented as two 4-port hubs in cascade), which means that you can attach only one or two USB devices to a hub before the USB system dies completely on all ports.  That kills off your networking too of course.

                                                                                                   

                                                                                                  What's more, the limit of 8 endpoints doesn't mean that Pi's USB will work if you use fewer.  It just means that it won't die completely and totally if everything else is OK and if the Pi can cope with the interrupt rate.  Unfortunately there's more.

                                                                                                   

                                                                                                  In addition, and this is the killer, even if you use fewer endpoints than the maximum, USB events will get lost occasionally on all Pi boards with the current driver if you use low-speed or full-speed USB devices, because split transactions occasionally get broken by Linux interrupt response latency often being longer than 1 ms, which causes the USB event to be discarded.

                                                                                                   

                                                                                                  Linux is not a realtime operating system, so if your driver or your hardware require interrupt response within a specific time constraint, correct operation will fail periodically when the system has other work to do.  There is always other work to do in a Linux system, which is why the Pi's USB has a continuous non-zero error rate no matter how few USB endpoints you use.

                                                                                                   

                                                                                                  In engineering, the first step to finding a solution is admitting the problem, so this is progress.  But god, that first step sure is hard with RPF.

                                                                                                   

                                                                                                  Morgaine.

                                                                                                    • Re: USB discussions getting a bit heated

                                                                                                      Anyone who thinks that their Pi doesn't have the problem will find that actually it does if they add a USB device or two.

                                                                                                      My Pi doesn't have a problem. Really.

                                                                                                      IMG_1923c.jpg

                                                                                                      lack of a USB connector probably has something to do with it

                                                                                                       

                                                                                                      It looks like the ethernet function of the lan9512 uses three endpoints, one bulk in, one bulk out and one interrupt. With just a simple keyboard and mouse my system lists 8 active endpoints.  Oh, and hotplugging the keyboard/mouse just reset one of the newer ones. The original one doesn't have that problem.

                                                                                                       

                                                                                                      So is that 8 endpoint limit a hardware one ?  Or a crappy driver problem ?    The actual question has to be whether it's fixable in software or not and what limits that might have.

                                                                                                       

                                                                                                      If it's simply an interrupt latency problem there will be ways to help mitigate that. One possible way to help would be to up the clock speed to 1GHz as they've mentioned they want to find a way to do, it's not like that's a cure, more like a short term band-aid while other avenues are explored.

                                                                                                      It probably also explains why people like me who don't use a bloated deskptop distro and literally have init, two gettys, dhcpcd and sshd running really don't see the problem to the same degree - I'm simply not adding lots of extra latency running lots of irrelevant crap. I do see dropped and/or repeating keypresses now and again, so no denying there is an issue.

                                                                                                        • Re: USB discussions getting a bit heated
                                                                                                          morgaine

                                                                                                          selsinork wrote:

                                                                                                           

                                                                                                          My Pi doesn't have a problem. Really.

                                                                                                          <image>

                                                                                                          lack of a USB connector probably has something to do with it

                                                                                                           

                                                                                                          Hahaha, nice one.

                                                                                                           

                                                                                                          It looks like the ethernet function of the lan9512 uses three endpoints, one bulk in, one bulk out and one interrupt. With just a simple keyboard and mouse my system lists 8 active endpoints.  Oh, and hotplugging the keyboard/mouse just reset one of the newer ones. The original one doesn't have that problem.

                                                                                                           

                                                                                                          Oh dear, it's a bit worse than I gathered from that thread then, the hard limit arrives a bit sooner.

                                                                                                           

                                                                                                          So is that 8 endpoint limit a hardware one ?  Or a crappy driver problem ?    The actual question has to be whether it's fixable in software or not and what limits that might have.

                                                                                                           

                                                                                                          I gather that 8 endpoints is a hardware limit because a Foundation or Broadcom person said that they found it in the Verilog for the SoC's USB controller, IIRC.  The interrupt rate issue is completely separate from that.

                                                                                                           

                                                                                                          If it's simply an interrupt latency problem there will be ways to help mitigate that. One possible way to help would be to up the clock speed to 1GHz as they've mentioned they want to find a way to do, it's not like that's a cure, more like a short term band-aid while other avenues are explored.

                                                                                                          It probably also explains why people like me who don't use a bloated deskptop distro and literally have init, two gettys, dhcpcd and sshd running really don't see the problem to the same degree - I'm simply not adding lots of extra latency running lots of irrelevant crap. I do see dropped and/or repeating keypresses now and again, so no denying there is an issue.

                                                                                                           

                                                                                                          You're right to call these "bandaids", and they're poor ones because they cannot make the USB errors disappear but only reduce the rate at which they occur.  That rate cannot be made arbitrarily small on Linux without either adding realtime patches so that the housekeeping processes receive guaranteed scheduling priority, or else removing the need for realtime response in the driver.  If the SoC's crappy USB core requires that split transactions be handled in software then the second alternative is not available.

                                                                                                           

                                                                                                          Even a completely quiescent Linux system has processes that get scheduled to run occasionally, even if it's only the periodic filestore sync/update process that is scheduled by a timer.  If scheduling triggers in the middle of USB split transaction handling, the probability that the USB event will be lost is non-zero.

                                                                                                           

                                                                                                          It's just the way Linux works, and all Unixes have worked that way since the dawn of time, so Broadcom designers can hardly express surprise nor point a finger of blame at Linux.  If they genuinely are surprised then Broadcom's problems run far deeper than a broken Pi.

                                                                                                           

                                                                                                          Morgaine.

                                                                                                            • Re: USB discussions getting a bit heated

                                                                                                              I gather that 8 endpoints is a hardware limit because a Foundation or Broadcom person said that they found it in the Verilog for the SoC's USB controller, IIRC.  The interrupt rate issue is completely separate from that.

                                                                                                              Eeewww... a limitation that's hard coded into silicon is going to be difficult   It's what comes of never being designed for what it's being asked to do. 

                                                                                                               

                                                                                                              The model A with SPI ethernet is looking more and  more appealing.   However, with the pragmatic hat on for a moment, if the interrupt rate problem can be resolved it still mostly meets the design goal for a small educational device with wired ethernet, mouse & keyboard. I say mostly as there's a lot to be said for being able to save stuff to a usb key as well as the sd-card, but still, it's not completely fatal - inconvenient yes.

                                                                                                                • Re: USB discussions getting a bit heated
                                                                                                                  jamodio

                                                                                                                  The model A with SPI ethernet is looking more and  more appealing.   However, with the pragmatic hat on for a moment, if the interrupt rate problem can be resolved it still mostly meets the design goal for a small educational device with wired ethernet, mouse & keyboard. I say mostly as there's a lot to be said for being able to save stuff to a usb key as well as the sd-card, but still, it's not completely fatal - inconvenient yes.

                                                                                                                   

                                                                                                                  Hmmm, that would be some interesting project to try, as far as I remember there are some Linux drivers for the Microchip standalone Ethernet controllers, obviously don't expect to power the thing from the regular 3V3 power supply.

                                                                                                                   

                                                                                                                  I used to produce this board based on the ENC424J600

                                                                                                                   

                                                                                                                  http://www.ljcv.net/nic424/nic424-v1.0-800px.jpg

                                                                                                                   

                                                                                                                  I'll put on my to-do list of things to try in my protoboard setup... Good idea selsinork

                                                                                                                   

                                                                                                                  -J

                                                                                                                  • Re: USB discussions getting a bit heated
                                                                                                                    morgaine

                                                                                                                    selsinork + jamodio:  TCP offload and USB offload beckons, as you are both suggesting.

                                                                                                                     

                                                                                                                    It's certainly an engineering solution to the problem, but the trouble is, what's left of the Pi if you have to add those externally?  Just a standalone multimedia chip with SD card and low-end ARM.  It's no longer appealing for $35, and doesn't even make any sense in a networked world.

                                                                                                                      • Re: USB discussions getting a bit heated
                                                                                                                        jamodio

                                                                                                                        Ohh no, it is just for experimenting. I'd rather put more time/money on Beagle or Panda boards, I'm waiting for the guys from Olimex that said their board should be about ready in September.

                                                                                                                         

                                                                                                                        If RPF does not come up with a decent solution which may require to dig deep into the design, besides being an interesting gadget to tinker with and some stuff that can be donde with model A, asuming you can hookup a keyboard and a mouse that works with an external hub, IMHO the thing is dead.

                                                                                                                         

                                                                                                                        -J

                                                                                                                        • Re: USB discussions getting a bit heated

                                                                                                                          It's no longer appealing for $35, and doesn't even make any sense in a networked world.

                                                                                                                          Ok, but... Alternatives ?   With reliable, even if slow, ethernet it still works for me. If we offload anything much then the model A is obviously a better starting point.

                                                                                                                           

                                                                                                                          If usb can be fixed - within limits of the silicon - that's better. But as you keep saying, it needs to be reliable and 'just work'.

                                                                                                                            • Re: USB discussions getting a bit heated
                                                                                                                              jamodio

                                                                                                                              Hmmm another alternative would be, based on something close to the current design but fixing the power supply issues and other things that Pete may have on the list, os for the distributors to bundle the board with a power supply, keyboard and mouse that were proven towork at an attractive price, and it can still be a low cost platform for education.

                                                                                                                               

                                                                                                                              But a that time, I'd guess that some Linux distro would be running on the APC board, yes sans GPIO now and a bigger board but you get other features ...

                                                                                                                               

                                                                                                                              -J

                                                                                                                              • Re: USB discussions getting a bit heated
                                                                                                                                morgaine

                                                                                                                                selsinork wrote:

                                                                                                                                 

                                                                                                                                Ok, but... Alternatives ?

                                                                                                                                 

                                                                                                                                Zillions of alternatives, as long as one is free to choose designs and components in response to functional requirements.  Unfortunately RPF is driven more by politics and facial egg than by engineering so it's academic, but anyway ....

                                                                                                                                 

                                                                                                                                The simplest solution is to use the most appropriate SoC or SoCs for Pi version 2.  If the BCM2835 is still the best multimedia device available, fine, use it, but it's crap for USB, networking, and computing, so put another SoC next to it to do those functions better.

                                                                                                                                 

                                                                                                                                This is no theory, I'm looking at the basis of a solution here on my table.  Since the BeagleBone's TI AM3358/9 SoC costs $5 in volume, throw away the Pi's LAN9512 and add the TI SoC instead.  That would give the Pi a more powerful Cortex-A8, on-chip Ethernet MAC, two on-chip USB (one host and one OTG I think), and a zillion hardware ways of interfacing to the BCM2835 for multimedia.

                                                                                                                                 

                                                                                                                                It's totally pointless even thinking about it though.  RPF has all the mobility of a block of granite entombed in an ancient lava flow.

                                                                                                                                 

                                                                                                                                Morgaine.

                                                                                                                                  • Re: USB discussions getting a bit heated

                                                                                                                                    If the BCM2835 is still the best multimedia device available, fine, use it,

                                                                                                                                    I'm still uncertain how that matters. Right now all that potential still hasn't found an outlet. Lack of codecs prevents serious multimedia use and lack of accelerated X driver means you get no benefit elsewhere. Those things are being worked on, but without a timetable. So it could still be the best unused multimedia device in 5 years.

                                                                                                                                     

                                                                                                                                    Since the BeagleBone's TI AM3358/9 SoC costs $5 in volume, throw away the LAN9512 and add the TI SoC instead.

                                                                                                                                    Hmm. I'd be tempted to throw away much more.  I know it's been commented on before, but if that thing is $5 why hasn't someone done something like the Pi at equivalent cost using it ?  Or alternatively is the BCM2835 available to RPF at significantly less ?

                                                                                                                                      • Re: USB discussions getting a bit heated
                                                                                                                                        morgaine

                                                                                                                                        selsinork wrote:

                                                                                                                                         

                                                                                                                                        If the BCM2835 is still the best multimedia device available, fine, use it,

                                                                                                                                        I'm still uncertain how that matters. Right now all that potential still hasn't found an outlet. Lack of codecs prevents serious multimedia use and lack of accelerated X driver means you get no benefit elsewhere. Those things are being worked on, but without a timetable. So it could still be the best unused multimedia device in 5 years.

                                                                                                                                         

                                                                                                                                        +1.

                                                                                                                                         

                                                                                                                                        Reminds me of another unrelated discussion I was having, about hidden costs and liabilities.

                                                                                                                                         

                                                                                                                                        The BCM2835's closed nature is proving a liability to the Pi community already, and the USB core's closed nature is proving a liability to Broadcom already, as well as to the community.  It's somewhat incredible that the Pi is being marketted on the multimedia strengths of the BCM, yet neither X11 nor open media players like mplayer are accelerated yet just because it's closed tight as a drum.

                                                                                                                                         

                                                                                                                                        Well I suppose I'm "reaching out" to Broadcom/RPF and throwing them a crumb (not that they deserve it) by suggesting to continue using their device to handle the graphics at least, but in reality you're right.  Designing in a liability is not sensible.

                                                                                                                                         

                                                                                                                                        Morgaine.

                                                                                                                                         

                                                                                                                                         

                                                                                                                                        [Addendum:  It's worth pointing out that chucking out the BCM2835 wouldn't leave us without graphics.  The TI AM3358/9 contains a PowerVR SGX530 GPU, and it's no slouch.  Of course it's nearly as closed as the Broadcom so it's still a liability, but it comes for free with a Cortex-A8 and proper USB and Ethernet controllers.  Oh and <shock horror>, documentation.]

                                                                                                                                         

                                                                                                                                        PS. I've  just discovered that the Ethernet MAC on the TI AM 3358/9 is 10/100/1000 !!  It's only the PHY on the BeagleBone that limits it to 100Mbps.  So it's even more "proper" than I thought. :-)

                                                                                                                                          • Re: USB discussions getting a bit heated
                                                                                                                                            John Beetem

                                                                                                                                            Morgaine Dinova wrote:

                                                                                                                                            PS. I've  just discovered that the Ethernet MAC on the TI AM 3358/9 is 10/100/1000 !!  It's only the PHY on the BeagleBone that limits it to 100Mbps.  So it's even more "proper" than I thought. :-)

                                                                                                                                            Actually, the AM3358/9 have versions with two 10/100/1G Ethernet ports which can be coupled to make a three port Ethernet switch (the third port being the CPU).  It also has support for IEEE 1588 Precision Time Protocol, if you really want to know what time it is

                                                                                                                                              • Re: USB discussions getting a bit heated
                                                                                                                                                morgaine

                                                                                                                                                John Beetem wrote:

                                                                                                                                                 

                                                                                                                                                Actually, the AM3358/9 have versions with two 10/100/1G Ethernet ports which can be coupled to make a three port Ethernet switch (the third port being the CPU).  It also has support for IEEE 1588 Precision Time Protocol, if you really want to know what time it is

                                                                                                                                                 

                                                                                                                                                Awesome chip.  It needs someone to make a rock-bottom board using it to compete at the Pi price niche.

                                                                                                                                                 

                                                                                                                                                There are quite a few things that could be whittled off the BeagleBone to bring the BOM cost down from $89:

                                                                                                                                                 

                                                                                                                                                • The PMIC expansion header and LCD/backlight interface are not essential.
                                                                                                                                                • The PMIC itself has a lot of extra features outside of power management that may be superfluous in a bottom-end board so a cheaper PMIC may be available.
                                                                                                                                                • The front-end USB hub is not essential.
                                                                                                                                                • The front-end FT2232H that connects to the USB hub is not essential.
                                                                                                                                                • The BeagleBone's USB device/host flexibility could be reduced by routing the SoC's two USB OTG ports to a combined host USB connector for lower cost.
                                                                                                                                                • The reset button is not essential.
                                                                                                                                                • The two large expansion headers provide good physical support for daughterboards, but could be shortened to reduce cost.
                                                                                                                                                • If one must play RPF-type marketing tricks, don't supply the micro-SD card with the board.
                                                                                                                                                • It must be remembered that in addition to BOM reductions, there will be at least one increase:  HDMI socket and associated circuitry, which must be on-board..

                                                                                                                                                 

                                                                                                                                                I bet that such reductions could get the BOM cost down down to the Pi price niche for Pi-type volumes.  BeagleBone is made in much smaller volumes than Pi, so their volume price breaks are probably not very good currently, but with volume sales that would change dramatically.

                                                                                                                                                 

                                                                                                                                                Morgaine.

                                                                                                                                                  • Re: USB discussions getting a bit heated
                                                                                                                                                    John Beetem

                                                                                                                                                    Morgaine Dinova wrote:

                                                                                                                                                     

                                                                                                                                                    I bet that such reductions could get the BOM cost down down to the Pi price niche for Pi-type volumes.  BeagleBone is made in much smaller volumes than Pi, so their volume price breaks are probably not very good currently, but with volume sales that would change dramatically.

                                                                                                                                                    I think the key here is volume.  In large volumns BB could probably come down to under US$50 even with the current BOM, and the DVI cape could come down to US$15 instead of US$50.  Another cost factor is USA manufacturing, but I'm happy to pay a bit more and not wonder about quality.

                                                                                                                                                     

                                                                                                                                                    I like having a separate video cape so you have the choice of VGA (coming soon!) or LCD.  But à la carte is always going to be more expensive.

                                                                                                                                                      • Re: USB discussions getting a bit heated
                                                                                                                                                        morgaine

                                                                                                                                                        True, the flexibility of BeagleBone is very high, but unfortunately price is king.

                                                                                                                                                         

                                                                                                                                                        Sadly, the board is priced above the point on the budget radar where price is no barrier for the average pocket in the "West" (often said to be the price of an evening out).  But the board is also so well specified that there is ample room for a bottom-end product of that line created through feature reduction.

                                                                                                                                                         

                                                                                                                                                        The Beagle family would be rounded off beautifully with a "BeagleBite" (to stay within their naming meme), where everything except reliability is sacrificed at the altar of BOM cost.  And when sales rocket in reverse exponential proportion to price, the team would find itself with a whole product line ready to cater for different use cases, unlike Pi.

                                                                                                                                                         

                                                                                                                                                        Morgaine.

                                                                                                                                                          • Re: USB discussions getting a bit heated

                                                                                                                                                            And when sales rocket in reverse exponential proportion to price, the team would find itself with a whole product line ready to cater for different use cases, unlike Pi.

                                                                                                                                                            If nothing else the Pi has proved there's a market for a cheap device. Hopefully another device will rise to that challenge and some healthy competition gives us some interesting devices to use.

                                                                                                                                                              • Re: USB discussions getting a bit heated
                                                                                                                                                                jamodio

                                                                                                                                                                Probably right, but remember that the R-Pi has been always promoted as a cheap linux "computer," many people realize that to make it work as a computer there is other stuff and extra expenditure associated with it.

                                                                                                                                                                 

                                                                                                                                                                I wonder when Eben will stop saying that the R-pi can do "what other computers do."

                                                                                                                                                                 

                                                                                                                                                                -J

                                                                                                                                                                  • Re: USB discussions getting a bit heated
                                                                                                                                                                    I wonder when Eben will stop saying that the R-pi can do "what other computers do."

                                                                                                                                                                    depends how you define 'other computers'. compare a Pi, a laptop, a desktop, a blade server and an IBM BlueGene/Q.  We hopefully both agree they all fit the general term 'computer' but all have vastly different capabilities and expansion options.. So, can the Pi manage 16.32 petaflops/s ?  Don't think so, no matter how good the GPU is.

                                                                                                                                                                     

                                                                                                                                                                    Narrow the focus enough and they can probably all run linux, so yes, the Pi can do 

                                                                                                                                                                      • Re: USB discussions getting a bit heated
                                                                                                                                                                        morgaine

                                                                                                                                                                        When Eben says "other computers", I would grant him the narrow interpretation of that, meaning "small personal computers that private people commonly have".

                                                                                                                                                                         

                                                                                                                                                                        The trouble with Pi is that it fails to do what such small personal computers manage to do effortlessly every day for millions of users around the world.  Those small personal computers that everyone has don't fail to enumerate large numbers of USB devices nor lose USB data continually.  That's the problem I would lay at Eben's door.

                                                                                                                                                            • Re: USB discussions getting a bit heated

                                                                                                                                                              Actually, the AM3358/9 have versions with two 10/100/1G Ethernet ports

                                                                                                                                                              Doesn't take a lot of imagination to realise that a lot of people would be interested in a cheap device with two decent ethernet ports.  Different target market, but still.  With three configurations, one with usb only for all the weird wifi lovers, then single wired port and dual wired port versions you have an interesting device.

                                                                                                                                                               

                                                                                                                                                              Only question is whether the Arm is fast enough to deal with two 1G ports. I've come across a fair few of those little nas enclosures that do have 1G ports but barely manage 100M speeds on them.

                                                                                                                                                • Re: USB discussions getting a bit heated
                                                                                                                                                  jamodio

                                                                                                                                                  It is going to be really hard, making USB OTG work as a "host" if you excuse my French is a "bitch" ...

                                                                                                                                                   

                                                                                                                                                  I found some documentation from Synopsys (http://www.synopsys.com/dw/ipdir.php?ds=dwc_usb_2_0_hs_otg) but didn't have time yet to even browse through it.

                                                                                                                                                   

                                                                                                                                                  -J

                                                                                                                                                  • Re: USB discussions getting a bit heated

                                                                                                                                                    I gather that 8 endpoints is a hardware limit

                                                                                                                                                    So I stumbled on some other information on this limit of 8 'somethings'  here https://github.com/raspberrypi/linux/issues/29#issuecomment-6882473 it's not realy clear to me what the actual relationships are between a channel and an endpoint. It seems more like a channel is used by an endpoint that has some specific property, not simply all endpoints.

                                                                                                                                                     

                                                                                                                                                    What does seem good is that there are other people outside the RPF working on drivers for this same synopsis core so there may be some light at the end of that tunnel

                                                                                                                                                    The downside is the other work is for the mainline kernel and we're 'officially' stuck at 3.1.9 so backporting stuff will likely be an issue and take time.

                                                                                                                                                     

                                                                                                                                                    The funny bit is that I came across the links into those discussions on github from an irc discussion of a usb webcam that has 26 endpoints !

                                                                                                                                                      • Re: USB discussions getting a bit heated
                                                                                                                                                        John Beetem

                                                                                                                                                        selsinork wrote:

                                                                                                                                                         

                                                                                                                                                        I gather that 8 endpoints is a hardware limit

                                                                                                                                                        So I stumbled on some other information on this limit of 8 'somethings'  here https://github.com/raspberrypi/linux/issues/29#issuecomment-6882473 it's not realy clear to me what the actual relationships are between a channel and an endpoint. It seems more like a channel is used by an endpoint that has some specific property, not simply all endpoints.

                                                                                                                                                         

                                                                                                                                                        The funny bit is that I came across the links into those discussions on github from an irc discussion of a usb webcam that has 26 endpoints !

                                                                                                                                                        Well, I don't think "channel" is a USB term.  Perhaps a "channel" means a "DMA channel", and 8 DMA channels can be configured simultaneously to cover endpoints with actual transfers in progress.  That is, as soon as one transfer completes that "channel" is available for a new one.

                                                                                                                                                         

                                                                                                                                                        26 endpoints?  Whoa.  Pretty close to the 16 input plus 16 output limit.

                                                                                                                                                          • Re: USB discussions getting a bit heated

                                                                                                                                                            Well, I don't think "channel" is a USB term.

                                                                                                                                                            No, I get the impression it's some internal design detail of the controller.

                                                                                                                                                            That is, as soon as one transfer completes that "channel" is available for a new one.

                                                                                                                                                            If I'm reading it correctly, that's the problem. Things that require a 'channel' consume one permanently with the current driver. Looks like there are fixes for that in the code that's in the process of being upstreamed into 3.6, but that needs backporting effort to get it into 3.1.9.

                                                                                                                                                             

                                                                                                                                                            If the upstream dwc_otg driver effort succeeds the sensible path would seem to be to move forward to a mainline kernel. AFAICT the only missing pieces are usb and the vchiq thing that will likely never be accepted upstream anyway. Forward porting vchiq and keeping it up to date seems like it should be less work than continually backporting all the different parts into 3.1.9.

                                                                                                                                                            Although it's possible that neither forward or back-porting efforts are worthwhile until the current high churn rate in the arm tree settles down.

                                                                                                                                              • Re: USB discussions getting a bit heated
                                                                                                                                                morgaine

                                                                                                                                                I wonder what Farnell and RS's reaction is to all this.  I suspect that no other computer-like product they sell is so badly broken and incompatible with common USB devices.  They can't be pleased, and their high-level talks with RPF must be "interesting".

                                                                                                                                                • Re: USB discussions getting a bit heated
                                                                                                                                                  yvanttt

                                                                                                                                                  Here are some results i ran into when using cheap powered hub.

                                                                                                                                                   

                                                                                                                                                  Initialy they may seem incompatible with th PI, but it could be due to some compromise in the design/production run to cut pricr down.

                                                                                                                                                   

                                                                                                                                                  I ordered some cheap 7 port power USB hub (like 3 for $12) with the power supply included.

                                                                                                                                                   

                                                                                                                                                  on my 1rst attempt i connected my PI to the hub for both power, keyboard and mouse on the hub.

                                                                                                                                                  The PI would start to boot and then keept on rebooting.

                                                                                                                                                  I removed the keyboard and mouse, no change.

                                                                                                                                                   

                                                                                                                                                  The supplied power supply was rated for 5v 1A only, clearly insuficient current rating. so i used a 5v 2A supply i had left over.

                                                                                                                                                   

                                                                                                                                                  I reconnected everything back, then the PI booted till it got to the USB port detection and then it was looping into the USB detection sequence. Then i noticed the micro usb plug was NOT connected on the PI ????? The PI was receiving power from the normal USB jack instead.

                                                                                                                                                   

                                                                                                                                                  I then connected the micro USB plug and reapplied power, now the PI booted normaly. But the keyboard and mouse where erratics.

                                                                                                                                                   

                                                                                                                                                  I decided to look inside the USB hub case and i found a jumper that connected the external power supply to the +5v side on the incoming usb connector from the PI.

                                                                                                                                                   

                                                                                                                                                  Then i proceded to remove said jumper. Now the PI would not power on from the hub, good.

                                                                                                                                                  So i connected the micro usb cable to the powered hub along the keyboard and mouse.

                                                                                                                                                  now they are all behaving properly.

                                                                                                                                                   

                                                                                                                                                  So my theory is that when the jumper wire was installed in the hub and you use the same hub for both power and expansions some current loops may be created inside the PI and cause some undesirable behaviour.

                                                                                                                                                  • Re: USB discussions getting a bit heated
                                                                                                                                                    jamodio

                                                                                                                                                    New Gizmo from FTDI designed for the R-Pi

                                                                                                                                                     

                                                                                                                                                    http://www.ftdichip.com/Products/Modules/RPi.htm

                                                                                                                                                     

                                                                                                                                                    PS asuming USB works ...

                                                                                                                                                     

                                                                                                                                                    -J

                                                                                                                                                    • Re: USB discussions getting a bit heated
                                                                                                                                                      morgaine

                                                                                                                                                      Very comprehensive blog post here about USB 2.0 split transaction handling, which details the same USB data loss that RPF has described.  The article concerns a different SoC than used on the Pi, but still the same Synopsis core and OTG driver --- http://kynesim.blogspot.co.uk/2010/12/interesting-facts-about-usb-number-2312.html

                                                                                                                                                        • Re: USB discussions getting a bit heated
                                                                                                                                                          John Beetem

                                                                                                                                                          There's a fairly new story about RasPi USB at Slashdot: Serious Problems with USB and Ethernet on the Raspberry Pi.  IIRC, most Slashdot coverage of RasPi has been very favorable.

                                                                                                                                                           

                                                                                                                                                          I thought this comment was particularly interesting:

                                                                                                                                                          Anonymous Coward on Saturday August 25, @04:20AM (#41120815):

                                                                                                                                                           

                                                                                                                                                          I work in a company who does SOC and we have one our SOC that use this USB core IP.

                                                                                                                                                           

                                                                                                                                                          This USB core had so many problem that we end up making it work only in full speed mode [12 Mb/s] (and not high speed one [480 Mb/s]).  As you said split transaction don't work well (in our case we had seen IRQ storm that make linux freeze).

                                                                                                                                                           

                                                                                                                                                          BTW we have full documentation of the chip (broadcom should have this), but the driver is so complex that it is very hard to fix/rewrite (AFAIK samsumg rewrite it).

                                                                                                                                                           

                                                                                                                                                          Also for our newer SOC we used another USB IP made by chipidea, but the funny part is there were brought by synopsis and synopsis want people to buy there crappy dwc USB core...

                                                                                                                                                          Bold face and [editorial insertions] by yours truly.  As always with the Internet, you can't always believe Anonymous Cowards (or anybody else, including me), but this sounds pretty consistent with RasPi misbehaviour.

                                                                                                                                                            • Re: USB discussions getting a bit heated
                                                                                                                                                              morgaine

                                                                                                                                                              Aye, interesting.  That low-quality audio issue that I mentioned earlier -- http://www.element14.com/community/thread/19588?tstart=0 -- came from that same Slashdot thread.

                                                                                                                                                               

                                                                                                                                                              Slashdot peeps aren't sure what to make of the Pi.  They recognize the hype and hold it in disdain for this as expected, but other than that the comments are pretty much a scattergun.

                                                                                                                                                               

                                                                                                                                                              Re the USB controller, it appears to be the subject of universal condemnation.  It's really bad luck that the designer of the BCM2835 chose it in the first place, and then bad luck again that the designer of the Pi chose the BCM2835.  It's pretty clear that neither of them bothered to test the USB host functionality of that USB controller to any significant degree before giving it a green light.

                                                                                                                                                               

                                                                                                                                                              PS. It's a bit late for RPF and in turn Broadcom to be passing the buck, but wasn't there a test coverage report accompanying the USB core when they bought it?  What happened to that?  Was it ever read by anyone?  Was the limited USB functionality signed off as good enough for the BCM2835's intended market?  Committing a chip design to fab is a serious and costly step and isn't generally done on a whim without a lot of detailed checks and sign-offs.

                                                                                                                                                              • Re: USB discussions getting a bit heated
                                                                                                                                                                7point62

                                                                                                                                                                Am just having a look through the comments submitted to that Slashdot article. Users are a bit polarised, aren't they?

                                                                                                                                                                 

                                                                                                                                                                Getting rid of the polyfuses is good in the long run, as power supply issues have been the fall guy for just about everything. I see the closed SOC is coming in for some stick too. Bit of a red herring IMO. Unless folks are very lucky, a community fix for something as complex as the USB isn't going to happen. There might be a flurry of hacks in a situation like this, but it all just tends to be white noise which serves only to divert attention away from the people who's responsibility it is to actually fix the darn thing.

                                                                                                                                                                 

                                                                                                                                                                It is just a repurposed Roku SOC, after all.

                                                                                                                                                                 

                                                                                                                                                                Still, there has been progress of late on other fronts, so I'm happy to wait and see.

                                                                                                                                                                 

                                                                                                                                                                Edit: Morgaine beat me to the post! The whole situation reeks of  "It was fine when we tested it in the lab..." - the Fedora rollout was exactly the same. *Possibly* the best thing that ever happened to the Pi was that it was bought by an unsuspecting public who expected stuff to "just work". They then broke it in ways that the lab boys had never even considered and the faithful would never consider complaining about.

                                                                                                                                                                 

                                                                                                                                                                Perhaps this is why we haven't seen an absolute slew of Chinese clones yet - perhaps all but the most fly-by-night manufacturers are realising that there is merit in hardware that works out of the box* (allowing for the caveat that most far-eastern stuff is sold sans support).

                                                                                                                                                                 

                                                                                                                                                                *This is probably the most optimistic thing I've ever written.

                                                                                                                                                                  • Re: USB discussions getting a bit heated
                                                                                                                                                                    jamodio

                                                                                                                                                                    Big thing the Roku box works !! (have a Roku 2 XS) and comes with a power supply, WiFi, pre-installed software, case, a remote control and you don't have to deal with "a sect" if you have problems with it.

                                                                                                                                                                     

                                                                                                                                                                    Also I don't thing that replacing the polyfuses by 0 ohm resistors is a sign of progress, the keep the same arrogant attitude of not informing or letting the community participate and help, and I don't believe that serious testing has been done in "the lab" and claiming that RPF is a non-profit charity without the resources keeps being a lame excuse.

                                                                                                                                                                     

                                                                                                                                                                    I still believe and said it many times, that the Rasperry Pi was/is a good idea, even with the Broadcom SoC, the problem is bad engineering and poor execution.

                                                                                                                                                                     

                                                                                                                                                                    -J