Hypernia
Posts: 14
Joined: Thu Jan 31, 2013 12:36 pm

WLAN too slow

Thu Jan 31, 2013 12:51 pm

Hi everyone,

I'm a proud Raspberry Pi owner but I have one problem: I use my RPi (amongst others) as an FTP server. When I upload files using WLAN, I get around 900 kB/s.

As this is not enough in my 802.11n network, I tested the SD card using

Code: Select all

hdparm -tT /dev/root
and

Code: Select all

dd if=/dev/zero of=testfile
and get reading speeds of 18 and writing speeds of 14 MB/s.

Next thing I tried is using

Code: Select all

iperf <IP>
with a server running on my computer. This resulted in about 7-8 Mbit/s and seems to be the bottleneck. It's not my computers fault as I get normal and way higher speeds with other devices connected.

I use an edimax ew-7811un (lsusb shows 'Bus 001 Device 004: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]') connected directly to the RPi and I don't use any other devices (even no ethernet connected).

I also tried unbind/deactivate eth0 which resulted in about 100 kB/s more speed (= almost 1 MB/s)

An additional strange thing is that iwconfig shows my stick being connected at 54 Mb/s, while my router is capable of 300 and my stick of 150 Mb/s:

Code: Select all

wlan0     IEEE 802.11bg  ESSID:"WLAN"  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency:2.432 GHz  Access Point: 90:F6:52:24:6E:5C
          Bit Rate:54 Mb/s   Sensitivity:0/0
          Retry:off   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=100/100  Signal level=81/100  Noise level=0/100
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0
But this should at least give me 4-5 MB/s and not less than 1.

Does anybody know this problem or do you have any ideas how to solve my problem?

By the way I'm using Raspian Wheezy with all updates installed.

Thanks in advance ;)

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

Re: WLAN too slow

Thu Jan 31, 2013 2:23 pm

Is your wifi stick connected directly to the Pi or connected to a self powered usb hub?
Last time I checked network performance, I used nuttcp. I got approx 20Mbit/sec.
I used 2 different wifi adapters with 2 different chipsets. Both gave me the same result.
I only have a G capable acces point.
The bitrate you get when running iwconfig seems to indicate you are also connected at wireless G speed, and not at N speed.

User avatar
pluggy
Posts: 3636
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: WLAN too slow

Thu Jan 31, 2013 3:22 pm

Using a RTL8188CUS (Not an Edimax, a generic one) and nuttcp I get at best 1.5 Mb/s. Another Pi using a Ralink RT5370 returns about 18Mb/s - 20Mb/s. A wired one gives 92 Mb/s which is close to theoretical maximum. The two wireless ones have the adapters plugged directly into the Pi's. The RTL8188CUS is closer to the router too. Reversing the connection (The pi as the receiver) I get slightly better results.

Maybe the RTL8188 isn't the way to go for a wireless adapter in Pi land.
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

Hypernia
Posts: 14
Joined: Thu Jan 31, 2013 12:36 pm

Re: WLAN too slow

Thu Jan 31, 2013 4:18 pm

@obcd: The stick is directly connected. Yes connection speed is at G speed, but I don't know why it doesn't connect at 150 Mbit/s. By the way I just found this:

Code: Select all

pi@raspberrypi ~ $ iwlist wlan0 bitrate
wlan0     4 available bit-rates :
          1 Mb/s
          2 Mb/s
          5.5 Mb/s
          11 Mb/s
          Current Bit Rate:54 Mb/s
My RPi doesn't seem to be supporting higher modes than 54 Mbit/s? The driver is 'rtl8192cu'.

@pluggy: Thanks for sharing your experiences, perhaps we can find a solution or I just have to accept it (or better: wait for the next update!)

User avatar
pluggy
Posts: 3636
Joined: Thu May 31, 2012 3:52 pm
Location: Barnoldswick, Lancashire,UK
Contact: Website

Re: WLAN too slow

Thu Jan 31, 2013 4:54 pm

