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

Re: USB - the Elephant in our Room

Wed Aug 08, 2012 9:37 pm

Thanks for keeping us informed Gordon.
I had troubles with 2 usb wifi sticks that stopped working under heavy traffic conditions. I strumbled upon a forum topic here with someone who compiled his own kernel and said it fixed his usb issues. I decided to try it as well (nothing to loose.) To my suprise, the wifi sticks keeped working with his kernel. I extracted his dot config file and set a kernel build environment up myself. When I used the config from the github sources at that moment, the wifi stick issues returned. When I used the config I got from the working kernel, the wifi sticks keep working. Both wifi sticks are using a totally different chipset. One is N compatible and the other is just B-G. I have no idea if comparing the 2 config files could be of any use?
I am pretty noob to linux internals, but I can provide both the config files if someone thinks they might shine some light on the case. (Maybe it's not the same issue.)

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

Re: USB - the Elephant in our Room

Wed Aug 08, 2012 9:42 pm

jamesh wrote: Do you see the problem? You just given me a link to a home page. That page contains no information that some USB peripherals will not work. So where is it on the site? You need to search. Just like you need to search here for any information. In addition, MS are a multi billion dollar company, with 10's of thousands of employees. The Raspi Foundation has one part time employee, who is non-technical.
USB problems are not problems with a specific device. You can see that the even devices from working list do not work! So this comparison is totally misguided.

Do you care about this so that more people unnecessary spend money?

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

Re: USB - the Elephant in our Room

Wed Aug 08, 2012 9:46 pm

obcd wrote:Thanks for keeping us informed Gordon.
I had troubles with 2 usb wifi sticks that stopped working under heavy traffic conditions. I strumbled upon a forum topic here with someone who compiled his own kernel and said it fixed his usb issues. I decided to try it as well (nothing to loose.) To my suprise, the wifi sticks keeped working with his kernel. I extracted his dot config file and set a kernel build environment up myself. When I used the config from the github sources at that moment, the wifi stick issues returned. When I used the config I got from the working kernel, the wifi sticks keep working. Both wifi sticks are using a totally different chipset. One is N compatible and the other is just B-G. I have no idea if comparing the 2 config files could be of any use?
I am pretty noob to linux internals, but I can provide both the config files if someone thinks they might shine some light on the case. (Maybe it's not the same issue.)

Can you give a link to this kernel files? And to these configurations files also? Please.

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

Re: USB - the Elephant in our Room

Wed Aug 08, 2012 10:06 pm

The main reason for using a 13 way hub maybe to consider the following configuration of Pi-es.

My main development LCD/Keys interface and x86 netbook Jolicloud/Ubuntu.
An Ethernet link via crossover cable to the Pi as to a central live work unit hub.
The main hub can provide all power for the Pi-es co-located at the hub.
One Pi runs the main Ethernet of the hub, runs a Chronos watch C1111 adapter local remote.
A nice chair gravitates toward the hub.
The 12 left way USB hub becomes a remote over Ethernet.

Now I'm left with developing a USB powered Ethernet smart switch... I have not much cash to do this...
With a Pi solution the fact that the Ethernet goes through the on board hub of USB, kind of inverts a communication of PoE. Or a USB bus master hub need. A USB network plug adapter? No cat5? The utility of cat5 as a patch connector? Maybe a USB A to USB A serial cross adapter needs building? Doesn't windows have those? Wot no drivers?

Do you really need a model A with just half the memory, or would you like a VGA header where the cat5 is instead?

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

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

Re: USB - the Elephant in our Room

Wed Aug 08, 2012 10:07 pm

Code: Select all

http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=10011&start=50
On page 3 of this topic you can find a link. It's that kernel I got the working config from.
As it's already 00:01 over here, I will prepare a package tomorrow with the dot config and the instructions how I compiled the kernel. I will provide the kernel.img files as well.
I can't guarantee it's perfect. I just noticed an improvement in my case.
The wifi adapters that don't work with the normal kernel are a
Micro NEXT MN-WD152B using the RTL8188CUS chipset
The other one is a d-link dwl-g122 rev C1. I will have to plug it in to figure out the chipset again.

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

Re: USB - the Elephant in our Room

Wed Aug 08, 2012 10:55 pm

obcd wrote:I will prepare a package tomorrow with the dot config and the instructions how I compiled the kernel. I will provide the kernel.img files as well.
I would be very grateful.

Joe Schmoe
Posts: 4277
Joined: Sun Jan 15, 2012 1:11 pm

Re: USB - the Elephant in our Room

Wed Aug 08, 2012 11:28 pm

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

See the difference?
But, you see, there's a funny thing. You & I understand what it means when we say that the people working on this are unpaid volunteers. We know that what it means is (to put it starkly): be happy with what you get and don't complain. And don't expect any more than you get.

But to some people, it means exactly the opposite. Think of this programming as being a consumer good - and a free one at that. Well, whenever a consumer good is free, the consumer will take as much of it as they can carry. Effectively, they will eat until they can eat no more. And, if the good is one for which demand is insatiable, they will (in theory at least) eat forever.

Whereas, of course, if there is a charge for something, then demand is dependent on price and is not infinite.

And, no, I'm not being facetious. I honestly believe that that is how a lot of people conceive of FOSS (or whatever acronym or whatever that you prefer) - that is something that literally doesn't cost anything to produce, so the supply should be infinite. Since they are not paying for it, there is no reason why the supply should not be infinite.
And some folks need to stop being fanboys and see the forest behind the trees.

(One of the best lines I've seen on this board lately)

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

Re: USB - the Elephant in our Room

Wed Aug 08, 2012 11:44 pm

I don't understand the grumblers.

The USB does work - I use it all the time - for the keyboard, mouse and pen drives. The point is it could work better. This is acknowledged and is being rectified - which is fine. The Pi isn't even out of nappies yet - a few teething problems are to be expected. This is normal with a new product - even for Mega-corporations like Microsoft.

I don't understand why some people are being so negative - its no big deal.

There are a few wrincles to iron out, but that is happening, in front of our very eyes, which is fascinating in itself. Although still a bit of a mystery, the Pi is shaping up to be one of the best understood pieces of hardware ever made due to its public development cycle.

I see a positive side to these minor irritations.

elatllat
Posts: 1338
Joined: Sat Dec 17, 2011 5:05 pm

Re: USB - the Elephant in our Room

Thu Aug 09, 2012 12:11 am

gsh wrote:...we're limited currently to a maximum of 8 periodic endpoints...
Where did you find that information?

Because I seem to have 13 working. (1 hub is not working)

Code: Select all

lsusb -v | grep "Device Status" | wc -l
14
lsusb -v|grep "Bus 0"
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. 
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. 
Bus 001 Device 004: ID 0409:0050 NEC Corp. 7-port hub
Bus 001 Device 005: ID 1a40:0201 Terminus Technology Inc. FE 2.1 7-port Hub
Bus 001 Device 006: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
Bus 001 Device 022: ID 13fd:1340 Initio Corporation Hi-Speed USB to SATA Bridge
Bus 001 Device 023: ID 13fd:1340 Initio Corporation Hi-Speed USB to SATA Bridge
Bus 001 Device 024: ID 13fd:1340 Initio Corporation Hi-Speed USB to SATA Bridge
Bus 001 Device 026: ID 13fd:1340 Initio Corporation Hi-Speed USB to SATA Bridge
Bus 001 Device 031: ID 13fd:1340 Initio Corporation Hi-Speed USB to SATA Bridge
Bus 001 Device 032: ID 13fd:1340 Initio Corporation Hi-Speed USB to SATA Bridge
Bus 001 Device 033: ID 13fd:1340 Initio Corporation Hi-Speed USB to SATA Bridge
Bus 001 Device 034: ID 13fd:1340 Initio Corporation Hi-Speed USB to SATA Bridge
Unless I am misunderstanding what a periodic endpoint is?
4k or USB3 : hardkernel.com

FAQ : raspberrypi.stackexchange.com

https://google.com/search?q=site%3Awww.raspberrypi.org+search+first

https://www.raspberrypi.org/forums/search.php?search_id=unanswered

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

Re: USB - the Elephant in our Room

Thu Aug 09, 2012 6:23 am

elatllat wrote:
gsh wrote:...we're limited currently to a maximum of 8 periodic endpoints...
Where did you find that information?
In the Verilog for the chip!
elatllat wrote:
Because I seem to have 13 working. (1 hub is not working)

Code: Select all

lsusb -v | grep "Device Status" | wc -l
14
lsusb -v|grep "Bus 0"
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. 
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. 
Bus 001 Device 004: ID 0409:0050 NEC Corp. 7-port hub
Bus 001 Device 005: ID 1a40:0201 Terminus Technology Inc. FE 2.1 7-port Hub
Bus 001 Device 006: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
Bus 001 Device 022: ID 13fd:1340 Initio Corporation Hi-Speed USB to SATA Bridge
Bus 001 Device 023: ID 13fd:1340 Initio Corporation Hi-Speed USB to SATA Bridge
Bus 001 Device 024: ID 13fd:1340 Initio Corporation Hi-Speed USB to SATA Bridge
Bus 001 Device 026: ID 13fd:1340 Initio Corporation Hi-Speed USB to SATA Bridge
Bus 001 Device 031: ID 13fd:1340 Initio Corporation Hi-Speed USB to SATA Bridge
Bus 001 Device 032: ID 13fd:1340 Initio Corporation Hi-Speed USB to SATA Bridge
Bus 001 Device 033: ID 13fd:1340 Initio Corporation Hi-Speed USB to SATA Bridge
Bus 001 Device 034: ID 13fd:1340 Initio Corporation Hi-Speed USB to SATA Bridge
Unless I am misunderstanding what a periodic endpoint is?
So the important thing is the periodic endpoints, that is those that are Interrupt or Isochronous, so do

Code: Select all

sudo lsusb -v | grep "Transfer Type"
If you've got more than six then I think you'll end up running into trouble. There is a patch for this but currently I believe it is running into trouble.
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

elatllat
Posts: 1338
Joined: Sat Dec 17, 2011 5:05 pm

Re: USB - the Elephant in our Room

Thu Aug 09, 2012 6:35 am

Thanks for the clarification gsh.

I have 8 ( and the last one is not working).

Code: Select all

lsusb -v | grep -iP "Transfer Type.*(Interrupt|Isochronous)" | wc -l
8
lsusb -v | grep "Transfer Type"
          Transfer Type            Interrupt
          Transfer Type            Interrupt
          Transfer Type            Interrupt
          Transfer Type            Bulk
          Transfer Type            Bulk
          Transfer Type            Interrupt
          Transfer Type            Interrupt
          Transfer Type            Interrupt
          Transfer Type            Interrupt
          Transfer Type            Bulk
          Transfer Type            Bulk
          Transfer Type            Bulk
          Transfer Type            Bulk
          Transfer Type            Bulk
          Transfer Type            Bulk
          Transfer Type            Bulk
          Transfer Type            Bulk
          Transfer Type            Interrupt
          Transfer Type            Bulk
          Transfer Type            Bulk
          Transfer Type            Bulk
          Transfer Type            Bulk
          Transfer Type            Bulk
          Transfer Type            Bulk
          Transfer Type            Bulk
          Transfer Type            Bulk
All the hard drives are "Transfer Type Bulk".
4k or USB3 : hardkernel.com

FAQ : raspberrypi.stackexchange.com

https://google.com/search?q=site%3Awww.raspberrypi.org+search+first

https://www.raspberrypi.org/forums/search.php?search_id=unanswered

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

Re: USB - the Elephant in our Room

Thu Aug 09, 2012 7:58 am

Hi Gordon,

thanks for your continuing dedication to solve this problem.
gsh wrote:So currently I'm not convinced that there is a bug in the USB driver at all, the main problem is that the linux interrupt latency is in general terrible! Currently I'm seeing interrupts not being serviced for up to 1ms! Because of this we're dropping split transactions which is making any low or full speed transactions fail.
Just out of curiosity: If it is a general linux problem, why do other low-end (in terms of processing power) ARM devices running under Linux not experience the same problems?
Once you add up one interrupt endpoint for mouse, keyboard, hub, ethernet you've already used five of the eight channels (we may even reserve a channel for the root hub)... I'd be interested in seeing how many periodic endpoints (interrupt or isochronous) people have working before they find problems...
I'm running headless, so no keyboard or mouse. I'm running into problems with just two PL2303 USB-to-serial adapters connected to the two available on-board USB outlets. Please note that the exact same adapters have been running (and in fact are running again) without problems via a cheap passive hub on my NSLU2. I have also been trying to run a DVB-C stick via a powered hub in bulk transfer mode and run into the same problems.

Do you need more input from people experiencing problems? If so, what channel do you suggest to submit this info to you? Maybe the signal to noise ratio in this thread is getting a bit low ;)

Regards, Richard

User avatar
Jim JKla
Posts: 2218
Joined: Sun Jan 29, 2012 11:15 pm
Location: Newcastle upon Tyne UK

Re: USB - the Elephant in our Room

Thu Aug 09, 2012 8:32 am

The fact that they run better with the powered hub would point to it being power related.

As for the signal to noise in the thread (most of the noise has dropped off for now) let's just hope it continues. ;)
Noob is not derogatory the noob is just the lower end of the noob--geek spectrum being a noob is just your first step towards being an uber-geek ;)

If you find a solution please post it in the wiki the forum dies too quick

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

Re: USB - the Elephant in our Room

Thu Aug 09, 2012 8:50 am

I promised to post my kernel. Feel free to test with it.

Code: Select all

http://www.mediafire.com/?ffcgbt0tpmc57o2
Bare in mind I am new to linux development. I used mediafire since I have good experience with it.
Don't ask me how, but for me it works better.

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

Re: USB - the Elephant in our Room

Thu Aug 09, 2012 9:00 am

Thank you very much but can you also upload file .config? Please.

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

Re: USB - the Elephant in our Room

Thu Aug 09, 2012 9:13 am

Jim JKla wrote:The fact that they run better with the powered hub would point to it being power related.
I didn't write that the PL2303 adapters run better with a powered hub. In fact, I never tried them with a powered hub on the RPi. On the NSLU2, they are connected via a passive (= non-powered) hub which hung up the RPi after a few minutes, so I connected them directly which seemed to resolve the problem at first but made the RPi hang again after a couple of hours.

I still have to try the PL2303 adapters with my new powered hub on the RPi, but first I'll wait for some new results from gsh.

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

Re: USB - the Elephant in our Room

Thu Aug 09, 2012 9:22 am

. config is in the package as well. Unless I missed it?
Normally you can extract it from the kernel as well I think.

User avatar
RaTTuS
Posts: 9593
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK

Re: USB - the Elephant in our Room

Thu Aug 09, 2012 9:35 am

.config is a lot easier for us that make our own kernels...
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

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

Re: USB - the Elephant in our Room

Thu Aug 09, 2012 9:38 am

Last time I checked, it was still in. 8-)

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

Re: USB - the Elephant in our Room

Thu Aug 09, 2012 9:42 am

obcd wrote:Last time I checked, it was still in. 8-)
Thank you :)
I'm at work and I cannot currently download this package.

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

Re: USB - the Elephant in our Room

Thu Aug 09, 2012 9:57 am

The dlink DWL-G122 uses the Ralink RT2571W chipset.
I plugged it in to the powered hub that already had the MicroNEXT wifi.
ifconfig shows both working fine and happy together. (No mouse or keyboard connected.)

User avatar
ledow
Posts: 36
Joined: Thu Feb 02, 2012 12:55 pm

Re: USB - the Elephant in our Room

Thu Aug 09, 2012 12:28 pm

pygmy_giant wrote:I don't understand the grumblers.
Because, for some things, the USB DOES NOT WORK. Simple as that. No matter how much power you throw it at, what firmware you use, what distro you run, how short your cables are, or any other factor whatsoever. I can provide examples of both keyboards and 3G modems that do not work. Ever. At all. Others have found the same with wireless sticks, webcam and custom devices that are FULLY USB COMPLIANT. They just don't work.

The USB might work for you, if you're lucky and using it only on certain devices. But it doesn't "just work". It's not a question of working better, but at all on those devices (which have no compatibility issues with Linux or anything else).

