http://www.linux-hardware-guide.com/in/2013-11-16-d-link-dwa-131-n300-usb-wifi-adapter
The D-Link DWA-131 is a USB WiFi adapter, which supports wireless connections according to IEEE 802.11n standard. The stick exists in two versions, each one using a different chipset. Unfortuantely, the two chipsets are not equally supported by Linux.
Version A1: 07d1:3303
The version A1 can be recognized by its USB ID 07d1:3303
1
2
| Bus 001 Device 007: ID 07d1:3303 D-Link System Bus 001 Device 002: ID 07d1:3303 D-Link System DWA-131 802.11n Wireless N Nano Adapter(rev.A1) [Realtek RTL8192SU] |
This version of the DWA-131 bases on the Realtek RTL8191SU chipset, which is fully supported by the kernel module r8712u (e.g. since Ubuntu 13.10).
Version B1: 2001:330D
The second version of the DWA-131 has the USB ID 2001:330D
1
| Bus 001 Device 003: ID 2001:330d D-Link Corp. |
and uses the Realtek RTL8192CU chipset. The support for this chipset is provided by the kernel module rtl8192cu, but requires a Linux kernel of version 3.8 or later to work.
However, the USB ID of the DWA-131 might not be known to the kernel module. Therefore, the module is not automatically loaded. To make the rtl8192cu feel responsible for the DWA-131 one has to use the command:
1
| sudo modprobe rtl8192cu |
to load the module and the command
1
| echo "2001 330D" | sudo tee /sys/bus/usb/drivers/rtl8192cu/new_id |
to add the USB ID to the driver.
In order to have the kernel module loaded automatically at system start this command has to be added to the file /etc/rc.local:
1
2
3
4
| # Declare DWA-131 USB ID to rtl8192cu module echo "2001 330D" | tee /sys/bus/usb/drivers/rtl8192cu/new_id exit 0 |
A firmware file rtl8192cufw.bin is needed by the kernel to access the DWA-131. This file needs to be located at /lib/firmware/rtlwifi/. In Ubuntu this firmware can be installed by the command:
1
| sudo apt-get install linux-firmware linux-firmware-nonfree |
Furthermore, it is recommended to deactivate the hardware based encryption, because it causes failing of the wireless connection for several Linux users. The software encryption can be enforced by the kernel module option “swenc=1″:
1
| sudo modprobe rtl8192cu swenc=1 |
The option can be set permanently in one of the configuration files at /etc/modprobe.d/, e.g. by:
1
| options rtl8192cu swenc=1 |
Afterwards, the driver will be loaded automatically if the stick is plugged in:
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
| usb 1-5: new high-speed USB device number 4 using ehci_hcd usb 1-5: New USB device found, idVendor=2001, idProduct=330d usb 1-5: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-5: Product: 802.11n WLAN Adapter usb 1-5: Manufacturer: Realtek usb 1-5: SerialNumber: 00e04c000001 rtl8192cu: MAC address: 11:22:33:44:55:66 rtl8192cu: Board Type 0 usb 1-5: firmware: agent loaded rtlwifi/rtl8192cufw.bin into memory rtlwifi: rx_max_size 15360, rx_urb_num 8, in_ep 1 ieee80211 phy0: Selected rate control algorithm ‘rtl_rc’ udevd[573]: renamed network interface wlan0 to wlan1 rtl8192cu: MAC auto ON okay! rtl8192cu: Tx queue select: 0×05 rtl8192c_common: Loading firmware file rtlwifi/rtl8192cufw.bin ADDRCONF(NETDEV_UP): wlan1: link is not ready |
The loading of the rtl8192cu driver can be blocked, if the Linux kernel already loads other WiFi drivers (e.g. the kernel modul r8712u). This can be found out by investigating the output of
1
| lsmod |
To subpress the loading of the r8712u driver this module needs to be blocked by adding it to /etc/modprobe.d/blacklist.conf file:
1
| blacklist r8712u |
Alternatively, the DWA-131 can also be used by the Linux driver which is provided by Realtek. However, this driver needs to be compiled and installed per hand.
Version E1: 2001:3319
A new version of the DWA-131 was identified with USB ID 2001:3319
1
| Bus 001 Device 003: ID 2001:3319 D-Link Corp |
and seems to be based on the Realtek RTL8192eu chipset.
This version of the DWA-131 is recognized by the kernel:
This version of the DWA-131 is recognized by the kernel:
1
2
3
4
5
6
| usb 1-1.5: new high-speed USB device number 6 using dwc_otg usb 1-1.5: New USB device found, idVendor=2001, idProduct=3319 usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 1-1.5: Product: Wireless N Nano USB Adapter usb 1-1.5: Manufacturer: Realtek usb 1-1.5: SerialNumber: 00e04c000001 |
but currently no driver is loaded automatically.
A driver for the Realtek RTL8192eu chipset can be found at the DLink support site. It can be downloaded and unpacked by:
1
2
3
4
5
6
| cd /tmp/ mkdir DWA-131 cd DWA-131/ unzip DWA-131_Linux_driver_v4.3.1.1.zip tar zxvf 20140812_rtl8192EU_linux_v4.3.1.1_11320.tar.gz |
The unpacked file also contains an installation instruction (although it seems for the RTL8192cu chipset instead).
The compilation of the driver is started by:
1
2
| cd 20140812_rtl8192EU_linux_v4.3.1.1_11320/ make |
This creates the kernel module 8192eu.ko which can be loaded by
1
| sudo insmod 8192eu.ko |
creation date: 16/11/2013, last update: 25/04/2015 , Linux-Hardware-Guide
No comments:
Post a Comment