User avatar
abishur
Posts: 4477
Joined: Thu Jul 28, 2011 4:10 am
Location: USA
Contact: Website

Re: USB - the Elephant in our Room

Sun Aug 19, 2012 8:39 pm

MarcinM wrote:Yes, I have USB problems. With USB cameras, storage, WiFi. Even keyboard and mouse reset from time to time. Everything gets worse when connected to a HUB. I've measured the mythical 5V and it turned out to be about 4.9V. Then I decided to check if there is a distortion on 5V. Connected a scope and it turned out to be flat. Really flat. But then I've checked 3.3V... This one IS distorted. Voltage drops to as low as 2.85V. It's relatively quiet when there are no USB devices and no network traffic. It gets worse with USB devices connected.
I've put pictures here: http://marcin.homedns.org/~marcin/pic.html. The page is hosted on the Pi that's being measured so it may not be accessible from time to time...

Can somebody with more experience check if that may be the problem?

I've tried few caps in different places without any noticeable change. (few hundreds uF, nF and pF).
Probes were connected to P1. 3.3V looks the same measured directly on RG2.
Have you noticed your ethernet chip get's unusually hot? It's been discovered recently that on certain Pis there's a design mistake which uses the LAN9512 chip as the 3v3 regulator. It's possible that you have one such pi (which might explain why the 3v3 rail goes janky when you plug in USB devices).

On the Hub issue, one thing I've noticed is that if I try and mix high speed (Hard drives mainly in my case) and low speed (keyboards/mice) USB devices on the same hub it really causes issues, but if I split off the high speed devices onto their own hub it tends to calm things down.
Dear forum: Play nice ;-)

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5268
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: USB - the Elephant in our Room

Sun Aug 19, 2012 8:48 pm

blavery wrote: With or without the option in cmdline.txt, this upgrade seems to have killed my python / GPIO functions:
I've pushed out an update that should fix GPIO with kernel 3.2. Can you update and retest?

kermitas
Posts: 108
Joined: Thu Jan 26, 2012 11:49 am

Re: USB - the Elephant in our Room

Sun Aug 19, 2012 8:48 pm

After update wrote:Raspbian 3.2.27+ #12 PREEMPT
Excuse me that I ask: On this thread I received confirmation that using Fedora 17 remix test image 4 I will be able to get latest updates.

I'm doing yum update and rpi-update everyday. Even now I did and it looks like that:

Code: Select all

[[email protected]_RPI ~]# uname -a
Linux F17_RPI 3.1.9+ #272 PREEMPT Tue Aug 7 22:51:44 BST 2012 armv6l armv6l armv6l GNU/Linux
[[email protected]_RPI ~]# cat /proc/version 
Linux version 3.1.9+ ([email protected]) (gcc version 4.7.1 20120402 (prerelease) (crosstool-NG 1.15.2) ) #272 PREEMPT Tue Aug 7 22:51:44 BST 2012
How can I jump from 3.1.9 to 3.2.27+, how can I use latestes firmware to test new cmdline.txt options?

Thanks,
Arthur.

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

Re: USB - the Elephant in our Room

Sun Aug 19, 2012 9:19 pm

You will need the rpi-update from hexxen.
...
Running
sudo rpi-update
http://elinux.org/R-Pi_Troubleshooting# ... g_firmware
is the easier way of doing this.
The lan chip is not providing 3V3. It's providing 1V8 which is also used for the ram chip.
The external 1V8 regulator and the one in the lan chip are connected together?
The pin's of the lan chip with that voltage should normally only be used for decoupling capacitors.
3V3 should be stable normally. It's generated with a linear regulator. Maybe that one is defective on your Pi?

kermitas
Posts: 108
Joined: Thu Jan 26, 2012 11:49 am

Re: USB - the Elephant in our Room

Sun Aug 19, 2012 9:44 pm

obcd wrote:You will need the rpi-update from hexxen.
I didn't know that there are more rpi-update tools than this from https://github.com/Hexxeh/rpi-update/.

Ok, I'm still getting 3.1.9+ info but I checked /boot/.firmware_revision file and there is 'number' of latest commit so I guess I'm using latest firmware and I can test latest /boot/cmdline.txt options.