I put it down to the Pi's iffy USB implementation, presently a work in progress. It affects some things more than others. Maybe when they get it sorted........
Don't judge Linux by the Pi.......
I must not tread on too many sacred cows......

Spid
Posts: 525
Joined: Sat Jan 19, 2013 12:47 pm

Re: WLAN too slow

Thu Jan 31, 2013 5:30 pm

Have you measured with all the USB Peripherals plugged into a Mains Power USB Hub ?
I will always assume you are running Raspbian for desktop and Raspbmc for XMBC !

Hypernia
Posts: 14
Joined: Thu Jan 31, 2013 12:36 pm

Re: WLAN too slow

Thu Jan 31, 2013 5:34 pm

No I had it directly connected. But does this make any difference? If the RPi doesn't get enough power, it would crash/freeze/restart and it would not reduce the WLAN speed or am I wrong in that point?

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

Re: WLAN too slow

Thu Jan 31, 2013 5:47 pm

Hypernia wrote:@obcd: The stick is directly connected. Yes connection speed is at G speed, but I don't know why it doesn't connect at 150 Mbit/s. By the way I just found this:

Code: Select all

pi@raspberrypi ~ $ iwlist wlan0 bitrate
wlan0     4 available bit-rates :
          1 Mb/s
          2 Mb/s
          5.5 Mb/s
          11 Mb/s
          Current Bit Rate:54 Mb/s
My RPi doesn't seem to be supporting higher modes than 54 Mbit/s? The driver is 'rtl8192cu'.

@pluggy: Thanks for sharing your experiences, perhaps we can find a solution or I just have to accept it (or better: wait for the next update!)
The connection will be slower if you are getting interference or you are too far from the AP. Can you try closer to the AP to see if it helps?
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.

Hypernia
Posts: 14
Joined: Thu Jan 31, 2013 12:36 pm

Re: WLAN too slow

Thu Jan 31, 2013 5:55 pm

Hi jamesh,