It was not acknowledged for months after reporting (check my thread history if you like). It isn't being rectified. There's one guy looking at it in his spare time and even the people who designed and built their own custom USB devices and who spotted the problem first can't help that much (they have provided full USB logs using expensive USB analyzers, that PROVE that USB packets sometimes just drop out of existence after being acknowledged by the RPi and still nothing close to a fix has surfaced because the "community" contains the same number of kernel hackers as any other project - i.e. very, very, very, very few, and even fewer with in-depth knowledge of the RPi and/or USB).

This non-acknowledgement of the problem and not having enough people "in the know" able to fix these things is the source of the complaints. Hell, I still haven't heard back if the perfectly-working 2Gb SD card that *I* had to send to the guy at Broadcom who sent it onto their driver-writer in Taiwan ever had any success in getting it to work on the RPi. It worked on DOZENS of other devices and has for years, but the RPi didn't even recognise it one time in 20 of trying. Without that card, I can't say that the problem it experienced was "fixed", because the other cards I have always worked.

It's certainly a big deal when you plan projects around having a USB-compatible device that actually isn't. When you set up whole electronics projects of your own that just need the RPi to sit into the middle and it doesn't recognise the hardware you're using (despite EVERYTHING else doing so). It's also a problem if, say, you're a school and randomly 10% of the things you try (or buy) to use with the RPi just don't work at all.