But what about kernel?
Does Linux F17_RPI 3.1.9+ #272 PREEMPT Tue Aug 7 22:51:44 BST 2012 armv6l armv6l armv6l GNU/Linux means that it is 3.2.27+?

PaulCheffus
Posts: 381
Joined: Tue May 29, 2012 2:51 pm
Location: Lincolnshire UK

Re: USB - the Elephant in our Room

Sun Aug 19, 2012 9:50 pm

kermitas wrote:
obcd wrote:You will need the rpi-update from hexxen.
I didn't know that there are more rpi-update tools than this from https://github.com/Hexxeh/rpi-update/.

Ok, I'm still getting 3.1.9+ info but I checked /boot/.firmware_revision file and there is 'number' of latest commit so I guess I'm using latest firmware and I can test latest /boot/cmdline.txt options.

But what about kernel?
Does Linux F17_RPI 3.1.9+ #272 PREEMPT Tue Aug 7 22:51:44 BST 2012 armv6l armv6l armv6l GNU/Linux means that it is 3.2.27+?
Hi

Nope should say

Linux raspberrypi 3.2.27+ #12 PREEMPT Sun Aug 19 12:28:17 BST 2012 armv61 GNU/Linux

Cheers

Paul
Procrastination - The Thief of Time.

kermitas
Posts: 108
Joined: Thu Jan 26, 2012 11:49 am

Re: USB - the Elephant in our Room

Sun Aug 19, 2012 10:01 pm

PaulCheffus wrote: Hi
Nope should say
Linux raspberrypi 3.2.27+ #12 PREEMPT Sun Aug 19 12:28:17 BST 2012 armv61 GNU/Linux
Cheers
Paul
Can it be related with my rootfs that is on pendrive? /boot/cmdline.txt rootfs=/dev/sda2

yum update should update all at /dev/sda2 and rpi-update should update all at /boot - which is on first partition of SD card.

... what can be the problem that I can't jump to 3.2.27+?

dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5268
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Re: USB - the Elephant in our Room

Sun Aug 19, 2012 10:10 pm

kermitas wrote: ... what can be the problem that I can't jump to 3.2.27+?
I guess the problem is Fedora does things differently. I don't use it, so can't be sure, but I'd guess they have their own kernel build, and it's probably not named kernel.img (config.txt can specify an alternatively named kernel with kernel=<filename>.)
I'm also going to guess that they may rely on features in their build of the kernel, and so updating yourself may not be possible. I think you should wait for Fedora to release an updated kernel.
If you want to test now, then I'd suggest switching to Wheezy.

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

Re: USB - the Elephant in our Room

Sun Aug 19, 2012 10:13 pm

dom wrote:
blavery wrote: With or without the option in cmdline.txt, this upgrade seems to have killed my python / GPIO functions:
I've pushed out an update that should fix GPIO with kernel 3.2. Can you update and retest?
Great. GPIO works again! That was quick !!

kermitas
Posts: 108
Joined: Thu Jan 26, 2012 11:49 am

Re: USB - the Elephant in our Room

Sun Aug 19, 2012 10:14 pm

dom wrote:
kermitas wrote: ... what can be the problem that I can't jump to 3.2.27+?
I guess the problem is Fedora does things differently. I don't use it, so can't be sure, but I'd guess they have their own kernel build, and it's probably not named kernel.img (config.txt can specify an alternatively named kernel with kernel=<filename>.)
I'm also going to guess that they may rely on features in their build of the kernel, and so updating yourself may not be possible. I think you should wait for Fedora to release an updated kernel.
If you want to test now, then I'd suggest switching to Wheezy.
Thank you dom for response.
I will probably back to Debian Wheezy but only softfp (I am very heavy Java user/programmer so I need Oracle Embedded Java 7).

I used Fedora because I had a feeling that it works better with well known usb problems.

Max

Re: USB - the Elephant in our Room

Sun Aug 19, 2012 10:16 pm

kermitas wrote: Can it be related with my rootfs that is on pendrive? /boot/cmdline.txt rootfs=/dev/sda2

yum update should update all at /dev/sda2 and rpi-update should update all at /boot - which is on first partition of SD card.