as you can see before I had a link quality of 100% but I gave it a try. My RPi is now 2 m away from the AP and has a direct line of sight. Unfortunately that had no improvements, still about 900 kB/s transfer rate :(

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

Re: WLAN too slow

Thu Jan 31, 2013 7:09 pm

One of the 2 sticks I used for testing was a MicroNext MN-WD152B from farnell with the rtl 8188cus chipset. There wasn't much difference in speed compared to the other wifi stick. (A cheap ebay one)
They both got around 20Mbit/sec.
When the other machine was using wifi as well, the results were much worse.
I have no idea what caused that behavour.

stupid_boy
Posts: 64
Joined: Tue Jan 01, 2013 7:53 pm

Re: WLAN too slow

Thu Jan 31, 2013 7:31 pm

lsusb:
Bus 001 Device 008: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter

iwlist wlan0 bitrate:
wlan0 4 available bit-rates :
1 Mb/s
2 Mb/s
5.5 Mb/s
11 Mb/s
Current Bit Rate:150 Mb/s

it is edup, chinese one, cheap.

"2 m away from the AP and has a direct line of sight"? are you kidding? and may be your AP is at HIGH power? try from bigger distance and/or lower AP power. most likely you are overloading radio circuity. WiFi standard set maximum allowed signal at -28db ( or similar ), from what i see till now, there is no WiFi card that can work reliable with signal above -30-32db. even at -32db there are a lot of troubles the card have to solve!

Hypernia
Posts: 14
Joined: Thu Jan 31, 2013 12:36 pm

Re: WLAN too slow

Thu Jan 31, 2013 7:44 pm

stupid_boy wrote:"2 m away from the AP and has a direct line of sight"? are you kidding? and may be your AP is at HIGH power? try from bigger distance and/or lower AP power. most likely you are overloading radio circuity. WiFi standard set maximum allowed signal at -28db ( or similar ), from what i see till now, there is no WiFi card that can work reliable with signal above -30-32db. even at -32db there are a lot of troubles the card have to solve!
No I'm not kidding you ;) I moved it closer for testing purposes (reacting to the replies before). Before that it was about 5 m away around a corner and under a table - right next to my computer which has a perfect WLAN connection. By the way my router is on medium power ;)

But I will test it with some distance. Do you know how I can look up my signal level in db? As you can see above (iwconfig), it showed 81/100 (and not xx db) at its normal position.

Hypernia
Posts: 14
Joined: Thu Jan 31, 2013 12:36 pm

Re: WLAN too slow

Thu Jan 31, 2013 7:49 pm

Brought it to another room, still no difference, it's running at 900 kB/s.

iwconfig in that room shows just 99 % link quality and 68/100 signal level.

Code: Select all

wlan0     IEEE 802.11bg  ESSID:"WLAN"  Nickname:"<WIFI@REALTEK>"
          Mode:Managed  Frequency:2.432 GHz  Access Point: 90:F6:52:24:6E:5C
          Bit Rate:54 Mb/s   Sensitivity:0/0
          Retry:off   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=99/100  Signal level=68/100  Noise level=0/100
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

stupid_boy
Posts: 64
Joined: Tue Jan 01, 2013 7:53 pm

Re: WLAN too slow

Thu Jan 31, 2013 8:03 pm

wlan0 IEEE 802.11bgn ESSID:"private" Nickname:"<WIFI@REALTEK>"
Mode:Managed Frequency:2.437 GHz Access Point: ....
Bit Rate:150 Mb/s Sensitivity:0/0
Retry:off RTS thr:off Fragment thr:off
Power Management:off
Link Quality=100/100 Signal level=98/100 Noise level=0/100
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

at around 5 m from router, behind my TV, with router at LOW power, also TPLink. i never checked transfer speed.

stupid_boy
Posts: 64
Joined: Tue Jan 01, 2013 7:53 pm

Re: WLAN too slow

Thu Jan 31, 2013 8:29 pm

http://www.marcomc.com/2012/09/how-to-c ... fi-dongle/

at the end we read:
A little of story:

The Linux kernel 3.x comes with the module rtl8192cu.ko that is not able to properly recognised the WiFi dongle with the RTL8188CUS chipset, and when plugging the device, the RPi will hang on device detection of may even freeze.

The most recent versions on the RPi firmware (Sep 2012) have removed the buggy kernel module, and substituted it with a ‘manually’ compiled module called 8192cu.ko probably sources from the source code available at Realtek home page.
may be this will give some idea.

edit: 46 pages here about these devices: http://www.raspberrypi.org/phpBB3/viewt ... =26&t=6256

Hypernia
Posts: 14
Joined: Thu Jan 31, 2013 12:36 pm

Re: WLAN too slow

Fri Feb 01, 2013 8:21 am

Good point from stupid_boy ;)

How comes iwconfig shows 802.11bg when lsusb shows a 802.11bgn chip? I would think it might be the driver but it seems that all those 8192cu.ko scripts were about half a year ago, now as the end of your link states it should be fixed and I am at the latest version:

Code: Select all

pi@raspberrypi ~ $ uname -a
Linux raspberrypi 3.2.27+ #250 PREEMPT Thu Oct 18 19:03:02 BST 2012 armv6l GNU/Linux

Hypernia
Posts: 14
Joined: Thu Jan 31, 2013 12:36 pm

Re: WLAN too slow

Fri Feb 01, 2013 8:27 am

I just looked this up:

Code: Select all

pi@raspberrypi ~ $ modinfo 8192cu
filename:       /lib/modules/3.2.27+/kernel/drivers/net/wireless/rtl8192cu/8192cu.ko
version:        v3.4.3_4369.20120622
author:         Realtek Semiconductor Corp.
description:    Realtek Wireless Lan Driver
...
Can/should I use one of these (Version 3.4.4 for RTL8192CU and RTL8188CUS and how do I have to do that (wget, ???): http://www.realtek.com.tw/downloads/dow ... loads=true

Remember:

Code: Select all

pi@raspberrypi ~ $ lsusb
Bus 001 Device 004: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]

