Tenda W311M is a mini USB WiFi adapter. It use Ralink RT5370 chip.

gary@ubuntu:/proc$ lsusb
Bus 001 Device 002: ID 148f:5370 Ralink Technology, Corp. 

TP-LINK TL-WN727N also has the exact chipset as Tenda W311M, and the instructions below also apply to TP-LINK TL-WN727N.

Devices with RT5370 chipset do not work out of the box in Ubuntu 11.10 to 12.04. They work automatically in Ubuntu 12.10.

There are two drivers supporting this chip, a driver supplied by RALink and the rt2800usb which is part of the Linux kernel tree.

Ralink Driver must be compiled. Ralink only supports Infrastructure and Ad-Hoc mode.

1. Download the Linux driver from Ralink

RT3070/RT3072/RT3370/RT5370/RT5372 all-in-one driver package. The latest version is v2.5.0.3

http://www.ralinktech.com/en/04_support/support.php?sn=501

2. Extract the package to user home, and rename the directory name to sta, for example.

3. Change HAS_WPA_SUPPLICANT and AS_NATIVE_WPA_SUPPLICANT_SUPPORT from n to y in os/linux/config.mk

# Support Wpa_Supplicant

HAS_WPA_SUPPLICANT=y

# Support Native Wpa_Supplicant for Network Maganger

HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y

4. now just make, make install, and register your module with modprobe

sudo su
make
make install
modprobe rt5370sta

5. To enable the module at each boot add your module to /etc/modules

echo rt5370sta >> /etc/modules

Thanks to vitoshka@

rt2800usb driver

rt2800usb is more powerful. "The rt2x00 driver is currently in the kernel tree marked as experimental."

If the kernel is 3.0.0-12 above(?), it's very easy to enable the driver.

sudo modprobe rt2800usb
echo 148F 5370 | sudo tee /sys/bus/usb/drivers/rt2800usb/new_id

Then there will be an interface named wlan0

Make the driver loaded at every boot (this step is not needed if you use the udev method below).

echo "rt2800usb" | sudo tee -a /etc/modules

Removing rt5730 module if was installed

Remove the rt5370sta module if you added it like in the Ralink driver section above.

Open the modules list

sudo gedit /etc/modules

and delete "rt5370sta" from the list. Save and close.

Unload the rt5370sta module

sudo modprobe -r rt5370sta

Enable support in udev

"udev is a generic kernel device manager. It listens to events the kernel sends out if a new device is initialized or a device is removed from the system. The system provides a set of rules that match against exported values of the event and properties of the discovered device. A matching rule will possibly name and create a device node and run configured programs to set-up and configure the device." ---chili555@

Suppose you're using GNOME

gksu gedit /etc/udev/rules.d/95-RT5370.rules

A new empty document will open. Copy and paste the text as follows:

SUBSYSTEM=="usb", ATTR{idVendor}=="148f", ATTR{idProduct}=="5370", RUN="/etc/RT5370.sh"

save and close gedit Create another file

gksu gedit /etc/RT5370.sh

A new empty document will open. Copy and paste the text as follows:

#!/bin/sh
modprobe rt2800usb
echo 148F 5370 > /sys/bus/usb/drivers/rt2800usb/new_id

save and close gedit

make the file executable

sudo chmod +x /etc/RT5370.sh

so the two files looks like below

root@ubuntu:~# cat /etc/udev/rules.d/95-RT5370.rules 
SUBSYSTEM=="usb", ATTR{idVendor}=="148f", ATTR{idProduct}=="5370", RUN="/etc/RT5370.sh"

root@ubuntu:~# cat /etc/RT5370.sh 
#!/bin/sh
modprobe rt2800usb
echo 148F 5370 > /sys/bus/usb/drivers/rt2800usb/new_id

Configure Access Point Mode

The W311M can work as an access point with hostapd >=0.7.3. And there is more

gary@ubuntu:~/sta/os/linux$ iw list
Wiphy phy0
        Band 1:
                Capabilities: 0x172
                        HT20/HT40
                        Static SM Power Save
                        RX Greenfield
                        RX HT20 SGI
                        RX HT40 SGI
                        RX STBC 1-stream
                        Max AMSDU length: 7935 bytes
                        No DSSS/CCK HT40
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
                Minimum RX AMPDU time spacing: 2 usec (0x04)
                HT RX MCS rate indexes supported: 0-7, 32
                TX unequal modulation not supported
                HT TX Max spatial streams: 1
                HT TX MCS rate indexes supported may differ
                Frequencies:
                        * 2412 MHz [1] (20.0 dBm)
                        * 2417 MHz [2] (20.0 dBm)
                        * 2422 MHz [3] (20.0 dBm)
                        * 2427 MHz [4] (20.0 dBm)
                        * 2432 MHz [5] (20.0 dBm)
                        * 2437 MHz [6] (20.0 dBm)
                        * 2442 MHz [7] (20.0 dBm)
                        * 2447 MHz [8] (20.0 dBm)
                        * 2452 MHz [9] (20.0 dBm)
                        * 2457 MHz [10] (20.0 dBm)
                        * 2462 MHz [11] (20.0 dBm)
                        * 2467 MHz [12] (20.0 dBm) (passive scanning, no IBSS)
                        * 2472 MHz [13] (20.0 dBm) (passive scanning, no IBSS)
                        * 2484 MHz [14] (20.0 dBm) (passive scanning, no IBSS)
                Bitrates (non-HT):
                        * 1.0 Mbps
                        * 2.0 Mbps (short preamble supported)
                        * 5.5 Mbps (short preamble supported)
                        * 11.0 Mbps (short preamble supported)
                        * 6.0 Mbps
                        * 9.0 Mbps
                        * 12.0 Mbps
                        * 18.0 Mbps
                        * 24.0 Mbps
                        * 36.0 Mbps
                        * 48.0 Mbps
                        * 54.0 Mbps
        max # scan SSIDs: 4
        Supported interface modes:
                 * IBSS
                 * managed
                 * AP
                 * AP/VLAN
                 * WDS
                 * monitor
                 * mesh point
        Supported commands:
                 * new_interface
                 * set_interface
                 * new_key
                 * new_beacon
                 * new_station
                 * new_mpath
                 * set_mesh_params
                 * set_bss
                 * authenticate
                 * associate
                 * deauthenticate
                 * disassociate
                 * join_ibss
                 * Unknown command (68)
                 * Unknown command (55)
                 * Unknown command (57)
                 * Unknown command (59)
                 * Unknown command (67)
                 * set_wiphy_netns
                 * Unknown command (65)
                 * Unknown command (66)
                 * connect
                 * disconnect


CategoryWireless

WifiDocs/Device/Tenda_W311M (last edited 2012-11-14 20:55:15 by cpc25-brad18-2-0-cust112)