sleep lack
Posts: 19
Joined: Thu Mar 08, 2012 3:33 pm

Re: USB redux

Tue Feb 05, 2013 9:44 pm

(more testing).... audio OK with BT dongle directly connected to the pi USB, I've tried 2 different hubs, worked OK on one, not on the other, seems to be an intermittent thing.

MastaG
Posts: 11
Joined: Fri Jun 08, 2012 8:14 am

Re: USB redux

Wed Feb 06, 2013 1:02 am

gsh wrote:To date I've not looked at isochronous transfers at all I've mainly been looking at low/full speed interrupts transfers.

Once I've got those sorted then I'm going to look into isochronous (starting with high speed)

Gordon
Thanks Gordon,

Do you have a blog or something to keep up posted?

doobster
Posts: 5
Joined: Sun Feb 03, 2013 8:33 pm

Re: USB redux

Wed Feb 06, 2013 6:28 am

spiliot wrote:
Doobster wrote:I installed your Kernel, but I wonder if you compiled your kernel without RAID support.
As far as I can remember I imported the (then) current kernel options, so if it's missing some functionality it means it wasn't there in my system in the first place.
Cool. I was going to use the Pi for a backup solution with 8 drives, but the USB resets have stopped me in my track. I wonder when we'll get to see your fix in the mainstream release.

doobster
Posts: 5
Joined: Sun Feb 03, 2013 8:33 pm

Re: USB redux

Mon Feb 11, 2013 4:16 am

spiliot wrote:
Doobster wrote:I installed your Kernel, but I wonder if you compiled your kernel without RAID support.
As far as I can remember I imported the (then) current kernel options, so if it's missing some functionality it means it wasn't there in my system in the first place.
Do you know if your change to the USB driver has been accepted into the common kernel download from this web site? If not, are you willing to share the fix?

M33P
Posts: 199
Joined: Sun Sep 02, 2012 1:14 pm

Re: USB redux

Mon Feb 11, 2013 9:32 pm

I've gotten a pile of Model As to play around with but so far the experience has been a bit disastrous.

On devices with non-periodic endpoints only, I get horrendous breakage of the kernel up to and including a crash.

Steps to reproduce:
1) Plug a pendrive in
2) cat /dev/sda1 > /dev/null
3) after 3 seconds, kernel OOPS

or

1) Plug RT5370 wifi dongle in (uses rt2800usb driver, has only BULK endpoints)
2) Either leave it for 40 minutes or start a wlan transfer
3) OOPS

If I do the same test with the device plugged in via a hub, problem goes away.
Can someone with a model A replicate my tests with e.g. a USB drive?

sej7278
Posts: 249
Joined: Tue Jan 22, 2013 6:43 pm

Re: USB redux

Mon Feb 11, 2013 10:22 pm

M33P wrote:I've gotten a pile of Model As to play around with but so far the experience has been a bit disastrous.
...
If I do the same test with the device plugged in via a hub, problem goes away.?
isn't it pretty much accepted that you have to use a powered hub to get any kind of stability for usb, especially with wifi dongles?

i was kind of hoping that the model-a would have less usb issues than the model-b as it doesn't share the bus with ethernet and only has one port (so no internal hub).

i'm planning on using a wifi dongle, dac and speakers via a powered hub on a model-a, so would be interested to see if we still have an elephant in the room.

on a related note, how are you finding general performance of the 256mb model with linux?

richardp
Posts: 117
Joined: Thu Jan 12, 2012 11:46 am

Re: USB redux

Tue Feb 12, 2013 5:29 pm

Any light at the end of the USB tunnel?.... the USB performance/data loss scuppers my projects completely.

R
RaspberryPi's galore
Solid run CuBox
ODroid U2

doobster
Posts: 5
Joined: Sun Feb 03, 2013 8:33 pm

Re: USB redux

Thu Feb 14, 2013 4:28 am

I have been testing the new release of Wheezy Raspbian from 2/9/2013 and it appears to have solved my USB issues with my 8 drive USB RAID configuration (2x4). Prior to this release I was getting disconnects and mdadm would stop rebuilding the array. This occurred every time after just about 2 minutes. It's been about an hour and I haven't had a single error. It looks like my Raspberry backup solution will finally do what I intended it to. Thanks to the contributors and bug resolvers.

doobster
Posts: 5
Joined: Sun Feb 03, 2013 8:33 pm

Re: USB redux

Fri Feb 15, 2013 4:29 am

