Solved

DWA-140 USB-adapter on Ubuntu 11.04 64-bit - could not get IEEE 802.11n speed, only 802.11g..

Posted on 2011-09-29
22
1,645 Views
Last Modified: 2012-05-12
I'm using a D-Link USB Wireless Adapter (DWA-140 rev. B1) on Ubuntu 11.04 (64-bit). It was installed and ran "out-of-the-box" with the rt2800usb driver. But I'm only getting 54 Mbps (IEEE 802.11g) when I run against my D-Link DIR-655 wireless router with firmware revision 1.11EU dated 2007/11/5. (Yes, I know it is an old one).  Hardware version on the router is A2.

My system is a triple boot between Ubuntu 11.04, Ubuntu 10.04 and Windows XP SP3. Without doing anything with the hardware I'm able to get 270 Mbps when running Windows XP SP3, but only 54 Mbps running Ubuntu 10.04 (with driver rt2870).

Kernel version is 2.6.38-11-generic, and it is a 64 bits system with 8 GB RAM.

I've tried to run the windows driver using ndiswrapper, but still I'm only getting 54 Mbps speed.

The adapter is listed in the hardware compatibility list for Ubuntu (https://help.ubuntu.com/community/HardwareSupportComponentsWirelessNetworkCardsDlink#USB).

Does the kernel support IEEE 802.11n, and do the driver support it as well ?  
Could anyone help me with this ?
0
Comment
Question by:toyboy61
  • 12
  • 10
22 Comments
 
LVL 44

Expert Comment

by:Darr247
Comment Utility
What does
$ lsusb | grep D-L

return?
0
 

Author Comment

by:toyboy61
Comment Utility
$lsusb | grep D-L returns:

Bus 003 Device 002: ID 2001:f111 D-Link Corp. DBT-122 Bluetooth adapter
Bus 001 Device 003: ID 07d1:3c09 D-Link System DWA-140 RangeBooster N Adapter(rev.B1) [Ralink RT2870]


0
 
LVL 44

Expert Comment

by:Darr247
Comment Utility
I find conflicting info online about whether the DWA-140 revB has a 28xx or 30xx chipset in it.
Although lsusb is saying Ralink RT2870, I'm thinking it's pulling that info from a database or from the currently loaded ko module, rather than by interrogating the device.

If you go to DLink's web site to download the DWA-140 drivers, and tell it you have a rev B adapter, the file inside the zip they make available for linux drivers has "2010_0413_RT3070_Linux_STA_v2.1.3.0.tar.gz" inside it, containing the actual drivers.

So, I suggest following the instructions in message #3 at http://ubuntuforums.org/showthread.php?t=1542500

In case that site goes offline, the pertinent part of the message is

There's another way. Go to D-Link.com and download the linux driver. 

These are the instructions
Driver Install:
Please use following command 
> sudo tar xvf 2010_0413_RT3070_Linux_STA_v2.1.3.0.tar.gz
> cd 2010_0413_RT3070_Linux_STA_v2.1.3.0
> sudo make
> sudo make install

#plugin the DWA-140(USB device) then the driver should be loadup by system.
# now user may use "networkmanager" to site survey and connect to AP.

Open in new window


If I had wrote them myself, I would have used $ as the prompt indicator instead of the greater-than sign (>).

You may also need to blacklist the RT2870 drivers if you're unable to remove them.
How to blacklist a driver is mentioned in numerous places in that thread.

What's not mentioned there is the link to the linux drivers from D-Link... here it is:
ftp://ftp.dlink.com/Wireless/dwa140_revB/Drivers/dwa140_revB_linux_drivers_2130.zip

After unzipping it, you'll find the 2010_0413_RT3070_Linux_STA_v2.1.3.0.tar.gz file referenced by those instructions.

That file is dated 07/27/2010, so you should be able to peek in
ftp://ftp.dlink.com/Wireless/dwa140_revB/Drivers/
to look for newer files if you want.

I found that ftp site by downloading the file using D-Link's web interface (dlink.com, Support, enter DWA-140 in the Search box, select rev B, and finally click the Drivers link that appears after all that), then copying the download link from my browser's 'view downloads' history, and backing up the 'breadcrumb trail' until I got to the file listing.
0
 

Author Comment

by:toyboy61
Comment Utility
Darr247: When I tried to compile it (sudo make) I got the following errors:

make  -C  /lib/modules/2.6.38-11-generic/build SUBDIRS=/usr/lib/2010_0413_RT3070_Linux_STA_v2.1.3.0/os/linux modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.38-11-generic'
  CC [M]  /usr/lib/2010_0413_RT3070_Linux_STA_v2.1.3.0/os/linux/../../common/rtmp_init.o
/usr/lib/2010_0413_RT3070_Linux_STA_v2.1.3.0/os/linux/../../common/rtmp_init.c: In function ‘RtmpRaDevCtrlInit’:
/usr/lib/2010_0413_RT3070_Linux_STA_v2.1.3.0/os/linux/../../common/rtmp_init.c:3710:2: error: implicit declaration of function ‘init_MUTEX’
/usr/lib/2010_0413_RT3070_Linux_STA_v2.1.3.0/os/linux/../../common/rtmp_init.c:3711:2: warning: passing argument 2 of ‘os_alloc_mem’ from incompatible pointer type
/usr/lib/2010_0413_RT3070_Linux_STA_v2.1.3.0/include/rtmp.h:5707:13: note: expected ‘UCHAR **’ but argument is of type ‘UCHAR *’
make[2]: *** [/usr/lib/2010_0413_RT3070_Linux_STA_v2.1.3.0/os/linux/../../common/rtmp_init.o] Error 1
make[1]: *** [_module_/usr/lib/2010_0413_RT3070_Linux_STA_v2.1.3.0/os/linux] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.38-11-generic'
make: *** [LINUX] Error 2

I found something about this on http://www.linuxcrew.de/blog/2010/10/11/rt2870-compile-error-under-kubuntu-maverick-10-10/?lang=en, but it was related to the RT2870-driver. I tried to follow the instructions, but I do not find any "usr_buffer_alloc()" in the file "rt_linux.h" which resides in /include/os-directory under the driver directory (2010_0413_RT3070_Linux_STA_v2.1.3.0).

I have tried to google the error messages, but I have not find anything I could use. What do I do now ?
(Maybe I should try to use the RT2870-driver instead??).

Seems to me that the RT3070-driver is meant for the B2 revision, but I'm not sure..
0
 
LVL 44

Expert Comment

by:Darr247
Comment Utility
On the D-Link website, when navigating to the downloads, it only differentiates between the DWA-140 and the DWA-140 revision B, not between B1 and B2. http://www.dlink.com/products/?pid=DWA-140&tab=3
0
 

Author Comment

by:toyboy61
Comment Utility
Darr247: I'll try the RT3070-driver. If it works it would be great for me. But I have to solve the problem with the compiler error first...

0
 

Author Comment

by:toyboy61
Comment Utility
Darr247: I'm not able to connect to the site http://www.ralinktech.com/support.php?s=2 to get the patch  2.5.0.2, which seems to be necessary to be able to compile the RT3070-driver. When I try to connect I get a timeout..  I have searched for it elsewhere, but everyone is pointing to this site.. :-(

BTW: I downloaded and compiled/installed the RT2870-driver, and it's a bit more stable than the RT2800usb-driver. But still it's only 54 Mbps.. :-((



0
 
LVL 44

Expert Comment

by:Darr247
Comment Utility
If you go to http://www.ralinktech.com/en/04_support/support.php?sn=501
it appears the current version for the 3070 chipset is 2.5.0.3 (released just a few days ago).
That file's download link is right at the top of that page. You have to enter a name, email and click Agree before it allows downloading the BZip containing the 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO tarball.

Note there's a 2.4.0.1 file for the 2870 USB further down the page, but not a 2.5.x.x file.
0
 

Author Comment

by:toyboy61
Comment Utility
Darr247: I wanted to know for sure what chipset my adapter contained so I opened it.. :-)
There I found the following:
RT2870F
GS96210D0
0706ST

According to this my DWA-140 Rev. B1 adapter contains a RT2870-chip, and so the RT3070-driver is not relevant here.

Since I have installed the newest version of the driver for my adapter I begin to suspect the firmware version on my wireless router. I'll try to upgrade it as soon as possible.

Any other suggestions?


0
 
LVL 44

Expert Comment

by:Darr247
Comment Utility
D-Link should differentiate between B1 and B2 on their website, then.
I reported it on the .com site.

Yes, you should update your router to the 1.31eu firmware downloaded from the .co.uk site's page for the A2 H/W version.

Setting the proper time zone in your profile here can help prevent experts sending you to the wrong web sites... if you apply the DIR-655 firmware available from the dlink.com site, it could brick your router. You might suggest to EE that they just leave the time zone blank (or say "not set") if the customer doesn't set it, instead of defaulting it to Pacific Time. I've suggested that numerous times, but maybe coming from a customer it would mean more to them.
0
 

Author Comment

by:toyboy61
Comment Utility
Darr247: Yes, I agree with that. They should differentiate between B1 and B2 on their website.

I downloaded the firmware version from the D-Link site for my country (which is Norway). I was aware of the fact that downloading and using another version (i.e. the North American version) could make my router unusable.

Although Norway is not a member of the European Union (EU) we are still defined as "EU area" regarding software updates etc. :-).

I'll set my time zone to the correct value, and I will report to EE about it.
0
Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

 
LVL 44

Expert Comment

by:Darr247
Comment Utility
I think in this instance D-Link uses 'eu' as an abbreviation for europe, not for the EU; the DIR-655 firmware from dlink.com has 'na' in the filename (but not as a version suffix), for north america.
0
 

Author Comment

by:toyboy61
Comment Utility
You're right about that. EU is an well-known abbreviation for the European Union here in Norway, so that was my first thought. :-). But then the EU-version MUST be valid also for Norway, since we definitely is part of Europe.

I chatted with a representative from EE yesterday about the time zone issue. She should take it to the User Interface Team as a suggestion from me. I argued the same way you did to me, and after a while she took the point. But her argument was that since the EE is situated in the Pacific Time Zone it was natural to use that as a standard time zone for new users/customers. The future will show what they will do about it.



 
0
 

Author Comment

by:toyboy61
Comment Utility
Darr247: I have updated my wireless D-Link router (DIR-655) to firmware version 1.31EU, but still I'm only getting 54 Mbps on my DWA-140 wireless adapter. Arrgh!!!

I think my next step would be to stop using the build-in network manager (which there is a GUI for in Ubuntu), and try to set it up using the wpa_supplicant script/application. Or do you have any other suggestions ?



0
 
LVL 44

Expert Comment

by:Darr247
Comment Utility
The WPA2 supplicant should be built into the kernel by 2.6.xx.

Are you able to get faster than 54Mbps with ANY b/g/n adapter?
Try turning off all other wireless devices that are connecting to your DIR-655 (there should be a screen in the DIR-655's web interface that shows currently connected clients).
0
 

Author Comment

by:toyboy61
Comment Utility
I have tried a NetGear N300 Wireless USB Adapter on Ubuntu Linux. Since there is no native Linux-drivers for this adapter I had to use ndiswrapper with the Windows driver. Even if this is a 802.11n compliant adapter I was only able to get 54 Mbps as well on this.

But as I stated earlier in this thread: I have a multi-boot setup on my machine, and with the same hardware setup I was able to get 270 Mbps with Windows XP SP3. So as far as I can see this is a driver/configuration issue..
0
 
LVL 44

Expert Comment

by:Darr247
Comment Utility
I think you're right.

But I still find it very odd, as I've never seen a similar problem with 11n only on the client adapter side before.
0
 

Author Comment

by:toyboy61
Comment Utility
There's more to it:

My smartphone connects to the router with 802.11g (according to the router). But the phone itself reports a speed of 65 Mbps(!) which should indicate 802.11n... :-). The smartphone needs some software upgrade which I haven't had time to perform yet.. :-(

My Linux-system reports 54 Mbps (802.11g) which the router also agrees upon.

I have a Fujitsu-Siemens Lifebook 4010D (an old one..) and I have installed the NetGear N300 Wireless USB Adapter on it. It runs Windows XP Pro SP3, and when I specified WPA2 with AES encryption the router shows me that I have an 802.11n connection on the 2.4 GHz waveband.

The only changes I have done on the router is upgrading the firmware from 1.11EU to 1.31EU and setting the following parameters:

WPA mode:   Auto (WPA or WPA2)    -> Old value: WPA2 only
Cipher Type: TKIP or AES                 -> Old value: TKIP

Do I have to use AES encryption on WPA2 to be able to achieve 802.11n speed (up to 300 Mbps)?

My Windows-disk on my main system is offline for the moment (The BIOS finds it, but GRUB does not recognize it. Therefore I'm not able to test my DWA-adapter in Windows at the moment. I'll look into that later on..).

Any comments ?
















0
 
LVL 44

Accepted Solution

by:
Darr247 earned 500 total points
Comment Utility
> Do I have to use AES encryption on WPA2 to be able to achieve 802.11n speed (up to 300 Mbps)?
Yes, WPA2/AES is the only encryption 11n supports, so far... but you should be able to use 'none' too.

To confirm that, I just disabled the authentication and encryption on my router, disconnected, disabled them for that network on the WiFi card in my laptop, reconnected, and made the attached screen grab (note the reported 216.0 Mbps connection... as I walked around my living room, that dropped as low as 108.0 Mbps).
11n-NoSecurity.png
0
 

Author Comment

by:toyboy61
Comment Utility
As an security "expert" (certified as an CISSP from 2004) I wouldn't dare to use a wireless connection without encryption... :-).

But now I got it working! The router reports a connection with 802.11n (2.4 GHz) and my Linux-system reports a connection speed of 270 Mbps (the same as my Windows XP-installation does with the same hardware setup). So now I'm satisfied.. :-)

The reported connection speed on the router and on my Linux-system seems to differ, but that doesn't matter to me right now. I have seen the same on our Windows-installations as well.

In the file /etc/Wireless/RT2870STA/RT2870STA.dat I have set the following parameters:

NetworkType=Infra
WirelessMode=6 (which means "11N only" according to the documentation)
SSID=<my SSID>
AuthMode=WPA2PSK
EncrypType=AES
WPAPSK=<my pre-shared key>

Then I compiled and loaded the new driver and it worked as it should.

Waiting for your comments before I give any credits on this.. :-)



0
 
LVL 44

Assisted Solution

by:Darr247
Darr247 earned 500 total points
Comment Utility
> As an security "expert" (certified as an CISSP from 2004) I wouldn't
> dare to use a wireless connection without encryption... :-).
It wasn't meant as a long-term solution, but only as a troubleshooting tool to see if it actually was a problem with the encryption that was disallowing an 802.11n connection.  :-)

It doesn't surprise me that it reports different speeds at different points, since 11n seems to renegotiate more often than I was aware. As I noted, just walking around my living room while I had encryption disabled it varied from 216 to 108 and many points in between. Probably they're both reporting the speed at which they are talking to the other side of the connection (and not at all recording/reporting the speed that the other station is 'sending').
0
 

Author Closing Comment

by:toyboy61
Comment Utility
Thanks to Darr247 for technical and moral support on this question. The solution was to configure the driver with WPA2PSK as authentication (WPA2 with pre-share key) and AES encryption.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Tired of waiting for your show or movie to load?  Are buffering issues a constant problem with your internet connection?  Check this article out to see if these simple adjustments are the solution for you.
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now