This is a problem, that's been present on the forums and the kernel bug-tracker for months, and we're no closer to a fix *today* than we were when they were first reported. My RPi is in a box until there's a firmware update which states that this problem may be improved / fixed. It has been for weeks now. Without USB it's a bit useless for my projects. Hell, last week I put it into the attic because I can't do anything with it yet and all the associated hardware was in my way.

This is a problem. It's now been admitted. One person "on the team" has now said unofficially what they think the cause is. There's still no sign of a fix or even a suggestion as to what form the fix could take (reducing interrupt latency is a bit of a dark-art, especially in custom systems). In the meantime, people like me have been asking for months for someone to look into it and had non-working hardware in that time. Sure, if you want a device that views SD card contents on a HDMI TV, you could knock one up with a RPi. I have, after various faffing about with reporting SD card compatibility problems, done just that - including using a USB mouse and keyboard (of a particular model that *did* work). But USB is present on both models and still does not work for everyone, or for all the devices it should. As far as my project and some of the hardware I need to use are concerned, the USB port on the RPi doesn't exist, which brings everything to a grinding halt. And if the RPi had been sold without a USB port, I wouldn't have touched it for my project because of that.

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

Re: USB - the Elephant in our Room

Thu Aug 09, 2012 12:54 pm

Still no info about this issue on http://www.raspberrypi.org/.
Do you care about this so that more people unnecessary spend money?