... what can be the problem that I can't jump to 3.2.27+?
If you type "mount" does it show that /dev/mmcblk0p1 is actually mounted at /boot?

kermitas
Posts: 108
Joined: Thu Jan 26, 2012 11:49 am

Re: USB - the Elephant in our Room

Sun Aug 19, 2012 10:22 pm

Max wrote:If you type "mount" does it show that /dev/mmcblk0p1 is actually mounted at /boot?
Very good question, here is the log:

Code: Select all

[[email protected]_RPI ~]# mount
/dev/root on / type ext4 (rw,noatime,user_xattr,barrier=1,data=ordered)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,size=118340k,nr_inodes=29585,mode=755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=24,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
systemd-1 on /boot type autofs (rw,relatime,fd=35,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
mqueue on /dev/mqueue type mqueue (rw,relatime)
tmpfs on /media type tmpfs (rw,nosuid,nodev,noexec,relatime,mode=755)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)

Code: Select all

[[email protected]_RPI ~]# cat /boot/cmdline.txt
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/sda2 rootfstype=ext4 rootwait quiet sdhci-bcm2708.missing_status=0 sdhci-bcm2708.sync_after_dma=0 dwc_otg.microframe_schedule=1

Code: Select all

[[email protected]_RPI ~]# uname -a
Linux F17_RPI 3.1.9+ #272 PREEMPT Tue Aug 7 22:51:44 BST 2012 armv6l armv6l armv6l GNU/Linux
Funny, I can't see where is /boot mounted...

But look here:

Code: Select all

[[email protected]_RPI ~]# mount /boot
mount: /etc/fstab: błąd składni: zignorowano wpis w linii 1.
mount: /dev/sda1 jest już zamontowany lub /boot jest zajęty
       /dev/sda1 jest już zamontowany w /boot
What can you suggest to do now?

Edit: ok, now magically it is in last line

Code: Select all

[[email protected]_RPI ~]# mount 
/dev/root on / type ext4 (rw,noatime,user_xattr,barrier=1,data=ordered)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,size=118340k,nr_inodes=29585,mode=755)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
tmpfs on /sys/fs/cgroup type tmpfs (rw,nosuid,nodev,noexec,mode=755)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpuacct,cpu)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=24,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
systemd-1 on /boot type autofs (rw,relatime,fd=35,pgrp=1,timeout=300,minproto=5,maxproto=5,direct)
mqueue on /dev/mqueue type mqueue (rw,relatime)
tmpfs on /media type tmpfs (rw,nosuid,nodev,noexec,relatime,mode=755)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
[b]/dev/sda1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=cp437,iocharset=ascii,shortname=mixed,errors=remount-ro)[/b]
How can I easyli update content of SD card?

Max

Re: USB - the Elephant in our Room

Sun Aug 19, 2012 10:30 pm

kermitas wrote: Funny, I can't see where is /boot mounted...

But look here:

Code: Select all

[[email protected]_RPI ~]# mount /boot
mount: /etc/fstab: błąd składni: zignorowano wpis w linii 1.
mount: /dev/sda1 jest już zamontowany lub /boot jest zajęty
       /dev/sda1 jest już zamontowany w /boot
What can you suggest to do now?
umount /boot
mount /dev/mmcblk0p1 /boot

Try updating again.

If that does work ok, you might want to update your /etc/fstab so that it automatically mounts /dev/mmcblk0p1

kermitas
Posts: 108
Joined: Thu Jan 26, 2012 11:49 am

Re: USB - the Elephant in our Room

Sun Aug 19, 2012 10:41 pm

Max wrote:
kermitas wrote: Funny, I can't see where is /boot mounted...

But look here:

Code: Select all

[[email protected]_RPI ~]# mount /boot
mount: /etc/fstab: błąd składni: zignorowano wpis w linii 1.
mount: /dev/sda1 jest już zamontowany lub /boot jest zajęty
       /dev/sda1 jest już zamontowany w /boot
What can you suggest to do now?
umount /boot
mount /dev/mmcblk0p1 /boot

Try updating again.

If that does work ok, you might want to update your /etc/fstab so that it automatically mounts /dev/mmcblk0p1
Ok, many many thanks for this quick linux lesson :).

Code: Select all

