-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
USB Packet loss #19
Comments
Can you get a usb trace from kernel: You may need to rebuild kernel with CONFIG_USB_MON, although the kernel_debug.img, and debug/modules may be built with the right options. |
I have recompile the kernel with usbmon activated and http://www.yoctopuce.com/tmp/usb_trace.zip One thing that I have not mentioned, is that I work on my raspberry using ssh so I have some |
So this could be related to the sticky key problems with certain USB keyboards too? |
I believe this may also be showing itself in the dying of 3G PPP sessions that I'm experiencing with a Huawei E160. When the data rate is low (e.g. PPP over GPRS, AT Commands, etc.), there's no problem. But with a 3G PPP session, it can connect and work for ages until you put a lot of traffic through it when PPP just thinks "the modem has hung up". No other USB devices are present, power is more-than adequate, and the stick works fine in other Linux machines with identical configurations. |
Do you think this issue can have something to do with the crackling that can be experienced while using a USB soundcard ? |
I also noticed strange problems that could be related :
|
Can you try latest firmware (e.g. from rpi-update or bleeding-edge firmware repo) and add: to cmdline.txt. We think there may be USB packet loss caused by sdcard driver disabling interrupts for too long. |
Well, it turns out this didn't change anything.
It's therefore not surprising that my mouse freezes if it gets reset all the time! (no idea why it does that though)
By the way, I'm using ArchLinux ARM (with associated kernel), it's probably a week old. |
I'm also experiencing a very strange problem with the latest elf files. Just to be sure, here are the md5 sums of the files :
|
does |
Nope, it doesn't help. Even with larger delays (10sec). |
Hi, We are quite busy these days (next week will be the same).I will try to redo some testing as soon as I have some time. But if someone want a device to reproduce the the issue you can send a mail to support@yoctopuce.com. |
Thank you popcornmix! I've spent days trying to figure out why my SignaLink USB sound card kept dying due to EMI rUSB resets, having installed Raspbian yet again and updated the to the latest firmware with rpi-update the problem was still present, but when I included the lines below to cmdline.txt as advised by you and rebooted no more resets! my USB card is now super stable, thanks for your help. Can you try latest firmware (e.g. from rpi-update or bleeding-edge firmware repo) and add: to cmdline.txt. We think there may be USB packet loss caused by sdcard driver disabling interrupts for too long. Cheers, Karl - LX3KR |
I was getting mad with a 3g modem till I realized the raspi doesn't have a wide enough power line (5V) to the USB plug. Even the micro usb is not good enough to supply 5V as stable as it should be. If that 5V doesn't keep stable, the raspi does extrange things. If you measure the voltage on TP1/TP2, it is higher than the real voltage on USB plug. My 3g modem seemed to work well during configuration but hanged just at the end or on downloading (high power consumption). I measured the voltage on usb case on raspi (on the back of the board) and it went down to 3.6V!!!! So the problem is that the raspi doesn't have a wider enough line between the power supply and the usb plug. My solution was to plug my power supply to 5V pin on P1 directly (do not use micro-usb because it have the same problem: too slim wires!) and to solder a cable from that pin to the 5V pin on USB. Now I got connected without any problems. I don't know if it will be useful, but mine now is not hanging anytime! This is my soldering solution: http://static.inky.ws/image/2573/image.jpg |
I previously had the issue of the option module freezing up my pi due to dropping usb packets all over the place when attempting to use by 3g dongles. Just tested it after adding 'sdhci-bcm2708.missing_status=0 sdhci-bcm2708.sync_after_dma=0' to my cmdline.txt as advised. And the problem is resolved. I can now stably connect my 2 usb dongles without the previous workaround (ie, via the correct option module rather than forcing usbserial directly). Tested using latest rpi-update + raspian + wvdial for creating the connections, |
Hi, I think my issue raspberrypi/linux#82 is related with this one. |
What bandwidth are you expecting? Is this a low bandwidth figure? There are no errors because it's isochronous transfers and not What else do you have plugged in? Can you do a lsusb -v and post the output? Gordon On 04/11/2012, Robert Massa notifications@github.com wrote:
Sent from my mobile device |
I think I'm also having a problem related to this issue. When connecting a USB webcam the stream is corrupt. This webcam outputs MJPEG so I've dumped the raw frames and checked them using Setting the cmdline options doesn't change things. I've tried this with an rpi-updated system. Anything else I could try to debug this? |
lsusb output: https://gist.github.com/4012340 I'm not exactly sure about the bandwidth, but a crude approximation would be 100kb (640x480 jpeg) * 30 (fps) = 2.9 MB/s, probably less. I have a keyboard plugged in, nothing else. I've tried running without the keyboard, that doesn't change things. I also tried to reduce the image size to 320x240, still same result. |
@ghollingworth Would you have any other ideas about how I could debug this? |
Sorry, in general to debug this we're going to need to use the USB analyser and some deep debug information ! Interesting thing here is it's a USB2.0 device and therefore I would not expect to see problems in receiving data... This would be an interesting device to try to debug, we've seen issues with dropping data recently on USB 2.0 devices (like the ethernet controller) and need to debug... Will spend some time debugging this in the new year when I'll actually have time to do it... |
ghollingworth, I have one of the problematic wireless keyboards. I can bring it in for you to plug into the analyser if you want. (I'm the tall FPGA bloke, in case you were wondering). |
Sounds like a plan although I'll need to pop in and pick it up sometime... Other problem is I don't have the analyser anymore! We are looking to buy Gordon On Sunday, 6 January 2013, ethelthefrog wrote:
|
D'oh. I'd forgotten about that particular change in situation (I was in Devon that particular Friday, sorry). You are still welcome to borrow it. Maplin have them half price at the moment (Microsoft 800 for twenty quid), so that may be an option too. I'm afraid I'm a bit too busy with the day job to grab some traces from our analyser at the moment... |
One thing you could do is help test a hypothesis … Plug in your keyboard, power it up and test the keys ten times
Thanks Gordon On 6 Jan 2013, at 22:27, ethelthefrog notifications@github.com wrote:
|
First time plugged in. 10 'P' presses. 6 actual P's; the last one got stuck and made p all over the place. Second time plugged in. 10 'P' pressed. 6 actual P's with no stuckness. Third time plugged in: 10 'P' pressed. 3 of the first 5, then stuck, then stuck again. I've not noticed any times being more or less reliable. It loses at least 20% of key-down/key-up events. Obviously, I don't know exactly how this translates to USB traffic. EtF |
I should probably also mention that dmesg is full of "usb 1-1.2: reset full-speed USB device number 7 using dwc_otg" messages. lsusb confirms that device 7 is the wireless keyboard transceiver thingy. |
OK, Can you bring it with you to work and I'll pick it up later in the day? Thanks Gordon On 7 Jan 2013, at 22:41, ethelthefrog notifications@github.com wrote:
|
It's on my desk. Just get Victoria to let me know when you're here. EtF |
Any movement? |
With my RPI (rev. 000e) this manifests itself as pops and clicks when I play music with MPD through a USB DAC. Therefore I currently cannot use the RPI as a music server as planned. |
👍 +1 from me. |
I was trying to build a high end audio player with a raspi model B and a fancy USB soundcard but ran into problems with stuttering sound. I'm sure it's because of this... Does anyone know if they solved this somehow in the latest raspbian release? Does the model A (without the internal usb hub) have the same problem with packed loss over USB? |
@arcturus80 If that doesn't fix it you should try the fiq_split branch: |
Thanks! I'll try that. |
Unfortunately this did nothing to my problem. Audio is still skipping and crackling :( Problem increases with high samplerate 24bit flac files but are also present when playing ordinary mp3's. Maybe my problem isn't packet loss after all, but something else... |
It is likely that your USB audio device(s) are suffering from the same problem as seen elsewhere. Please post full dmesg output && sudo lsusb -v -d [deviceid of your audio device]. fiq_split_enable is now merged into the default branch on rpi-update. Can you compare results with the /boot/cmdline.txt parameter dwc_otg.fiq_split_enable=1 / 0 ? For certain types of device you can replug them and get "better" sounding audio. This is due to the clash or otherwise of where the microframe scheduler puts the split transactions. |
This issue is no longer present in the fiq_fsm rewrite. |
Hi,
We have found a serious issue on the raspberry PI USB stack (or at last the HID USB stack). We produce USB device and have found that we often get missing packet.
We have create an specific firmware illustrate the problem. This debug protocol is very simple the Raspberry will send one packet of 64 bytes, then the device will start a burst of USB transaction. Our USB device work in full speed (USB 1.1) and follow the HID protocol. All packets have the same size (64 bytes). the first uint32_t will contain the current packet number and the second uint32_t will contain the number of packet to send. Each packet is numbered and we stop after burst of 4096 packet of on the first missing packet.
The debug program call libusb-1.0, and will look for one of our device with the debug firmware, then send one USB packet to the device to start the burst. Then we will wait for all packet and check that all packet are send. You can download the source here http://www.yoctopuce.com/tmp/debug_libusb.zip
We have test this code and firmware on many linux platform (i386 and x86_64), and on a ARM based NAS (QNAP TS-219P II). We never get any missing packet. but on the Raspberry PI we always get missing packets. We have check with a USB analyser that the missing packet is correctly sent on the wire (the packet has been correctly acked by the Raspberry PI USB host). It seems that the packet is lost by the Raspberry PI firmware.
We have run this test on both the debian and arm-linux image, we have recompile the last version libusb without success. Our customers also have reported this issue.
We are ready to send one of our device to help to reproduce this issue, or to give a remote access to our Raspberry PI (or do any thing that can help you to fix this issue).
The text was updated successfully, but these errors were encountered: