Introduction
This page gives a user's notes about their experience in using this device. This page should be edited to reflect other users' experiences over time.
Device Info
Manufacturer: D-Link
Model #: DWA-140
This user's hardware version: B1
This user's firmware version: 1.10
Installation
This unit is successfully detected during installation of Ubuntu 12.04. The driver "rt2800usb" is utilised by default when this unit is detected, as demonstrated by the following terminal command:
sudo lshw -c network |
Which will produce output similar to:
*-network description: Wireless interface physical id: 1 bus info: usb@1:7 logical name: wlan0 serial: 00:1c:f0:8f:2c:f4 capabilities: ethernet physical wireless configuration: broadcast=yes driver=rt2800usb driverversion=3.2.0-29-generic firmware=0.29 ip=192.168.1.112 link=yes multicast=yes wireless=IEEE 802.11bgn
On detection of this device, the NetworkManager will allow a connection to a wireless router. However in my experience, the wireless connection would hang very frequently. A connection would be quickly established, but after a short time (varying between 1 and 10 minutes) no data would be successfully sent or recieved over the connection. It appeared that I hadn't been "disconnected" (as indicated by the wireless connection icon on the right side of the Unity panel at the top of the screen). Once the connection has hung, I could fix the problem by clicking on the WiFi icon in the top right of the screen, select "Disconnect", then click the same icon again to reconnect to the network (which it invariably did sucessfully and quickly).
Successful use
It appears that the behaviour described above is due to a default low number of "retries" for retransmission of packets in the face of radio frequency interference. The default setting can be observed with the following command:
iwconfig |
Which will produce output similar to:
lo no wireless extensions. wlan0 IEEE 802.11bgn ESSID:"XXXXXXXXX" Mode:Managed Frequency:2.462 GHz Access Point: XX:XX:XX:XX:XX:XX Bit Rate=115.6 Mb/s Tx-Power=20 dBm Retry long limit:7 RTS thr:off Fragment thr:off Power Management:on Link Quality=52/70 Signal level=-58 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:45 Missed beacon:0 eth0 no wireless extensions.
Using the command:
sudo iwconfig wlan0 retry 100 |
appears to solve the problem for the duration of a user session. Unfortunately, the retry limit is reset to 7 on every reboot.
By adding the above command to a script, these settings take effect after every reboot. First, open the script which is run whenever a network is established:
sudo gedit /etc/network/if-up.d/upstart |
Then, insert the following lines into that script:
# Increase WiFi stability by increasing retransmission limit if [ "$IFACE" = wlan0 ]; then sudo iwconfig wlan0 retry 100 fi
These settings persist if the connection is dropped or changed, but don't take effect if the device is unplugged and then plugged in again.
Other iwconfig settings which looked like they might offer some solution to similar problems, but that I haven't yet had to alter to have success:
- sens
- rts
- frag
Various forum posts suggest turning the power (management) setting off using iwconfig, but this did not help in this instance (DWA-140 used with a desktop PC).