kyelo
Posts: 64
Joined: Sun Oct 23, 2011 6:31 pm

Re: USB packet loss.

Fri Sep 21, 2012 9:09 pm

This is just to confirm that using "dwc_otg.speed=1" in /boot/cmdline.txt, I was able to do VOIP with a Logitech USB headset plugged into a powered USB 2.0 hub. The sound quality was quite acceptable.

As a test, I changed the /boot/cmdline.txt statement to "dwc_otg.speed=0", rebooted, and as before the voice in the VOIP test echo chamber lasted only a second or two before evaporating; and as before dmesg reported a reset of device # of the USB headset (it also reset the keyboard/mouse dongle, which was plugged into the same USB hub).

It seems we are making some progress, thanks to DOM and Gordon It would be nice to eventually get back up to USB 2.0 speeds however.

ddv2005
Posts: 23
Joined: Fri Jul 20, 2012 2:17 am

Re: USB packet loss.

Fri Sep 21, 2012 9:52 pm

kyelo wrote:This is just to confirm that using "dwc_otg.speed=1" in /boot/cmdline.txt, I was able to do VOIP with a Logitech USB headset plugged into a powered USB 2.0 hub. The sound quality was quite acceptable.
"dwc_otg.speed=1" => full speed only (no high speed) => no split transactions => no problem
kyelo wrote:It seems we are making some progress, thanks to DOM and Gordon It would be nice to eventually get back up to USB 2.0 speeds however.
What progress do you mean? I don't see any progress for USB audio. It still does not work on high speed as before.

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

Re: USB packet loss.

Sat Sep 22, 2012 9:04 am

Progress in general, not progress for a specific use case.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

stuii
Posts: 2
Joined: Tue Sep 25, 2012 9:05 pm

Re: USB packet loss.

Tue Sep 25, 2012 9:11 pm

I am having really serious packet dropping problems with an RTL8188CUS wireless dongle. Well over half, sometimes as many as two thirds are being dropped. A test of transferring a 128Mb file from my desktop to the Pi using scp gives an average transfer rate of 32KB/s and takes well over an hour. This sort of bandwidth is fine just for SSH but useless for anything else.

I've tried all the /boot/cmdline.txt tricks (mine is below) but they've not made a jot of difference.

Code: Select all

dwc_otg.microframe_schedule=1 dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 dwc_otg.speed=1 console=tty1 root=/dev/mmcblk0p3 rootfstype=ext4 elevator=deadline rootwait
Anybody have any more ideas? Is this a USB issue or an issue with the driver for this NIC?

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

Re: USB packet loss.

Tue Sep 25, 2012 10:57 pm

Other nic's I have tested don't have the issue.
It's hard to tell if it's the driver or the usb system. It might as well be a combination of the 2.

User avatar
yoctopuce
Posts: 21
Joined: Sat Mar 03, 2012 11:27 pm
Contact: Website

Re: USB packet loss.

Tue Oct 02, 2012 7:49 am

We have been able to successfully complete a first real world project using our modules, using "dwc_otg.speed=1". It involves is some networking (a simple web service), polling an USB sensor, a few threads running in Python, and it works now reliably (more details on http://www.yoctopuce.com/EN/article/coo ... y-pi-video).

This confirms that the current build is now usable for our needs, thanks.
We produce USB controllers, USB sensors as well as embedded USB hubs for DIY projects

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

Re: USB packet loss.

Thu Oct 04, 2012 4:03 pm

Just to say that the bluetooth audio problem I was having is similarly fixed by forcing the USB speed to 1.1 via the dwc_otg.speed=1 option. Thanks for the pointer guys.

User avatar
ttongue2012
Posts: 1
Joined: Sun Oct 14, 2012 4:36 am
Location: Niskayuna, NY
Contact: Website

Re: USB packet loss.

Sun Oct 14, 2012 4:49 am

I had problems with my wireless USB keyboard / mouse after installing a WiFi USB adapter (though it would occasionally drop keystrokes before the install). I can confirm that after eliminating all the other things discussed in this thread, the solution posted below by yoctopuce worked like a charm for me. While I'd like to have wireless faster than 12Mbps, I can totally take the hit if it means I won't go insane trying to type :)

So to summarize, I did the following:
  • Updated the firmware using rpi-update following the instructions at https://github.com/Hexxeh/rpi-update
    Edited /boot/cmdline.txt to add the dwc_otg.speed=1 entry mentioned below, forcing the speed to be USB1.1
    Rebooted and sighed with relief when I could type without missed keystrokes or furious-repeated-keystrokes.
Thanks for the fix!!!

--Tom
yoctopuce wrote:We have run some tests today to validate the tentative fixes.

First we have run rpi-update to get the latest fix. Here is my cmdline.txt and the kernel version

Code: Select all