stupid_boy
Posts: 64
Joined: Tue Jan 01, 2013 7:53 pm

Re: WLAN too slow

Fri Feb 01, 2013 8:36 am

Hypernia wrote:Can/should I use one of these
no idea. mine works 'right out of the box' from begining. i have it more than half year and no problems till now. i use it from before links above, and never know about them till yestarday. as mine uses the same chip, problem seems to be more edimax related, than generic one.

Hypernia
Posts: 14
Joined: Thu Jan 31, 2013 12:36 pm

Re: WLAN too slow

Sat Feb 02, 2013 10:58 pm

Does anyone else have an idea about whether to install one of these drivers and how?

Hypernia
Posts: 14
Joined: Thu Jan 31, 2013 12:36 pm

Re: WLAN too slow

Thu Feb 14, 2013 11:04 am

I found out I have 2 different versions of 8192cu.ko:

Code: Select all

pi@raspberrypi ~ $ md5sum /lib/modules/3.2.27-cutdown+/kernel/drivers/net/wireless/rtl8192cu/8192cu.ko /lib/modules/3.2.27+/kernel/drivers/net/wireless/rtl8192cu/8192cu.ko
cf0b97cff5fbbab7780bcf72681a52be  /lib/modules/3.2.27-cutdown+/kernel/drivers/net/wireless/rtl8192cu/8192cu.ko
2e9e8de7b80244f4514b4c6b6c26784b  /lib/modules/3.2.27+/kernel/drivers/net/wireless/rtl8192cu/8192cu.ko
Could anyone check if this is normal or which version is the right one?

Hypernia
Posts: 14
Joined: Thu Jan 31, 2013 12:36 pm

Re: WLAN too slow

Thu Feb 14, 2013 1:01 pm

That was not the problem. I used rpi-update and my stick is still stuck at 802.11bg in iwconfig when it is 802.11n in lsusb :evil:

jbuehl
Posts: 29
Joined: Fri Jun 08, 2012 2:49 pm
Location: Los Angeles

Re: WLAN too slow

Sun Jun 02, 2013 4:27 pm

I am currently seeing this problem when using the brand X wifi dongle that Adafruit sells for $12. I get about 500Kb/sec throughput when copying a file connected to a 802.11g access point a few feet away. This occurs on both the latest Raspbian and Arch distros. The version of the 8192cu driver is v3.4.4_4749.20121105. If I plug in an Asus USB-N10 dongle, which uses the r8712u driver, the speed increases by a factor of 10 with all other variables being the same.

I don't know if this is a driver issue, a chip issue, or some combination of both. The Adafruit dongle uses the Realtek RTL8188CUS chip and the Asus uses the RTL8188SU.

ppumkin
Posts: 82
Joined: Tue May 29, 2012 10:22 pm

Re: WLAN too slow

Thu Nov 14, 2013 11:58 am

I am getting the same issues .

I got a RTL8188CUS in a custom branded one. I get excellent link signal and strength it shows 70mbps but iperf TCP test shows me 1.65Mbits/second (UDP is slightly slower?!) .

It so slow I can't even stream 1FPS of crappy video with out it restarting every 10 times every second. I am powering the USB ports directly with a 2A power supply over GPIO- There is no power issue I made sure of that.

This same mini RTL8188CUS one works on my laptops or PC though with a really nice transfer rate and no problem what so ever. What is going on?

rahlquist
Posts: 146
Joined: Tue Jan 21, 2014 1:02 pm

Re: WLAN too slow

Fri Jan 24, 2014 12:34 am

Did any of you ever get this worked out? If so how? I am having the same issue.

jbuehl
Posts: 29
Joined: Fri Jun 08, 2012 2:49 pm
Location: Los Angeles

Re: WLAN too slow

Fri Jan 24, 2014 12:39 am

No, I didn't troubleshoot it further and I just use the Asus.

Return to “Troubleshooting”

Who is online

Users browsing this forum: sjzeedyk, thunderfoot and 46 guests