Please answer!

bredman
Posts: 1415
Joined: Tue Jan 17, 2012 2:38 pm

Re: USB - the Elephant in our Room

Thu Aug 09, 2012 1:06 pm

sulge wrote:Still no info about this issue on http://www.raspberrypi.org/.
Do you care about this so that more people unnecessary spend money?

Please answer!
The goal of the Raspberry Pi foundation is to promote computing education for young children. The hardware/software is only a minor stepping-stone in their long-term goal. They have produced a computer which is capable of working with a keyboard and mouse and is suitable for programming.

Anything else is outside the scope of the requirements for the hardware. If you want to add 5 serial ports, then you are free to try it and see if it works or not. Nobody ever promised that it would work.

The Raspberry Pi foundation only has one part-time employee. They do not have the time to respond to spoiled ungrateful people who are not in any way advancing the goals of the foundation.

You bought a development version of a new product. You pushed it far beyond its stated goals. It failed. Live with it.

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

Re: USB - the Elephant in our Room

Thu Aug 09, 2012 1:07 pm

sulge wrote:Still no info about this issue on http://www.raspberrypi.org/.
Do you care about this so that more people unnecessary spend money?

Please answer!
I have answered. We do care. We know there is a problem. People are working on it.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

Return to “Troubleshooting”

Who is online

Users browsing this forum: BangoSkank46290, TrantorT and 50 guests