root@raspberrypi:/home/pi# more /boot/cmdline.txt
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
root@raspberrypi:/home/pi# uname -a
Linux raspberrypi 3.2.27+ #160 PREEMPT Mon Sep 17 23:18:42 BST 2012 armv6l GNU/Linux
As expected, Gordon fix does not completely solve the issue of packet loss in this case, but the packet loss seems to happen far less frequently (I have been able to stress the PI for several minutes before I get a missing packet).

Then we have added the dwc_otg.speed=1 parameter to force USB to work only in full speed mode (speed of USB 1.1). This solved the issue. This confirms that the PI has some trouble to handle USB 1.1 devices behind an USB 2.0 hub, but forcing the USB to work in full speed mode completely solves the packet loss for our USB 1.1 devices.

Our working config:

Code: Select all

root@raspberrypi:/home/pi# more /boot/cmdline.txt
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 dwc_otg.speed=
1 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
root@raspberrypi:/home/pi# uname -a
Linux raspberrypi 3.2.27+ #160 PREEMPT Mon Sep 17 23:18:42 BST 2012 armv6l GNU/Linux

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

Re: USB packet loss.

Sun Oct 14, 2012 11:39 am

Tom, isn't it possible to connect two external hubs and use one for full and one for high speed devices? I have not tried exactly this, but connected one hub to one of the Pi's ports and a 1.1 device (mouse) to the other port. Can't measure packet losses, but haven't noticed any problems since then.
Rocket Scientist.

barty79
Posts: 1
Joined: Sun Dec 23, 2012 7:29 pm

Re: USB packet loss.

Sun Dec 23, 2012 7:36 pm

I'm having problems all the time even with latest revisions of either Archlinux or Wheezy using usb hub. My keyboard/mouse/remote control are not working because of repeating keys, lost packet, etc. I'm surprised, that it's not stated in big letter on the home page that Raspberry pi has got lots of problems with USB drivers. I would never buy it having that knowledge!!!

BobCochran
Posts: 27
Joined: Sat Dec 29, 2012 2:51 am
Location: Greenbelt, Maryland, USA

Re: USB packet loss.

Thu Jan 17, 2013 3:32 am

My testing seems to show that with the very latest Raspbian Wheezy firmware (e.g., kernel) updates, the dwc_otg.speed=1 setting is no longer needed and may even slow down USB throughput on a Model B device. The setting seems to make pocketsphinx_continuous quit.

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

Re: USB packet loss.

Thu Jan 17, 2013 6:24 am

BobCochran wrote:My testing seems to show that with the very latest Raspbian Wheezy firmware (e.g., kernel) updates, the dwc_otg.speed=1 setting is no longer needed and may even slow down USB throughput on a Model B device.
So, the Pi firmware now does handle split transactions without limiting speed?
Rocket Scientist.

User avatar
Lob0426
Posts: 2156
Joined: Fri Aug 05, 2011 4:30 pm
Location: Susanville CA.
Contact: Website

Re: USB packet loss.

Thu Jan 17, 2013 6:41 am

barty79 wrote:I'm having problems all the time even with latest revisions of either Archlinux or Wheezy using usb hub. My keyboard/mouse/remote control are not working because of repeating keys, lost packet, etc. I'm surprised, that it's not stated in big letter on the home page that Raspberry pi has got lots of problems with USB drivers. I would never buy it having that knowledge!!!
Try searching the forums for the repeating keys issue. This is usually caused by low voltage from your power supply. Also it is not clear as to whether that problem is with a seperate powered hub, or the built in hub, in your post. If it is an external hub, there are some hubs that do not work well with Raspberry Pi's. Also try posting in the troubleshooting forum for some help with the problem.

Some people are reporting problems with USB but all 5 of mine seem to work just fine. It depends on what you are trying to do with it and what you have connected to it. If I am having packet loss I am not noticing it!
512MB version 2.0 as WordPress Server
Motorola Lapdock with Pi2B
Modded Rev 1.0 with pin headers at USB

http://rich1.dyndns.tv/
(RS)Allied ships old stock to reward its Customers for long wait!

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

Re: USB packet loss.

Thu Jan 17, 2013 9:09 am

dwc_otg.speed=1 keeps the usb bus at 1.1 speed instead of 2.0 speed.
It's normal it slows down the troughput. It did that with the older kernels as well.
My 4 port usb2serial device still hangs when I access one of the serial ports, even with the latest kernels.
Maybe you have a device that now works with the improved drivers and didn't work before. It might be helpfull to post what setup we are talking about.
@barty79
According to the foundation only a minority of people is having problems. They are working on it, but the work is done by volunteers in their free time, so they can't give a time schedule when this work will be finished.

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

Re: USB packet loss.

Thu Jan 17, 2013 10:31 am