[[email protected]_RPI ~]# cat /proc/version 
Linux version 3.2.27+ ([email protected]) (gcc version 4.7.1 20120402 (prerelease) (crosstool-NG 1.15.2) ) #24 PREEMPT Sun Aug 19 21:28:36 BST 2012
[[email protected]_RPI ~]# uname -a
Linux F17_RPI 3.2.27+ #24 PREEMPT Sun Aug 19 21:28:36 BST 2012 armv6l armv6l armv6l GNU/Linux
I looks like it boots from SD (of course there is no other way on Rpi) but when you have your rootfs on /dev/sda2 then it mounts /boot to /dev/sda1.

Again: thank you ;)

ppuskari
Posts: 38
Joined: Sat Jul 07, 2012 4:04 am

Re: USB - the Elephant in our Room

Mon Aug 20, 2012 2:26 am

Thanks Dom and the Pi gang for getting these usb fixes and kernel updates out.

Going to 3.2.x has FIXED the CIFS timeout 4 errors completely for me. Only odd bit is now that we have 3.2 the cifs code says ntlmv2 is now defaulted in 3.3 :) It used to say it was present in 3.2 Oh well NOT a real issue since it appears NON related to the error code 4 errors.

As far as the analog audio issues I've seen mentioned, I have NOT had any issue there once I correctly configured ALSA, MPlayer, VLC, and OMXPlayer. That part has been rock solid. I've tested my setup on 2 different Pi's. One from US source, and the other UK source. And they both sport the different silkscreens on the board.

Using the microscheduler feature has moderately worked.. What does that mean? That means instead of when I plug in my second slow speed USB device and getting complete usb stack resets and errors about enqueueing and megabytes of dmesg logs, I now only get usb resets and sporadic usb functionality.

The errors present in dmesg now are:

[xxxxx] usb 1-1.3.3: reset low-speed USB device number 6 using dwc_otg
[xxxxx] usb 1-1.3.3: reset low-speed USB device number 6 using dwc_otg
[xxxxx] usb 1-1.3.3: reset low-speed USB device number 6 using dwc_otg
[xxxxx] usb 1-1.3.4.1: reset full-speed USB device number 6 using dwc_otg
[xxxxx] usb 1-1.3.4.1: reset full-speed USB device number 6 using dwc_otg
[xxxxx] usb 1-1.3.4.1: reset full-speed USB device number 6 using dwc_otg

lsusb reports 8 devices on Bus 001 present before adding the pl2303 (ftda style) serial usb cable

