Modify

Opened 9 years ago

Closed 6 years ago

#843 closed bug (test_in_newer_version)

Connect USB device to USB hub - Fonera slow down

Reported by: micaelopes@… Owned by:
Priority: normal Milestone:
Component: fon-base-firmware Version: 2.3.6.0 (Gari)
Severity: unknown
Cc: porter.adam@… Hardware: 2.0n (FON2300)

Description

Hello, I have a fonera 2.0n, with firmware 2.3.6. I have a 3G conenction to internet and I connect my 3G modem (Huawei K3520) to the usb port and it works nicely. Recently I used a USB hub with power supply and connect the 3G modem and an external hard disk (ext2 or 3) to my fonera. When I connect the hub to the router, fonera slow down and if I want to go to the router main page it takes about 2 minute to open the page. I tried to copy some files to the external disk and verified that the transfer speed is about 200 kb/s. After that I bought another usb powered hub, thinking that the problem was my original hub, but I verified that the problem is the same. If I want to use transmission, fonera freezes and I have to restart it. Can you help me?

Attachments (1)

dwc_otg.ko (126.2 KB) - added by matthijs 9 years ago.
Updated usb driver from 3.4 SDK with FAST_TRANSACTION disabled

Download all attachments as: .zip

Change History (21)

comment:1 Changed 9 years ago by matthijs

  • Status changed from new to infoneeded

Could you try with a few different hardware configurations to find what causes these problems exactly? e.g., try with just the hub (no devices attached), just the 3G modem (no hub), just the disk (no hub), with the hub and just the 3g modem and with the hub and just the disk.

If you have the development firmware, it would be good to get the output of the "top" command while the Fonera is slow. See http://trac.fonosfera.org/fon-ng/wiki/reportbugs about how to run commands on your Fonera and how to copy the output.

comment:2 Changed 9 years ago by micaelopes@…

Hello, Thanks for your quick answer. I have already tried that configurations. I'm using my fonera with the 3G modem connected direclty and it works fine. If I connect the hard disk directly to usb port, it works fine too and the file transfer rate is better. When I connect the usb hub, it begins too work slow. Even if I connect only my printer, the 3G modem or the hard disk to the hub, the problem appears. It becomes so slow that the transmission functionality (I tried to start a download with only 1 torrent and after starting I can't see if it is downloading or not) is unusable and the router freezes. The response time in any command is very low. The problem seems to be the usb hub and when I connect it to the router but with the 2 usb hub I tried the result was the same. One is a Mitsai Hub (bought in Worten, Portugal). The other one is a Sweex. Both have external power supply. If you tried a hub and it works say the model to me and I will test it too. This is the link to the usb hub page: http://www.sweex.com/en/assortiment/connectivity/usb-firewire-hubs/US009 The other one: http://www.worten.pt/ProductDetail.aspx?pid=03743815&oid=&c= Best regards, Micael Lopes

comment:3 Changed 9 years ago by matthijs

I have a few hubs around here, I'll give them a try soon (probably next week) to see if I can reproduce your problem.

Two more things I need from you: The output of the following two commands:

root@Fonera:~$ top -n 1
root@Fonera:~$ cat /proc/bus/usb/devices

while the Fonera is being slow. Please do this with the hub and disk attached, not the 3G modem (since I have a disk, but not a modem). See http://trac.fonosfera.org/fon-ng/wiki/reportbugs on how to run these commands.

comment:4 Changed 9 years ago by micaelopes@…

Hello,

I've done the tests that you request, but I´m away from home and the only way to test that was establishing connection throught Open VPN and with my 3G modem connected on router.

The results of your requests are:

root@Fonera:~# top -n 1 Mem: 38544K used, 23712K free, 0K shrd, 4320K buff, 13604K cached CPU: 30% usr 52% sys 0% nice 0% idle 0% io 16% irq 0% softirq Load average: 2.51 2.24 1.44

PID PPID USER STAT VSZ %MEM %CPU COMMAND

