blavery
Posts: 95
Joined: Sun Jul 01, 2012 2:57 am
Location: QLD. Australia

Re: USB - the Elephant in our Room

Sun Jul 29, 2012 11:55 pm

I've been following a hunch (for which some clues have appeared on these forums earlier). I have been trying to keep all USB V1.1 devices off my pi. Both 12M and 1.5M speeds. Trying to use only USB2.0 (480M speed).

But hold on. Keyboards and mouses are USB V1.1 (usually?? always??). They are hard to dispense with. And the pi seems stable enough with simply those two connected, all else (read power) being equal. The troubles seem to start as other devices (V1.1 and V2.0?) are added to the USB system.

OK, I've set x11vnc self-loading. So I can run headless from VNC on my (mint debian) PC. I tend to set my main adls/wifi router to assign reserved IP to devices I know about, so the pi comes up as a predictable IP address.

So: NO PHYSICAL KBD, NO MOUSE on my pi. :(

Test my 5370 / rtl2800usb wifi adaptor (brand "N" from ebay). Installed wicd. Works clean. Wifi auto starts if the lan cable is out, so I now have TWO ways to run headless. Success #1. (Prev impossible.) :D

Test M5632 host-to-host Link cable (Ali Corp 0402:5632). 480mA - so MUST go on the hub. It loads, using driver cdc_subset. I assign it an IP using ifconfig (different subnet). Plug other end to my debian PC. Again use ifconfig to assign it a complementary IP. And wow, vnc and samba can talk over the cable to my pi. Success #2. (Prev impossible.) :D

Test #3: Huawei E169 wireless broadband. Installed wvdial and usb-modeswitch. Fetched SAKIS3g as a clumsy and slow "gui" to get dongle running, and wow again, up it comes. Success #3. :D

These were all cases that would lock up my pi or drop mouse or lan or other device.

Where to from here? Try many of these all together. Try other devices. Then go back trying to re-introduce V1.1 devices. Maybe it's all a false trail, but it has shown promise so far. Not enough hours in a day. Anyone else have similar findings?

blavery
Posts: 95
Joined: Sun Jul 01, 2012 2:57 am
Location: QLD. Australia

Re: USB - the Elephant in our Room

Mon Jul 30, 2012 1:42 am

Hmmm,
I see that USB V2.0 mouses and keyboards ARE out there. All the ones in my place happen to be V1.1. (Even my cute new iPazzPort tiny combo wireless kbd/mouse is USB V1.1 / 1.5M).

So is anyone out there with both 1.1 and 2.0 available, able to test if THAT makes a difference to adding other USB devices to their pi?
=====================================

btw, tools I use for checking USB version & vendor codes & loaded drivers are simply ones like: "lsusb" "lsusb -t" "usb-devices"

lb
Posts: 263
Joined: Sat Jan 28, 2012 8:07 pm

Re: USB - the Elephant in our Room

Mon Jul 30, 2012 1:52 am

I'd be interesting to know if only low speed (1.5 Mbps) devices are affected by packet loss, or if it's both low speed and full speed (12 Mbps).

fredjam
Posts: 83
Joined: Thu Jul 19, 2012 3:19 am
Location: London UK

Re: USB - the Elephant in our Room

Mon Jul 30, 2012 2:59 am

The people who post here saying that its only other people with 'crap' keyboards or 'cheap' keyboards
who have problems are just not listening. Like them I have a working system so I could also bury my
head in the sand.The fact is that many usb keyboards and mice from mainstream makers just do not
work with the pi and this could be a real problem when it goes on general release.

Children will not understand why .a keyboard/mouse that works perfectly well with the family pc
causes so many problems on the pi nor will they have the money to replace them. There is a list
of hardware that is thought to work with the pi and a list of hardware that is thought not to work.
When I buy a usb keyboard to work with my PC I expect any usb keyboard to work and they do.
Even the cheap trashy ones you buy on ebay work. We need to try to get the pi to the same
level of tolerance as the average PC if it is going to be a success. So lets ignore the people
who bury their head in the sand..

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

Re: USB - the Elephant in our Room

Mon Jul 30, 2012 3:01 am

From my (limited) understanding low and full speed devices identify themselves to the host via their own pull up resistors to either one of the data buses on the USB line. These resistors can be implemented via software / hardware after a delay to e.g. allow a microcontroller in a device to initalise before the host realises that a connection has been made. High speed devices will connect as a full speed device (via a resistor from D+ to 3V3), then negotiate a high speed connection and disconnect the full speed pullup resistor so that the data lines are balanced and high speed comms can commence.

Probably not helpful, but I'm thinking aloud in case it jogs any memories.

blavery
Posts: 95
Joined: Sun Jul 01, 2012 2:57 am
Location: QLD. Australia

Re: USB - the Elephant in our Room

Mon Jul 30, 2012 4:58 am

If it were true (and so far it is a long way from proven, only suggested as a possibility)
that the pi usb issues arose only (mainly?) if V1.1 low speed devices or V1.1 any speed were being used,
then to be able to simply state that,
would be one step towards (1) avoiding frustrations (2) tracking down a fix.

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

Re: USB - the Elephant in our Room

Mon Jul 30, 2012 6:25 am

The problem is due to split transactions not completing in a timely fashion. So this effects any LOW (1.0) or FULL (1.1) speed devices (generally keyboards and mouse's etc.)

Currently tracking the problem down and have thought on at least two occasions I've got it fixed, but turns out it wasn't!!!

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

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

Mon Jul 30, 2012 6:29 am

This sounds like a good avenue of investigation I've seen no issues but as I only use keyboard and mouse and a wired 10baseT ethernet

I was unlikely to have issues and the keyboard and mouse are as cheap as they come.

Maybe the caveat is if you want to run a basic system hard wired USB is not an issue if you go to wireless or things like a wirless stick drive or other equipment on a hub then you are going to see problems.

mabe it would be interesting to set up a survey of setups so we can gather some raw data for analysis and on the back of this capture some info to help with the hardware theft issue highlighted in another thread.

A flat table database with entries for
Forum name
mac
keyboard
mouse
wired y/n
wireless dongle model and number
hub model and number
composite y/n
hdmi y/n
ssh y/n
sd card image
other
sucess/fail

[edit]
I'm tot talking compulsory here just a feedback mechanisim to capture some raw data
[/edit]
Last edited by Jim JKla on Mon Jul 30, 2012 6:55 am, edited 2 times in total.
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

blavery
Posts: 95
Joined: Sun Jul 01, 2012 2:57 am
Location: QLD. Australia

Re: USB - the Elephant in our Room

Mon Jul 30, 2012 6:47 am

A voice of respected authority. Thank you Gordon.

godFather89
Posts: 150
Joined: Fri May 18, 2012 9:40 am
Location: Timisoara, RO

Re: USB - the Elephant in our Room

Mon Jul 30, 2012 7:08 am


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

Re: USB - the Elephant in our Room

Mon Jul 30, 2012 7:47 am

I didn't manage to finish my previous post, as the forum editor started to act weired when the article became 2 long. I submitted it with the idea to continue in a new reply, and realised only afterwards that the post needed verification from a moderator first. So likely, my 2 posts wouldn't appear after each other making things confusing. I also couldn't review my writing anymore.

I have 4 wifi sticks with different chipsets. One is the Farnell proposed type for the Pi (Micro NEXT MN-WD152B). The others are older sticks I still had lying around. They all use different chipsets.
I added the driver for the Micro NEXT. 2 of the other sticks seem to have support in the kernel already.
With every time the same setup (using a 4 port usb hub to avoid power problems), Only my Alpha AWUS036EH stick seems to work reliable. It's using a realtek RTL8187 chipset. The Micro NEXT adapter and a dlink DWL-G122 adapter seem to work for a short period of time, but suddenly stop working, usually after generating some traffic like using a apt-get install of a package. If there is more information I should provide, please let me know.

My complains about the Forums are mostly caused by serious outstanding issues like this one not being found on one specific place. Another issue is the fact it's hard to figure out if a Forum Topic will actually provide some solutions, or if it will just let you read for the 90th time that you might have a power (voltage) issue.

The sound issue is a bit a personal disappointment, since I was planning to use the pi as a wireless dlna audio streamer and internet radio connected to the "line in" of my hifi.

I hope the issues will get fixed soon. I wished I could help with that , but I guess I am still to much a linux noob for that.

lostintime
Posts: 29
Joined: Sun Jul 22, 2012 7:30 am

Re: USB - the Elephant in our Room

Mon Jul 30, 2012 8:06 am

Jim JKla wrote:This sounds like a good avenue of investigation I've seen no issues but as I only use keyboard and mouse and a wired 10baseT ethernet
Do you use a USB hub? I have a wired keyboard and mouse and I'm using a hub, or at least I'm trying to. With this configuration the keyboard appears to work fine until X starts, then Ethernet dies abruptly. Unplugging the mouse before X is started avoids this, but this is hardly a usable workaround since plugging it back in later still results in Ethernet going down.

I haven't tried eliminating the hub and plugging the keyboard and mouse directly into the Pi. I'm going to try that next. Doing this might solve the Ethernet problem but it would mean no other USB peripherals could be used since both ports on the Pi would then be occupied. Considering this possible "solution" would severely limit what can be done with the Pi it simply isn't good enough. Broadcom, are you listening?

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

Re: USB - the Elephant in our Room

Mon Jul 30, 2012 8:48 am

Not using an usb hub is not really a solution. It's a temporary workaround that might perhaps help in the understanding of the problem.
When X is running, the ethernet is dying... Perhaps this is not related to the fact it's X, but just related to the fact that the cpu load reaches 100% when building up the graphic screen?

Gordon seems to be investigating the issue, As he states that the problem is caused due to split transactions not completing in a timely fashion. Is there a place where we can follow the progress on that issue?
If I remember well, a split transaction is a usb transaction containing 2 much data 2 transfer within the 1ms USB timeframe?
So the issue is the data produced by all the usb clients, the ethernet connection being one of them?
Is there a logfile we could examine that shows us when the erratic behavour is starting to happen?

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

Mon Jul 30, 2012 10:11 am

I do have a hub but I have never needed to use it yet when I doo I shall report.

I have also run ssh with only power and network again with no issues.
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

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

Re: USB - the Elephant in our Room

Mon Jul 30, 2012 11:29 am

Although some people have managed to connect both a keyboard/mouse as well as a Wi-Fi USB adapter directly to their RasPi, it is generally accepted that a powered hub is necessary for this purpose, and it seems that is where the problems start... particularly if both devices have different USB 'speeds', although how you check this I am not quite sure, but I would imagine that 'listusb' might help!

I know that this particular subject has been mentioned in many other threads also, and I believe that the 'developers' are currently working on the problem, which does seem to be giving grief to an ever increasing number of users.

One concern which is now being expressed that this is a 'hardware' rather a 'software' problem, which possibly cannot be resolved on the current production models, which I certainly hope will not prove to be the case.

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

Re: USB - the Elephant in our Room

Mon Jul 30, 2012 11:56 am

It looks like most grief is caused because people don't know that dev's are working on the problem.
I am guilty as well, as I haven't checked the raspberry irc channel yet to see if the dev's hang out there.
This brings us back to the Forum and the fact it's difficult to retrieve usefull information from it..
But complaining isn't helpfull either.
So next thing I am wondering is where the information comes from that it's a mix of low speed and high speed usb devices causes problems? Most people using multiple devices will have a keyboard and mouse among them, so it's logical that most detected problems will be with a keyboard and mouse as well. Since the pi only has 2 usb ports (with very limited supply), it's logical that in such a setup people will add an usb hub. I don't think there exist usb mice and keyboards that are not low speed usb devices, but besides those and usb joysticks, I can't think of much other low speed devices that could prove the theory (sorry for calling it a theory, but I think it's just that.)
My setup without keyboard and mouse prove troubles with different wifi sticks (And I doubt those are low speed devices) Since the wifi drivers are different (as the problematic sticks use different chipsets), and the sticks are different, it looks more like the issue is the usb host driver or the hub chip. I read about the experiment that removed the hub-usb-ethernet chip. But this brings the number of usb devices to 1 again. So the fact it works doesn't necessairily mean that the problem is with that chip. Connecting 2 hubs to the remaining port, and creating a normal troublesome setup that way could prove the involvment of that chip. If it's running stable all the time with that setup, its something with the hub chip. I don't have a spare Pi to demolish that way for testing. I can try to disable the usb2ethernet to find out if that makes a difference for the wifi devices. You will likely only use both if you use the Pi as access point or router.

User avatar
piglet
Posts: 915
Joined: Sat Aug 27, 2011 1:16 pm

Re: USB - the Elephant in our Room

Mon Jul 30, 2012 1:57 pm

The latest I've seen is that it looks like it could be a Debian bug. See http://www.raspberrypi.org/phpBB3/viewt ... 461#p94461

If this is the case it's quite exciting as this means that there is a possibility of a fix from the linux community, rather than a hardware problem which might have required a board revision to correct.

I wish I knew how to use/configure archlinux, as the driver there is reported to work. Every time I've tried, failed researched and then asked for help I've just been met with "RTFM Nub. Arch isn't for noobs". All I can say is that the FM isn't comprehensible to a noob.

crozone
Posts: 12
Joined: Mon Jul 30, 2012 11:27 am

Re: USB - the Elephant in our Room

Mon Jul 30, 2012 3:44 pm

I would bet all these issues come down to input power, and the ability for the pi to provide 5V to all it's USB ports including the inbuilt lan adapter. The problem is, you're using a 5V power pack behind a long usb cable and protection circuitry, which has a fairly high resistance. The more current the pi and it's peripherals pull through that wire, the higher the voltage drop over that wire is going to be. Even if you have some super PSU that will hold 5V at 10A, it's only going to hold 5V at _it's_ USB plug. When it finally gets to the 5V rails on the RasPi, who knows what power it's going to be. I can tell you now it's going to be less than 5V, even with the shortest USB cable you can find.

My solution to this at the moment is to power the pi directly via the GPIO pins 1 and 3 with a proper 5V power pack (not a usb pack), and it works much better than the stock USB solution. But really this is a makeshift fix and the pi seriously needs it's own reliable, on-board 5V generator. Then, that can regulate the power and pull as many amps as it needs from the wall adapter, and it won't matter when the voltage drops by 0.3 at the usb power input.

The worst thing about this is, many bugs may be caused by read/write errors to the sd card swap or usb issues (kernel panics and such), all because of power, but meanwhile users are trying to debug their software when that's not really the problem at all.

drgeoff
Posts: 10663
Joined: Wed Jan 25, 2012 6:39 pm

Re: USB - the Elephant in our Room

Mon Jul 30, 2012 6:04 pm

crozone wrote:I would bet all these issues come down to input power, and the ability for the pi to provide 5V to all it's USB ports including the inbuilt lan adapter.
How many $, £ or whatever are you willing to stake on that? I think there are quite a few readers who would be willing to take you up on it.

lb
Posts: 263
Joined: Sat Jan 28, 2012 8:07 pm

Re: USB - the Elephant in our Room

Mon Jul 30, 2012 6:12 pm

There is good proof out there that this is not just a power issue.

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

Re: USB - the Elephant in our Room

Mon Jul 30, 2012 7:19 pm

I measured the voltage of my adapter arriving at the pi. It's still 5.1V between TP 1 and 2.
Besides that, I power my usb devices with a powered hub.
So, why does the Farnell recommended wifi adapter stops working, while the Alpha extended range one works fine, altough it's consuming more power due to it's higher output power.
There is more going on than just our adapters not providing enough Voltage.
Placing a 5 volt regulator on the board would make it more expensive and incompatible with the current power adapters, unless you would create a buck / boost supply. This would be overkill for the Pi if you ask me.
The design could improve with another solution for the usb port polyfuses, and it would also be better if the primary polyfuse only protected the Pi, and not the usb ports as well. It would keep the current trough that fuse independant of the usb devices connected to the usb ports. Further on, 2 supply enough current for 2 usb ports, it would need to be 2 * 500mA + 700mA = 2A.
Let's hope the bug is found soon, and let's pray it's not a hardware one. (software patches way easier.)

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

Mon Jul 30, 2012 8:13 pm

Ok new setup

Belkin F5U010 7port hub powersupply to the hub 6v 4Amp

Using port 1 to power the Rpi
Using Port 2 Asda Spart Price USB optical mouse
Using Port 3 Logitech Ultra Flat USB Keyboard
Using Port 7 Kingston 16gb Data traveler

Pi USB Uses Hub root port
Wheezy on 4g Sandisk SD card
Startx is able to read files on the Kingston USB Data Traveler Automatically picked up by File manager
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

Badger101
Posts: 36
Joined: Tue Jun 12, 2012 1:26 pm

Re: USB - the Elephant in our Room

Mon Jul 30, 2012 10:10 pm

crozone wrote:I would bet all these issues come down to input power, and the ability for the pi to provide 5V to all it's USB ports including the inbuilt lan adapter.
I run mine with one of these on a PCB powering the Pi through the header pins:
http://uk.rs-online.com/web/p/dc-dc-pow ... s/6617544/

I've also removed the USB polyfuses and fitted these instead:
http://uk.rs-online.com/web/p/non-reset ... s/6242979/
Which are sitting up on the Pi's PCB so that I can hard wire them from the 5V Reg.

I have the same problem with the USB and can rule out the 5V being the problem.

Badger.

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13003
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: USB - the Elephant in our Room

Tue Jul 31, 2012 12:25 am

Ok, just to confirm, these fuses (1206, 750mA) are, according to the datasheet just 0.33 Ohm, which would mean that when you draw 100mA through the port, the voltage drop should be just 0.1 x 0.33 = 0.033 Volt, which should in most cases be acceptable. Its still not 0.0 Volt, but as long as you want to add fuses you will by nature have voltage drop, and these are much better than what was fitted.

lostintime
Posts: 29
Joined: Sun Jul 22, 2012 7:30 am

Re: USB - the Elephant in our Room

Tue Jul 31, 2012 5:02 am

obcd wrote:When X is running, the ethernet is dying... Perhaps this is not related to the fact it's X, but just related to the fact that the cpu load reaches 100% when building up the graphic screen?
I thought so too at first, but apparently Ethernet also dies when you start GPM, i.e. it's caused by something related to mouse usage, not CPU load. See the second and third post here: https://github.com/raspberrypi/linux/issues/29

Return to “Troubleshooting”