doobster wrote:I have been testing the new release of Wheezy Raspbian from 2/9/2013 and it appears to have solved my USB issues with my 8 drive USB RAID configuration (2x4). Prior to this release I was getting disconnects and mdadm would stop rebuilding the array. This occurred every time after just about 2 minutes. It's been about an hour and I haven't had a single error. It looks like my Raspberry backup solution will finally do what I intended it to. Thanks to the contributors and bug resolvers.
Just an update. It's been almost 24 hours and my array is 37% built with zero errors logged.

sej7278
Posts: 249
Joined: Tue Jan 22, 2013 6:43 pm

Re: USB redux

Fri Feb 15, 2013 8:48 am

doobster wrote:
doobster wrote:I have been testing the new release of Wheezy Raspbian from 2/9/2013 and it appears to have solved my USB issues with my 8 drive USB RAID configuration (2x4). Prior to this release I was getting disconnects and mdadm would stop rebuilding the array. This occurred every time after just about 2 minutes. It's been about an hour and I haven't had a single error. It looks like my Raspberry backup solution will finally do what I intended it to. Thanks to the contributors and bug resolvers.
Just an update. It's been almost 24 hours and my array is 37% built with zero errors logged.
probably more down to the 3.6 kernel than any fixes to the usb subsystem which i don't believe have been published yet.

adam van gaalen
Posts: 32
Joined: Sun Jul 01, 2012 11:51 am

Re: USB redux

Fri Feb 15, 2013 12:02 pm

I was happy to read that at least some people now have a working USB-world.

In a hurry I supplied the new Wheezy release to my 256 MB model B Raspberry Pi and installed the sispmctl software, which is required to be able to control my Gembird Silvershield boxes.

Alas... Sorry to say that the software still hangs my Rpi in just a few seconds.

M33P
Posts: 199
Joined: Sun Sep 02, 2012 1:14 pm

Re: USB redux

Sat Feb 16, 2013 12:00 am

sej7278 wrote:
doobster wrote:
doobster wrote:I have been testing the new release of Wheezy Raspbian from 2/9/2013 and it appears to have solved my USB issues with my 8 drive USB RAID configuration (2x4). Prior to this release I was getting disconnects and mdadm would stop rebuilding the array. This occurred every time after just about 2 minutes. It's been about an hour and I haven't had a single error. It looks like my Raspberry backup solution will finally do what I intended it to. Thanks to the contributors and bug resolvers.
Just an update. It's been almost 24 hours and my array is 37% built with zero errors logged.
probably more down to the 3.6 kernel than any fixes to the usb subsystem which i don't believe have been published yet.
Allow me to express my disdain: "lol"

The changelog from 3.2.27+250 to 3.6.11+375 is extremely long (just counting the rpi fixes unrelated to the mainstream kernel). Aside from my [patch] to the USB driver, there have been multiple additions to the smsc ethernet driver and in the mainline kernel there has been a rework of handling of various HID devices.

There are still bugs in the driver. Some more severe than others.

ivospi
Posts: 5
Joined: Mon Sep 24, 2012 5:14 am

Re: USB redux

Mon Feb 18, 2013 1:41 am

Don't know whether this is the right thread, but I'm having trouble with a wifi access point appearing to go to sleep for periods of 5-20 seconds in the middle of transferring data. I am wondering if it is a usb issue in so far as interrupts not being serviced on occasions. The adapter has an rt3072 chip using rt2800usb / cfg80211 driver. The AP appears to be working well and then all of a sudden traffic will stop for the above delay and then start again. When I start hostapd in either g or n mode, with no traffic over wifi, interrupt rates are around 300-400/s. If I enable WMM the interrupt rate jumps to over 8000 even with no data traffic over the wifi link. The same thing happens if I stop hostapd under some circumstances or remove the adapter from the usb connector - the interrupt rate jumps from say 400 to 8100, and stays there. I can't do anything to lower the rate. lsusb shows the driver stuff is still loaded even though the adapter has been removed - I guess it would have to be if the interrupts are still occurring.
Any ideas anyone or should I put this in another thread?

paul42
Posts: 26
Joined: Mon Nov 26, 2012 5:38 pm

Re: USB redux

Mon Feb 18, 2013 3:57 pm

M33P wrote:The changelog from 3.2.27+250 to 3.6.11+375 is extremely long (just counting the rpi fixes unrelated to the mainstream kernel). Aside from my [patch] to the USB driver, there have been multiple additions to the smsc ethernet driver and in the mainline kernel there has been a rework of handling of various HID devices.

