1

I have a Model B (256MB) using a D-Link DWA-131 USB wireless-N adapater (Realtek RTL8192SU) via an external powered hub, running Raspbmc 12 (latest build, installed only a few days ago).

pi@raspbmc:~$ lsusb
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 005: ID 046d:c51b Logitech, Inc. V220 Cordless Optical Mouse for Notebooks
Bus 001 Device 006: ID 07d1:3303 D-Link System DWA-131 802.11n Wireless N Nano Adapter(rev.A1) [Realtek RTL8192SU]

My N300 router is configured as mixed g and n, channel 6, no guest mode, WPA2 and AES only.

First, when I run sudo iwlist scanning, the interface claims that the maximum bit rate is 54 Mb/s:

pi@raspbmc:~$ sudo iwlist scanning
wlan0     Scan completed :
Cell 01 - Address: C8:BE:19:75:3E:7A
                ESSID:"Gurunetwork"
                Protocol:IEEE 802.11bgn
                Mode:Master
                Frequency:2.437 GHz (Channel 6)
                Encryption key:on
                Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
                          9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s; 36 Mb/s
                          48 Mb/s; 54 Mb/s
                Extra:rsn_ie=<redacted>
                IE: IEEE 802.11i/WPA2 Version 1
                    Group Cipher : CCMP
                    Pairwise Ciphers (1) : CCMP
                    Authentication Suites (1) : PSK
                IE: Unknown: <redacted>
                Signal level=100/100

I believe my router is properly configured to support faster than 54Mb/s, so is there anything I can change in the Pi network settings to get the speed up?

Secondly, when streaming large files, if I check what's happening with ifconfig, I see lots of packet loss.

I tested with iperf and noticed the following:

  • 10Mbit/sec - no loss
  • 15Mbit/sec - no loss
  • 20Mbit/sec - 22-30% packet loss

Here are the logs:

[  3] local 192.168.0.101 port 5001 connected with 192.168.0.100 port 57336
[ ID] Interval       Transfer     Bandwidth        Jitter   Lost/Total Datagrams
[  4] local 192.168.0.101 port 5001 connected with 192.168.0.100 port 49462
[  4]  0.0- 1.0 sec  1.19 MBytes  10.0 Mbits/sec   1.089 ms    0/  850 (0%)
[  4]  1.0- 2.0 sec  1.18 MBytes  9.90 Mbits/sec   1.497 ms    0/  842 (0%)
[  4]  2.0- 3.0 sec  1.19 MBytes  10.0 Mbits/sec   1.280 ms    0/  850 (0%)
[  4]  3.0- 4.0 sec  1.20 MBytes  10.1 Mbits/sec   1.171 ms    0/  855 (0%)
[  4]  4.0- 5.0 sec  1.19 MBytes  9.98 Mbits/sec   1.116 ms    0/  849 (0%)
[  4]  0.0- 5.0 sec  5.96 MBytes  9.99 Mbits/sec   1.249 ms    0/ 4250 (0%)
[  4]  0.0- 5.0 sec  1 datagrams received out-of-order

[  3] local 192.168.0.101 port 5001 connected with 192.168.0.100 port 62321
[  3]  0.0- 1.0 sec  1.52 MBytes  12.7 Mbits/sec   1.271 ms    0/ 1082 (0%)
[  3]  1.0- 2.0 sec  1.99 MBytes  16.7 Mbits/sec   0.983 ms    0/ 1423 (0%)
[  3]  2.0- 3.0 sec  1.79 MBytes  15.0 Mbits/sec   1.177 ms    0/ 1279 (0%)
[  3]  3.0- 4.0 sec  1.79 MBytes  15.0 Mbits/sec   0.960 ms    0/ 1277 (0%)
[  3]  4.0- 5.0 sec  1.79 MBytes  15.0 Mbits/sec   0.960 ms    0/ 1275 (0%)
[  3]  0.0- 5.0 sec  8.89 MBytes  14.9 Mbits/sec   1.048 ms    0/ 6338 (0%)
[  3]  0.0- 5.0 sec  1 datagrams received out-of-order

[  3]  0.0- 1.0 sec  1.58 MBytes  13.3 Mbits/sec   0.943 ms  226/ 1355 (17%)
[  3]  1.0- 2.0 sec  1.83 MBytes  15.3 Mbits/sec   1.098 ms  488/ 1790 (27%)
[  3]  2.0- 3.0 sec  1.96 MBytes  16.4 Mbits/sec   1.284 ms  277/ 1673 (17%)
[  3]  3.0- 4.0 sec  2.01 MBytes  16.9 Mbits/sec   1.022 ms  273/ 1710 (16%)
[  3]  4.0- 5.0 sec  1.57 MBytes  13.2 Mbits/sec   1.222 ms  529/ 1652 (32%)
[  3]  0.0- 5.2 sec  9.28 MBytes  15.0 Mbits/sec   0.932 ms 1874/ 8496 (22%)
[  3]  0.0- 5.2 sec  1 datagrams received out-of-order

I considered trying to update the Realtek driver, but found that there are some XBMC dependencies that don't play nicely if you sudo apt-get update (I had to wipe and reinstall Raspbmc). Is there a good way to update just the Realtek driver without using apt-get, so that I can narrow the problem down to hardware or software?

  • My rt8192 based WiFi dongle connects with 150MBit/s to my router, but I still don't get more than 1-2 MByte/s. Lots of neighbour WiFis though. I think you may not get that much more performance out of WiFi. – Arne Apr 11 '13 at 5:42
  • Ditto Arne: no one really gets 10 and 20 MB/s rates. Do you have a comparison to another device on the same WLAN? Using upgrade couldn't help you unless the update includes a kernel update, which the does not seem to happen very often with the raspbian kernels (in fact, I don't think it has happened at all since 3.2.27+). – goldilocks Apr 11 '13 at 9:00
  • Umm... How were you able to reach even 20 Mbps? My internet speed (any info coming in via Ethernet) maxes out at around 1 Mbps. – xxmbabanexx Apr 11 '13 at 13:48
  • iperf sets the speed and generates the packets. It's an internal network speed test. I have a NAS with a gigabit wired connection to my n router, so if I'm streaming from the NAS it's the wireless connection that's (presumably) the bottleneck. – Adam Lawrence Apr 11 '13 at 16:24
2

Your router is in b/g/n mixed mode which will not perform up to n standards even with an n device; I use 2 WLANs at home, one in mixed mode for non-n devices and one exlclusively n mode for the n capable things.

If you google "mixed mode packet loss" you'll find various stories similar to yours.

  • Hmmm. I specifically disabled b in the router setup (it should only be g and n). That being said, a completely separate router for g may not be a bad idea. – Adam Lawrence Apr 11 '13 at 16:11
  • Splitting the network to b/g and n APs allowed the Pi to connect at 150Mbit/s and even at 40M/s with iperf, the packet loss is maximum 2%. Bravo! – Adam Lawrence Apr 12 '13 at 2:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.