obcd wrote:dwc_otg.speed=1 keeps the usb bus at 1.1 speed instead of 2.0 speed.
It's normal it slows down the troughput. It did that with the older kernels as well.
My 4 port usb2serial device still hangs when I access one of the serial ports, even with the latest kernels.
Maybe you have a device that now works with the improved drivers and didn't work before. It might be helpfull to post what setup we are talking about.
@barty79
According to the foundation only a minority of people is having problems. They are working on it, but the work is done by volunteers in their free time, so they can't give a time schedule when this work will be finished.
There is now someone working full time on the USB driver. Still no schedule though. I'll ask him what his expectations are.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

DAFlippers
Posts: 26
Joined: Fri Aug 10, 2012 8:39 am
Location: Berkshire

Re: USB packet loss.

Thu Jan 17, 2013 10:42 am

There is now someone working full time on the USB driver. Still no schedule though. I'll ask him what his expectations are.
Great to hear. I just tested my code on latest build and the USB does appear more robust but still misses reads.

David

marshell
Posts: 1
Joined: Sun Jan 20, 2013 9:28 pm

Re: USB packet loss.

Sun Jan 20, 2013 9:59 pm

At least it does not help at all with the possible RTL8188CUS packet loss issues... Sad, but true.

cjordan84
Posts: 2
Joined: Wed Feb 06, 2013 12:14 am

Re: USB packet loss.

Wed Feb 06, 2013 4:57 pm

Using a USB Ethernet adapter (Trendnet TU2-ET100), I set up an iperf test with UDP transmission and achieved 92 Mbps average over 30 seconds with 0% loss, and I was able to repeat this test 10 times with the same results. The onboard Ethernet performs at 94 Mbps (again, using UDP over 30 seconds, repeated 10 times). I'm running the 2012-12-16-wheezy-raspbian build from the R-Pi site and I have the newer model pi with 512 MB RAM.

ozancaglayan
Posts: 1
Joined: Fri Mar 15, 2013 9:58 am

Re: USB packet loss.

Fri Mar 15, 2013 10:00 am

Hi,

I'm having quiet same troubles with a HID device. I'm using Python + libusb to read 32 bytes from the device but I'm losing some packets.

Yesterday I completely dropped libusb layer and read from /dev/* node and found out that there are no packet loss.

bendan
Posts: 7
Joined: Fri Mar 29, 2013 5:29 pm

Re: USB packet loss.

Tue Apr 16, 2013 4:31 pm

jamesh wrote:
There is now someone working full time on the USB driver. Still no schedule though. I'll ask him what his expectations are.
Any update on the progress of this effort? :?:

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

Re: USB packet loss.

Tue Apr 16, 2013 4:32 pm

Check out the USB Redux thread and the USB FIQ thread for current status.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

MichaelLenz
Posts: 3
Joined: Tue Apr 16, 2013 3:34 pm

Re: USB packet loss.

Tue Apr 16, 2013 5:24 pm

Confirm same situation.
usb 1-1.2: reset high-speed USB device number 4 using dwc_otg
Used squirrelmail for e-mail archive.
When I started fetching e-mails from pop3 server, file system many times was remounted as read only...
And last two times rootfs was unmounted with damaged FS.....

linux 3.2.27+ #307 PREEMPT Mon Nov 26 23:22:29 GMT 2012 armv6l ARMv6-compatible processor rev 7 (v6l) BCM2708 GNU/Linux

Aydan
Posts: 561
Joined: Fri Apr 13, 2012 11:48 am
Location: Germany, near Lake Constance

Re: USB packet loss.

Tue Apr 16, 2013 6:53 pm

MichaelLenz wrote:linux 3.2.27+ #307 PREEMPT Mon Nov 26 23:22:29 GMT 2012 armv6l ARMv6-compatible processor rev 7 (v6l) BCM2708 GNU/Linux
Your kernel is quite old, current kernel is 3.6.11 #371

Regards
Aydan

MaxK1
Posts: 898
Joined: Sun Aug 26, 2012 11:34 pm

Re: USB packet loss.

Tue Apr 16, 2013 7:00 pm

Yours is kinda old as well - I'm at 3.6.11+ #408... ;-)
You are in a maze of twisty little passages, all alike.
When General Failure and Major Disaster get together, Private Parts usually suffers.

Aydan
Posts: 561
Joined: Fri Apr 13, 2012 11:48 am
Location: Germany, near Lake Constance

Re: USB packet loss.

Tue Apr 16, 2013 7:04 pm

MaxK1 wrote:Yours is kinda old as well - I'm at 3.6.11+ #408... ;-)
But that's the bleeding edge one. Not exactly suitable for "production" :lol:

Return to “Troubleshooting”

Who is online

Users browsing this forum: No registered users and 73 guests