Saturday, 30 June 2012

Installing the Tenda W311U Mini Wireless USB Dongle

Original Post Date 30 June 2012

This install guide was completed on the latest stable release of Debian Squeeze, but it should work on later releases, such as Wheezy. This guide will give a step by step overview of how to install the Tenda W311U MiniWireless USB Adaptor.



Requirements: Make sure you have a decent power supply for the Pi (we use 2000mA adaptors to stop any low power cut-outs), in addition to a USB hub. Like most wireless dongles, the Tenda adaptor requires more power than the Pi USB ports can provide, so it will need to be plugged into a powered hub.

Also, make sure that you are connected to the internet via a LAN cable.

2. Firstly, we need to check that the OS we are using has a 'non-free' component:

sudo grep non-free /etc/apt/sources.list


Which should reveal:

deb http://ftp.uk.debian.org/debian/ squeeze main non-free


Or similar. If this is not the case, you've really buggered something up (or you're super smart). Anyway, if it doesn't say that, you'll need to change it to the above (or your local Debian ftp server), or simply format your SD card and start again with the OS.

3. We can now install the Ralink drivers.

Change the directory to where we want the drivers to go:

cd /etc/apt

And install them:

sudo apt-get install firmware-ralink

4. OK so we've installed the drivers, plug the dongle into a spare port on the USB hub and we'll query it with the lsusb command:

lsusb


This should reveal a list of the installed usb devices, including the dongle:


Bus 001 Device 005: ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter

5. As a double check, we can check the system log to see if it's registered the dongle.

dmesg

This will check the system log, and the most recent log should be the successful installation of the wifi dongle:

usb 1-1.3: new high speed USB device number 5 using dwc_otg
usb 1-1.3: New USB device found, idVendor=148f, idProduct=3070
usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-1.3: Product: 802.11 n WLAN
usb 1-1.3: Manufacturer: Ralink
usb 1-1.3: SerialNumber: 1.0
cfg80211: Calling CRDA to update world regulatory domain
usb 1-1.3: reset high speed USB device number 5 using dwc_otg
ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
Registered led device: rt2800usb-phy0::radio
Registered led device: rt2800usb-phy0::assoc
Registered led device: rt2800usb-phy0::quality
usbcore: registered new interface driver rt2800usb

Cool, it’s now been installed! Now we need to install a network manager to get on-line! There's a variation of network managers to choose from. But we have selected gnome as an example:

6. Let’s just make sure everything is up to date:

Sudo aptitude update

7. Next lets install the network manager:

Sudo aptitude install network-manager-gnome

It should come up with a warning saying that you will use SD card space, just say yes.

8. After it's installed, it's probably worth restarting your Pi. 
Now unplug your LAN and boot your Pi. 
Start up the GUI with:

startx

You should now have the network manager in the corner of the screen, next to the time. Click on this and connect to your wireless network!

Easy Peasy!

Author: Neil Ronketti with ModMyPi

15 comments:

  1. Hi Jacob,

    I followed the instructions to the letter and everything appeared to install correctly. I rebooted my Raspberry Pi, but the GUI isn't displayed by the clock in the bottom right hand corner. Do you have any suggestions/ideas how I can get it to display please?

    Thanks.

    Rob.

    ReplyDelete
  2. For what it's worth, I had to run the command

    $ sudo apt-get update

    Before

    $ sudo apt-get install firmware-ralink

    Hope this helps someone else.

    ReplyDelete
  3. Unfortunately I was completely unable to get this working so far. I've read up on blacklists but I end up getting errors with:

    phy2 -> rt2x00lib_request_firmware: Error - Current firmware does not support detected chipset when rebooting. When in xwindows no wireless networks show up.

    :(

    I've been fiddling around with blacklisting things, uninstalling / reinstalling the packages but have had no luck. The process shows failure when running dmesg

    ReplyDelete
    Replies
    1. Could be a broken dongle?
      Conflictions with the hub?
      Poor power supply not giving the dongle enough juice?
      Have you got the latest firmware?

      Delete
  4. http://raspberry-pi-notes.blogspot.com/2012/05/rt5370-cheap-micro-usb-wireless-dongle.html?showComment=1341727763228#c6460490447597855326

    was very helpful for my particular piece of hardware

    ReplyDelete
  5. how do I get on to the net once i have connected to my vigin account, which shows 87% on the bottom right hand corner of gui. Midori on the left side menu doesnt seem to work on the wifi, it does on the lan cable

    ReplyDelete
  6. I did the installation 1 to 8, everything perfect, just as the instruction show, but then I pushed the connect button and than the icon of gnome is spinning and after 5 minutes it is still spinning, in other words there comes no connection.
    What can be the problem? Driver to slow, to slow processor? I use 2A,5V power adaptar and I powered usb hub.

    ReplyDelete
    Replies
    1. yes the same happened to me, a constant spinning icon. It did connect at one stage but still couldnt get on the net. Looking at using a bridge instead.

      Delete
  7. Anyone got the W311U working in AP mode? The main reason I bought this was to set up a standalone wifi network - there are detailed instructions on the CD to do it in Windows, but I can't find anything for Linux.

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
    2. The following are quite helpful:

      - http://nims11.wordpress.com/2012/04/27/hostapd-the-linux-way-to-create-virtual-wifi-access-point/

      - http://linuxwireless.org/en/users/Documentation/hostapd

      And maybe also this one:

      - http://exain.wordpress.com/tag/hostapd/

      Delete
    3. Thanks - will try that and report back.

      Delete
  8. When following these directions, I also get the "Current firmware does not support detected chipset" when running dmesg. Anyone know a fix?

    ReplyDelete
    Replies
    1. Tenda W302R 802.11N Wireless Broadband Router
      Description:
      BRAND:
      PRODUCT NAME: Tenda W302R
      PACKAGE INCLUDE: Tenda W302R 802.11N Wireless Broadband Router x1

      PRODUCT DETAILS:
      For users on the move, the Tenda W268R router instantly creates and shares high-speed Wi-Fi hotspots.

      Get your secured wireless network up and running in minutes using the setup wizard provided by this Tenda 4-Port router.

      With the support for DHCP server/client, this wireless router minimizes configuration errors as well as IP address conflicts.

      The built-in firewall of this Tenda 4-Port router protects your network from intruders and malicious programs.

      Support for WEP encryption in this wireless router ensures safe and secured data transmission.

      Connect other peripheral devices to the Tenda W268R router through its equipped USB 2.0 port.

      Delete
  9. Hey guys! I was following this tutorial but it didn't work with me. So...I decided to edit interfaces file at /etc/network.

    USING TERMINAL:

    $ sudo nano /etc/network/interfaces

    Now, you will see something like this:

    ...
    iface wlan0 inet dhcp
    wpa-ssid "your-ssid"
    wpa-psk "your-password"
    ...

    Put your SSID and PASSWORD

    Then press CTRL + X and save ( press Y to save ).

    Now reboot using:

    $ sudo reboot

    Wait your Raspberry PI start again and...
    ENJOY YOURSELF!

    ReplyDelete