There are still bugs in the driver. Some more severe than others.
Can you confirm if your patch was in 3.6.11+371?

I was still having problems with the PL2303 using 371, after anything from 6 - 48 hours, am currently testing with 375.
.

adam van gaalen
Posts: 32
Joined: Sun Jul 01, 2012 11:51 am

Re: USB redux

Mon Feb 18, 2013 4:09 pm

So that's why I did not discover any improvement over the previous Wheezy release...
2013-02-09 has kernel 3.6.1+#371 while the one that paul42 uses (and appears to be better) is 375???

paul42
Posts: 26
Joined: Mon Nov 26, 2012 5:38 pm

Re: USB redux

Mon Feb 18, 2013 4:26 pm

adam van gaalen wrote:So that's why I did not discover any improvement over the previous Wheezy release...
2013-02-09 has kernel 3.6.1+#371 while the one that paul42 uses (and appears to be better) is 375???
I wont get excited for a bit yet. Currently at 54 hours uptime & all ok, thats only a bit longer than #371 achieved. Just done another update on my second Pi & notice we are now up to #377 so thats my next test if this fails.

I am testing with a multithreaded Python 3 prog that has seperate threads reading an 8 chan ADC, 13 GPIO's, writing to a 4 x 16 LCD using the onboard serial port and a Nokia phone using the PL2303 USB cable for sending & receiving sms's. I read the phones inbox every minute test the sms & act on it if the correct number & keyword is received, send a status text once per day and send texts when events happen due to GPIO inputs or ADC inputs going out of a preset range.

paul42
Posts: 26
Joined: Mon Nov 26, 2012 5:38 pm

Re: USB redux

Tue Feb 19, 2013 4:18 pm

Well it just rebooted, watchdog i am sure. Nothing in the logs. Annoying as i wasn't looking at the monitor just saw it go black out of the corner of my eye.

Still i it managed 77.5 hours, longest so far! On to the next updated version +377 now then, sigh!

All a bit annoying as i have a system working on an old dell laptop with Ubuntu using an Arduino as the data gatherer which has been up now for over 5 months reliably sending me sms's. Got a bit to go before i replace that methinks :mrgreen:

M33P
Posts: 199
Joined: Sun Sep 02, 2012 1:14 pm

Re: USB redux

Tue Feb 19, 2013 8:18 pm

paul42 wrote:
M33P wrote:The changelog from 3.2.27+250 to 3.6.11+375 is extremely long (just counting the rpi fixes unrelated to the mainstream kernel). Aside from my [patch] to the USB driver, there have been multiple additions to the smsc ethernet driver and in the mainline kernel there has been a rework of handling of various HID devices.

There are still bugs in the driver. Some more severe than others.
Can you confirm if your patch was in 3.6.11+371?

I was still having problems with the PL2303 using 371, after anything from 6 - 48 hours, am currently testing with 375.
.
Finger failure - the patch is included in 3.6.11+371.

Can you try to post a stacktrace of a crash? It may help if you leave a monitor plugged in and disable kdb by removing kdboc=ttyAMA0,115200 from /boot/cmdline.txt and setting a new parameter kdb=off

paul42
Posts: 26
Joined: Mon Nov 26, 2012 5:38 pm

Re: USB redux

Wed Feb 20, 2013 5:39 pm

M33P wrote:Can you try to post a stacktrace of a crash? It may help if you leave a monitor plugged in and disable kdb by removing kdboc=ttyAMA0,115200 from /boot/cmdline.txt and setting a new parameter kdb=off
The AMA0 line was already out as i am using the serial port for my lcd. Have put the kdb setting in. Currently testing again with #377. I have disabled watchdog (i think lol) to stop the reboot & the monitor is displaying TOP + my Python prog in terminal windows in the gui, so maybe i will see something there if the cpu max's out at 100% which i suspect is causing the reboots via watchdog. I havn't been able to find any logging info relating to the reboot in any of the log files.

I power the phone cable using a modified usb cable where i have interrupted the red +5v wire & feed it directly from my +5v psu except it goes via a normally closed relay contact. My prog switches this relay on once an hour for 5 secs to make the pi disconnect & reconnect the usb interface. I thought that might help but doesn't seem to make any difference. Just to be clear my +5v supply is good. I have a powered hub with keybourd & mouse plugged in this time. Last failed run i only had the phone plugged in. Phone takes one of the pi's usb ports, hub the other.

I will post my progress. If the mods want this in a seperate thread let me know.

paul42
Posts: 26
Joined: Mon Nov 26, 2012 5:38 pm

Re: USB redux