6706 6440 root R 1992 3% 44% top -n 1 6663 5969 root R 4868 8% 22% /usr/bin/lua /Apps/lucid 5969 1 root R 4496 7% 11% /usr/bin/lua /Apps/lucid 6635 5969 root S 5308 9% 0% /usr/bin/lua /Apps/lucid 1909 1 root S 5072 8% 0% /usr/bin/lua /Apps/umtsd.lua 2457 1 root S 4632 7% 0% /usr/sbin/openvpn --syslog openvpn(op 6653 5969 root S 4496 7% 0% /usr/bin/lua /Apps/lucid 2833 1 root S 4284 7% 0% /usr/sbin/chilli --dns1=192.168.182.1 2203 1 root S N 3836 6% 0% /bin/smbd -D 1576 1 nobody S 3260 5% 0% avahi-daemon: running [Fonera.local] 1984 1 root R 3200 5% 0% /usr/sbin/fonsmcd 2389 1 root S 3176 5% 0% /bin/nmbd 1969 1909 root S 2280 4% 0% /usr/sbin/pppd /dev/ttyUSB0 460800 cr 6440 6396 root S 2004 3% 0% -ash

338 1 root S 2004 3% 0% syslogd -C16

6705 6704 root R 2004 3% 0% /sbin/ifconfig 6396 2174 root S 1996 3% 0% /usr/sbin/dropbear -F -p 22

1 0 root S 1992 3% 0% init

2172 1 root S 1992 3% 0% /usr/sbin/pure-ftpd -S 21 -E 1 -c 2 - 6704 1909 root S 1992 3% 0% sh -c /sbin/ifconfig 2>/dev/null

Mem: 35336K used, 26920K free, 0K shrd, 4320K buff, 13600K cached CPU: 29% usr 44% sys 0% nice 0% idle 0% io 23% irq 2% softirq Load average: 1.50 1.95 1.44

PID PPID USER STAT VSZ %MEM %CPU COMMAND

6866 6440 root R 1992 3% 41% top -n 1 6865 1909 root R 1992 3% 15% sh -c rm /var/state/umtsd 2457 1 root S 4632 7% 3% /usr/sbin/openvpn --syslog openvpn(op 1909 1 root S 5076 8% 0% /usr/bin/lua /Apps/umtsd.lua 5969 1 root S 4496 7% 0% /usr/bin/lua /Apps/lucid 2833 1 root S 4284 7% 0% /usr/sbin/chilli --dns1=192.168.182.1 2203 1 root S N 3836 6% 0% /bin/smbd -D 1576 1 nobody S 3260 5% 0% avahi-daemon: running [Fonera.local] 1984 1 root S 3200 5% 0% /usr/sbin/fonsmcd 2389 1 root S 3176 5% 0% /bin/nmbd 1969 1909 root S 2280 4% 0% /usr/sbin/pppd /dev/ttyUSB0 460800 cr 6440 6396 root S 2004 3% 0% -ash

338 1 root S 2004 3% 0% syslogd -C16

6396 2174 root S 1996 3% 0% /usr/sbin/dropbear -F -p 22

1 0 root S 1992 3% 0% init

2172 1 root S 1992 3% 0% /usr/sbin/pure-ftpd -S 21 -E 1 -c 2 -

217 1 root S 1992 3% 0% logger -s -p 6 -t 219 1 root S 1992 3% 0% init 218 1 root S 1992 3% 0% init 340 1 root S 1984 3% 0% klogd

root@Fonera:~# cat /proc/bus/usb/devices

T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh?= 1 B: Alloc= 0/800 us ( 0%), #Int= 2, #Iso= 0 D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=0000 ProdID=0000 Rev= 2.06 S: Manufacturer=Linux 2.6.21 dwc_otg_hcd S: Product=DWC OTG Controller S: SerialNumber?=lm0 C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr?= 0mA I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=256ms

T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh?= 4 D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1 P: Vendor=05e3 ProdID=0608 Rev=77.61 S: Product=USB2.0 Hub C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr?=100mA I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub E: Ad=81(I) Atr=03(Int.) MxPS= 1 Ivl=256ms

T: Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 3 Spd=480 MxCh?= 0 D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=04b4 ProdID=6830 Rev= 0.01 S: Manufacturer=Cypress Semiconductor S: Product=USB2.0 Storage Device S: SerialNumber?=700000040753 C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr?= 0mA I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms E: Ad=88(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

T: Bus=01 Lev=02 Prnt=02 Port=01 Cnt=02 Dev#= 4 Spd=12 MxCh?= 0 D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1 P: Vendor=12d1 ProdID=1001 Rev= 0.00 S: Manufacturer=ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ S: Product=HUAWEI Mobile S: SerialNumber?=ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ C:* #Ifs= 4 Cfg#= 1 Atr=a0 MxPwr?=500mA I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=128ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=84(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=03(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 2 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=option E: Ad=85(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=05(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms I:* If#= 3 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage E: Ad=83(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=04(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms root@Fonera:~#

I hope this helps.

Thanks,

Micael

comment:5 Changed 9 years ago by micaelopes@…

Hello,

Do you have more information about the problem I reported?

Tks,

Micael Lopes

comment:6 Changed 9 years ago by matthijs

  • Status changed from infoneeded to investigate

No progress yet, sorry.

comment:7 Changed 9 years ago by porter.adam@…

if you load the dwc_otg driver in full speed (not high speed) you should see this issue resolved. I believe Ralink addressed this in the driver in 3.4 SDK

comment:8 Changed 9 years ago by micaelopes@…

Hello,

How I do the load of dwc_otg driver in full speed?

Micael Lopes

comment:9 Changed 9 years ago by matthijs

We're trying to get the 3.4 SDK usb driver to see if this fixes the problems (but due to licensing limitations, I can't download it myself and those who can are a bit busy, so please be patient).

In the meantime, could you try getting the contents of the /proc/interrupts file? I'd like to get it twice, with a few seconds between them. So just run the command date; cat /proc/interrupts twice, with a few seconds between them.

comment:10 Changed 9 years ago by matthijs

  • Status changed from investigate to infoneeded

I've built an updated USB driver from 3.4 SDK. There haven't been much changes, but please check if this updated driver helps. Never mind the /proc/interrupts command, apparently it's normal for this USB controller to trigger a lot of interrupts (and the udpated driver version didn't change that either).

To install the updated USB driver, run the following command over SSH:

wget -O /lib/modules/2.6.21/dwc_otg.ko http://trac.fonosfera.org/fon-ng/raw-attachment/ticket/843/dwc_otg.ko

After running this command, you should reboot your Fonera for it to take effect.

For more information on running commands over SSH, see this page.

Could you try this new driver and report the result here?

comment:11 Changed 9 years ago by micaelopes@…

Hello,

Thanks a lot for your work.

The result of the command is:

root@Fonera:~# date Wed Aug 11 20:56:40 UTC 2010 root@Fonera:~# cat /proc/interrupts

CPU0

3: 12568 Surfboard eth0 4: 9727 Surfboard ra0 5: 51165 Surfboard timer 6: 0 Surfboard ramips_gpio

12: 11 Surfboard serial 17: 1 Surfboard Ralink_ESW 18: 64148318 Surfboard dwc_otg, dwc_otg_hcd:usb1 37: 4 Surfboard serial

ERR: 0 root@Fonera:~# date Wed Aug 11 20:57:00 UTC 2010 root@Fonera:~# cat /proc/interrupts

CPU0

3: 14078 Surfboard eth0 4: 10085 Surfboard ra0 5: 53000 Surfboard timer 6: 0 Surfboard ramips_gpio

12: 11 Surfboard serial 17: 1 Surfboard Ralink_ESW 18: 66522460 Surfboard dwc_otg, dwc_otg_hcd:usb1 37: 4 Surfboard serial

ERR: 0 root@Fonera:~#

I will try now to install the updated usb driver.

Best Regards,

Micael Lopes

comment:12 Changed 9 years ago by micaelopes@…

Hello,

:-( The problem remains the same. May be it is a little better but only a little bit.

Thks,

Micael Lopes

comment:13 Changed 9 years ago by matthijs

  • Cc porter.adam@… added

Ok, so perhaps you can try loading the module in full speed mode (not that I think this disables USB2.0 speeds, so you might experience reduced throughput). To do so, run the following command:

root@Fonera:~# echo dwc_otg speed=1 > /etc/modules.d/50-ra_usb 

Reboot your Fonera to let it take effect.

I'm not sure if this would be a real solution (due to the low speeds resulting from it), but it would be helpful in debugging this issue.

Changed 9 years ago by matthijs

Updated usb driver from 3.4 SDK with FAST_TRANSACTION disabled

comment:14 Changed 9 years ago by matthijs

I've just added a new version of the dwc_otg.ko file. It's still the 3.4 version, but now with FAST_TRANSACTION disabled. Could you check if this changes matters?

To install it, you can still use the same command:

root@Fonera:~# wget -O /lib/modules/2.6.21/dwc_otg.ko http://trac.fonosfera.org/fon-ng/raw-attachment/ticket/843/dwc_otg.ko

To undo the "full speed" change, you can use the following command:

root@Fonera:~# echo dwc_otg > /etc/modules.d/50-ra_usb 

Don't forget to reboot after making these changes.

comment:15 Changed 9 years ago by matthijs

I've recently bought a US009 Sweex hub myself to test this, but I cannot reproduce the problem. For me, the webinterface stays fast, regardless of what I'm attaching (I've had an USB disk, two USB flash drives and an audio stick connected at the same time). I did have some problems with my disk not spinning up initially, it seems the power supply on this particular hub isn't too great.

Could you try the suggestions from the above two comments, so we can move forward with this bug again?

comment:16 Changed 9 years ago by micaelopes@…

Hello,

I tried to load the module in full speed and the fonera speed is ok but transfer rate is too slow. It seems USB 1.1.

After that I updated the usb driver with the command sent by you and undo the full speed change. The problem seems to be solved. I tried to transfer a movie from my usb disk and the transfer rate was about 2,75MB/s that seems a little slow for USB 2.0 right?

Thanks for your time,

Micael Lopes

comment:17 Changed 9 years ago by matthijs

Loading in "full speed" is indeed USB 1.1 (USB 1 had "low speed" and "full speed", and they later added USB 2 "hi speed". It's a bit confusing, really) so it's expected to be slower.

So, the updated driver with FAST_TRANSACTION disabled apparently solves this issue for you. Having a transfer speed of only 2,75MB is indeed a bit slow.

How do you get this speed exactly? By using filesharing to access the Fonera? Perhaps you can try using FTP?

You're still using Ext2?

comment:18 follow-up: Changed 9 years ago by micaelopes@…

I get the speed using filesharing. When I use ftp the speed is about 3MB/s. Yes, I'm using Ext2.

ML

comment:19 in reply to: ↑ 18 Changed 8 years ago by anonymous

Replying to micaelopes@…:

I get the speed using filesharing. When I use ftp the speed is about 3MB/s. Yes, I'm using Ext2.

ML

I'm having the same problem in a similar context:

Fonera 2n USB 3G modem Vodafone K3520 A generick USB Hub (from trust) not self-powered A USB 2.0 HD from WD formated as NTFS

The first time I connected my USB Hard Disk I found everything very slow and ntfs-3g process consuming most of resources so I've decided to remove the disk and convert the partition in fat32 format.

In this moment I have disconnected USB HD and most of consumed cpu time (about 30%-40%) seam used by two applications:

/usr/bin/lua /Apps/umtsd.lua /sbin/fonstated -D

What I think is there some problems of compatibility between hubs USB 2.0 and Fonera USB interface consuming CPU. Top cannot really understand really in which process CPU spend all this time probably because there is something passing in a driver making every application going slower because of continuous interruptions.

Disconnecting USB hub and connecting only USB 3G alone all came back to the original status and no problem seam affecting my Fonera (99% CPU free).

comment:20 Changed 6 years ago by matthijs

  • Resolution set to test_in_newer_version
  • Status changed from infoneeded to closed

As part of the upcoming 2.3.7.0 firmware release, we're reviewing old open tickets to see if they are still relevant, which is why you get this response now.

If this issue still occurs with the 2.3.7.0 rc2 firmware, feel free to leave a comment here so we can further investigate.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.