Linux Foundation 2.0 root hub
Standard Microsystems Corp.
Standard Microsystems Corp.
NEC Corp. HighSpeed Hub
Prolific Technology, Inc. (2.5" ide usb 2.0 external hd enclosure)
Logitech, Inc. Marble Mouse (4-button)
IBM Corp. (usb keyboard)
IBM Corp. (low speed low-power hub in keyboard)

finally
Prolific Technology, Inc. PL2303 Serial Port (low speed) Device 9



That pattern interspersed between the 2 device resets repeats until I discontinue use of the Device 9. Serial port. I used "cu -s 115200 -l /dev/ttyUSB0" as the test to a USR 56K modem.

If I pull the slow device from the hub and attach directly to the pi main usb port. So PL2303 top, and USB 2.0 NEC powered hub bottom. Then it all works just fine. As before.

The new code option has made things much better to recover at least when I plug something in that the PI usb stack hates.

Getting closer! Any ideas?

maicod
Posts: 16
Joined: Wed Jun 20, 2012 12:29 pm
Location: Netherlands

what USB problems I have discovered

Mon Aug 20, 2012 4:16 am

I'd like to be able to use both mouse, keyboard and wifi dongle under X so I purchased the Ultron UHN-710 powered hub (its in the verified pheripherals list).

If I insert the usb-wire of the hub in my Pi and that of the keyboard in my Pi and insert the plug of the mouse into the hub everything is still working fine but once I insert my wifi-dongle (I tried 3 wifi dongles) into the hub the keyboard starts acting erratic. It sometimes skips typed keys and sometimes keeps repeating the key I typed.
Even with this keyboard trouble already started after plugging in the wifi dongle I continue and make sure the wlan internet connection is setup and working (I can ping internet sites). But when I startup X and open a terminal window and I type 'ping <internet address>' it doesn't reach the internet anymore so no ping replies.

My conclusion (in laymen's terms) is that there must be some 'collision' between the wifi dongle driver, the keyboard driver and the hub driver.

This makes me think that currently there is no-one on raspbian wheezy able to use a mouse, keyboard and wifi-dongle (using a powered hub) and succesfully use internet over wifi under X windows.
Or are there people that succesfully achieved this ?

I'm starting to think it has to do with the confirmed linux driver issues that are mentioned on elinux.org and this is the topic thats being referred to so I thought I'd post it here because it might give the people solving these issues some new insight . Can such a person confirm that my troubles have to do with the linux driver issues and as such tell me that at this moment there is nothing that can be done about it ?
I'm willing to help in testing out new drivers or answer questions from these developers.

information about my setup:
-------------------------------------

-my power supply for the Pi is 5volt/1A (when I ordered my Pi at RS Components it was suggested to order along with it so I guess its a suitable power supply)
-I use 2012-07-15-wheezy-raspbian and I installed rpi-update and succesfully updated the firmware and rebooted
-I have 2 Raspberry Pi's and both exhibit the same problems
-I have not overclocked the Pi's
-my Ultron UHN-710 hub is PSU works good cause a 2.5'' hdd runs on it when I use the hub in a windows pc and stops when unplugging that PSU
-I tried 3 wifi-dongles of realtek and ralink chipsets
-I tried a couple of unpowered hubs too
-I tried several keyboards that I got (none is of a known brand) and even a ps/2 keyboard connected to an ACTIVE ps/2 to usb converter
-I tried 3 different USB mice (one is wireless from logitech)
-besides plugging the keyboard in the Pi and the wifi-dongle in the hub I've also tried plugging the wifi dongle in the Pi and then the mouse and keyboard in the hub

If something is not clear enough about the hardware/software I used just ask and I'll try to fill in the blanks :)
(for instance usb vendor ids)

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

Re: USB - the Elephant in our Room

Mon Aug 20, 2012 5:28 am

@dom:
added
dwc_otg.microframe_schedule=1
and ran rpi-update. I then stopped the disable-ethernet script, that I have been using to get WiFi to run, on the Atrix Lapdock. I tested before the rpi-update and was still getting command line hangs.
Ethernet works independently and so does WiFi. They can be plugged in at the same time and still have a working connection.

now I can have the faster wired and still go wireless, when I need to, without having to enable/disable the onboard ethernet.

It looks to me like these fixes are working! Good Job to those of you working on this! :D
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!

samsamsam
Posts: 36
Joined: Fri Aug 17, 2012 11:36 am

Re: USB - the Elephant in our Room

Mon Aug 20, 2012 7:23 am

@dom

I had a lot of problems with USB. Some of them moved away, after the addition of option:
dwc_otg.microframe_schedule=1, sdhci-bcm2708.missing_status=0, sdhci-bcm2708.sync_after_dma=0 in /boot/cmdline.txt. My ROOTS and SWAP partitions are movet in to pendrive. I had also problem with full-speed devices connected under high-speed hub (I don't need high-speed so I force to use full-speed for all devices by changing #define dwc_param_speed_default from 0 to 1 in drivers/usb/host/dwc_otg/dwc_otg_core_if.h). This seemed to solve all my problems, unfortunately, after about 7-9 hours of some devices connected to the USB hub stop working and I must to disconnect and re-connect power from PI forcing them to work again.

The error present in dmesg looks like this: reset full-speed USB device number 6 using dwc_otg...

Do you have any idea what could cause this problem?
How can I help to solve this problem?

Thank you for your help

greypower
Posts: 92
Joined: Sat Jan 07, 2012 10:00 am

Re: USB - the Elephant in our Room

Mon Aug 20, 2012 8:59 am

@dom:

A question I forgot to ask earlier: what now is the limit on usb periodic endpoints with Linux raspberrypi 3.2.27+ #12 PREEMPT?

User avatar
NickT
Posts: 272
Joined: Mon May 21, 2012 10:43 am
Location: UK

Re: what USB problems I have discovered

Mon Aug 20, 2012 10:56 am

maicod wrote:I'd like to be able to use both mouse, keyboard and wifi dongle under X so I purchased the Ultron UHN-710 powered hub (its in the verified pheripherals list).

If I insert the usb-wire of the hub in my Pi and that of the keyboard in my Pi and insert the plug of the mouse into the hub everything is still working fine but once I insert my wifi-dongle (I tried 3 wifi dongles) into the hub the keyboard starts acting erratic. It sometimes skips typed keys and sometimes keeps repeating the key I typed.
Even with this keyboard trouble already started after plugging in the wifi dongle I continue and make sure the wlan internet connection is setup and working (I can ping internet sites). But when I startup X and open a terminal window and I type 'ping <internet address>' it doesn't reach the internet anymore so no ping replies.

My conclusion (in laymen's terms) is that there must be some 'collision' between the wifi dongle driver, the keyboard driver and the hub driver.

This makes me think that currently there is no-one on raspbian wheezy able to use a mouse, keyboard and wifi-dongle (using a powered hub) and succesfully use internet over wifi under X windows.
Or are there people that succesfully achieved this ?

I'm starting to think it has to do with the confirmed linux driver issues that are mentioned on elinux.org and this is the topic thats being referred to so I thought I'd post it here because it might give the people solving these issues some new insight . Can such a person confirm that my troubles have to do with the linux driver issues and as such tell me that at this moment there is nothing that can be done about it ?
I'm willing to help in testing out new drivers or answer questions from these developers.

information about my setup:
-------------------------------------

-my power supply for the Pi is 5volt/1A (when I ordered my Pi at RS Components it was suggested to order along with it so I guess its a suitable power supply)
-I use 2012-07-15-wheezy-raspbian and I installed rpi-update and succesfully updated the firmware and rebooted
-I have 2 Raspberry Pi's and both exhibit the same problems
-I have not overclocked the Pi's
-my Ultron UHN-710 hub is PSU works good cause a 2.5'' hdd runs on it when I use the hub in a windows pc and stops when unplugging that PSU
-I tried 3 wifi-dongles of realtek and ralink chipsets
-I tried a couple of unpowered hubs too
-I tried several keyboards that I got (none is of a known brand) and even a ps/2 keyboard connected to an ACTIVE ps/2 to usb converter
-I tried 3 different USB mice (one is wireless from logitech)
-besides plugging the keyboard in the Pi and the wifi-dongle in the hub I've also tried plugging the wifi dongle in the Pi and then the mouse and keyboard in the hub

If something is not clear enough about the hardware/software I used just ask and I'll try to fill in the blanks :)
(for instance usb vendor ids)
Your experiences and conclusions about the USB driver agreed with my own until the latest update which seem to have fixed it for me. Having wifi connectivity through LXDE was never a priority for me, only a 'nice to have'. About a month ago (which had been my last update till yesterday) I couldn't ping through wifi and the dmesg output was full of lines something like 'failed to read index 000114 or 000118' related to the smc95xx component. I did find a work around for this, as I reckoned I would never need both wired and wifi lan connection. I have a simple network setup (no wpa-supplicant or wicd) just a basic /etc/network/interfaces file which was like this:

auto lo wlan0
iface lo inet loopback
iface eth0 inet dhcp
iface wlan0 inet dhcp
wpa-ssid MyRouter
wpa-psk MySecretPassword
post-up ifdown eth0; echo -n '1-1.1:1.0' > /sys/bus/usb/drivers/smsc95xx/unbind
post-down echo -n '1-1.1:1.0' > /sys/bus/usb/drivers/smsc95xx/bind.

This worked OK from LXDE with wifi and pinging external IPs and Midori worked (albeit slowly!) although the packet loss was quite high.

Now with the latest rpi-update (Linux version 3.2.27+ #24 PREEMPT) and with its predecessor #12 PREEMPT, I could remove those last two lines from the interfaces file.

My setup is very similar to yours, cheap keyboard/mouse, Belkin wifi dongle and the Logik 4 port powered hub which also powers the Pi. Perhaps the latest rpi-update will fix it for you, and if not you could try the workaround of disabling the eth0 interface .

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

Re: USB - the Elephant in our Room

Mon Aug 20, 2012 12:45 pm

https://github.com/raspberrypi/linux/issues/79

I have repeated testing following update to Linux version 3.2.27+ #24 PREEMPT and I still see the same problem with libusb_interrupt_transfer calls so this issue is not resolved.

My setup is very simple: RPi, Wired Ethernet connection, HDMI -> DVI connection to monitor and single USB connection to a USB 1:4 deskswitch - HID combined keyboard/mouse that my program 'talks' to on endpoint 3.

Since posting on Github I haven't been contacted by anyone so I don't know what, if anything, is being done about the reported issue. I presumed I would be asked for further details but alas not.

David

kermitas
Posts: 108
Joined: Thu Jan 26, 2012 11:49 am

Re: USB - the Elephant in our Room

Mon Aug 20, 2012 12:47 pm

I have a little suspicion that dwc_otg.microframe_schedule=1 causing horiziontal lines on images from cam that have worked yesterday.

But I am very careful in forming this argument, I know that dealing with USB and webcams on Rpi is like a wak in the jungle.

It can be anything else: bigger EMI in my localization, temperature (it is very hot today, my rpi has two radiatros and a fan), something in yesterday's update, it is very sunny so webcam produce bigger JPEG files (~200 KB @ 1 fps), ...

What to do now? Test all combinations of dwc_otg.microframe_schedule=1 sdhci-bcm2708.missing_status=0 sdhci-bcm2708.sync_after_dma=0?
Attachments
c_188_13_2012-08-20_14-26-48-724.jpg
c_188_13_2012-08-20_14-26-48-724.jpg (61.34 KiB) Viewed 5717 times
c_188_12_2012-08-20_14-26-47-954.jpg
c_188_12_2012-08-20_14-26-47-954.jpg (61.6 KiB) Viewed 5717 times

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

Re: USB - the Elephant in our Room

Mon Aug 20, 2012 12:51 pm

DAFlippers wrote:https://github.com/raspberrypi/linux/issues/79

I have repeated testing following update to Linux version 3.2.27+ #24 PREEMPT and I still see the same problem with libusb_interrupt_transfer calls so this issue is not resolved.

My setup is very simple: RPi, Wired Ethernet connection, HDMI -> DVI connection to monitor and single USB connection to a USB 1:4 deskswitch - HID combined keyboard/mouse that my program 'talks' to on endpoint 3.

Since posting on Github I haven't been contacted by anyone so I don't know what, if anything, is being done about the reported issue. I presumed I would be asked for further details but alas not.

David
If you have more details I would suggest updating the github entry with them. Or posting them here.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

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

Re: USB - the Elephant in our Room

Mon Aug 20, 2012 12:52 pm

kermitas wrote:I have a little suspicion that dwc_otg.microframe_schedule=1 causing horiziontal lines on images from cam that have worked yesterday.

But I am very careful in forming this argument, I know that dealing with USB and webcams on Rpi is like a wak in the jungle.

It can be anything else: bigger EMI in my localization, temperature (it is very hot today, my rpi has two radiatros and a fan), something in yesterday's update, it is very sunny so webcam produce bigger JPEG files (~200 KB @ 1 fps), ...

What to do now? Test all combinations of dwc_otg.microframe_schedule=1 sdhci-bcm2708.missing_status=0 sdhci-bcm2708.sync_after_dma=0?
That's what I'd try. Please post any results here.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed. Here's an example...
"My grief counseller just died, luckily, he was so good, I didn't care."

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

Re: USB - the Elephant in our Room

Mon Aug 20, 2012 1:16 pm

jamesh wrote: If you have more details I would suggest updating the github entry with them. Or posting them here.
Hi James,

I have posted what I think is relevant on github but I assumed that if someone was picking up ownership of the issue then I would be contacted for any further details I could give. Note that I can add debug to my program and I have an external USB analyser (ellisys USB explorer) to capture the USB traffic.

As things stand I haven't a clue if anyone has picked up ownership of the issue.

When I first posted about the issue I found I was pointed at github to report the issue. I did that and I have had no acknowledgement of the report. You are now suggesting I post further information here which defeats the whole point of a centralised logging of issues and their handling doesn't it?

David

Return to “Troubleshooting”