Wed Feb 20, 2013 8:57 pm

Crashed after less than 3 hours. Didn't reboot as watchdog was off. Screen showed cpu at 35%, mem ok. My python prog had called gnokii (which i use to read/write the sms's) & received the initial gnokii response with it's version number after which i expect the actual result gnokii gets from the phone. This didn't arrive so i conclude that the crash occurs when gnokii talks to the phone via the usb serial adapter (PL2303).

I use the same version of gnokii with the same Python code on my Ubuntu system which is rock solid so i am pretty sure this is caused by the Pi usb sub system. Presumably others are still having issues & not just me? I would love to find it's something i am doing, but not so far.

Not sure what to do now, i assume gsh & M33P are still working on usb bugs? Just hope that a solution is found or that's 3 months somewhat wasted (still learnt a lot :lol: )

User avatar
with ice cream
Posts: 175
Joined: Mon Jul 30, 2012 7:25 am

Re: USB redux

Wed Feb 20, 2013 9:10 pm

I really wish Gordon or Liz would give us an update. I had to revert back from a recent attempt with a current firmware when I my Pi got stuck because of errors related to unclaimed usb devices.

kumme74
Posts: 6
Joined: Thu Sep 27, 2012 6:40 pm

Re: USB redux

Wed Feb 20, 2013 9:18 pm

with ice cream wrote:I really wish Gordon or Liz would give us an update. I had to revert back from a recent attempt with a current firmware when I my Pi got stuck because of errors related to unclaimed usb devices.
I agree with you after two weeks an update would be nice. They may be too busy setting up their new office. ;-)

All USB fixes till now did not solve the severe hang ups. The only solution is the dwc_otg.speed=1 switch slowing down the USB controller to Full Speed and breaking keyboard so this is not nearly a solution.

BTW: Fedora 18 and ARM Linux have both the same problem. It seems that FreeBsd works but setting up this at this early stage is beyound my skils.

Klaus

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

Re: USB redux

Thu Feb 21, 2013 7:46 am

Just don't use bleeding edge firmware in the hope things have been fixed even without announcement. I bet Gordon will come back to us when a significant improvement has been made.
Rocket Scientist.

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

Re: USB redux

Thu Feb 21, 2013 9:34 am

kumme74 wrote:
with ice cream wrote:I really wish Gordon or Liz would give us an update. I had to revert back from a recent attempt with a current firmware when I my Pi got stuck because of errors related to unclaimed usb devices.
I agree with you after two weeks an update would be nice. They may be too busy setting up their new office. ;-)

All USB fixes till now did not solve the severe hang ups. The only solution is the dwc_otg.speed=1 switch slowing down the USB controller to Full Speed and breaking keyboard so this is not nearly a solution.

BTW: Fedora 18 and ARM Linux have both the same problem. It seems that FreeBsd works but setting up this at this early stage is beyound my skils.

Klaus
When news is available it will be posted! If there is no news, there is, strangely, no news, so little point is having a post that say 'no news'
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
“I own the world’s worst thesaurus. Not only is it awful, it’s awful."

BerryPicker
Posts: 177
Joined: Tue Oct 16, 2012 3:03 pm
Location: The East of England

Re: USB redux

Thu Feb 21, 2013 11:13 am

Webcam works better with USB or LAN activity.
These are the symptoms I'm experiencing.

Without a LAN (wired) network, guvcview shows only an initial static picture, but:
- jerky moving pictures can be seen when the mouse is raced across the guvcview control panel and
- a short bust of jerky moving pictures can be seen if lsusb is typed to a terminal, and also if a disconnected hub (with keyboard and mouse) is reconnected.

With a LAN (wired) network, guvcview shows an initial static picture, but then occasional new pictures or short bursts of movement. The bursts of movement are longer and occur more often when the mouse is raced, when the web is browsed, and when the MJPEG image size and frequency is set to maximum (969x720 @ 15 fps).

These findings suggest that things are working better when there's more activity. This may appear counter to expectations, but the experience does seem consistent with other reports.

Set up:
2013-02-09-wheezy-raspbian with dwc-otg-bcd 3.6.11+
Camera: Logitech Quickcam Pro for Notebooks 046d:0991
Wired USB keyboard and mouse connected via USB hub
USB camera directly connected with separate isolated power feed

Other checks:
No difference in behaviour when connecting camera via USB hub
Alsa records the camera sound without dropout.
Uvcdynctrl works as expected

Here's hoping these findings help those giving their time to resolve the problem.

Return to “Troubleshooting”