Sunday, August 19, 2012

How to get the usb wifi/wireless adapter "Logitech LAN-W150N" working in linux...

The Logitech LAN-W150N is an ugly yet very cheap wifi adapter sold very widely in Japan...

Here's a picture:


To get it working, you'll have to get the firmware (you can also compile it yourself, as it's open source), and recompile the linux kernel to detect it properly.

In this example I'll be using Debian (squeeze).

1. Get the linux kernel's source.
sudo apt-get install linux-source-2.6.32
2. In the kernel source, add the line with "rikijpn" to the following file:
$LINUX_SOURCE_DIR/drivers/staging/rt2860/usb_main_dev.c
{USB_DEVICE(0x0789, 0x0162)},   /* Logitec 2870 */
{USB_DEVICE(0x0789, 0x0163)},   /* Logitec 2870 */
{USB_DEVICE(0x0789, 0x0164)},   /* Logitec 2870 */
{USB_DEVICE(0x0789, 0x0168)},   /* Logitec 2870 -> rikijpn */
{USB_DEVICE(0x177f, 0x0302)},   /* lsusb */
{USB_DEVICE(0x0B05, 0x1731)},   /* Asus */
{USB_DEVICE(0x0B05, 0x1732)},   /* Asus */
{USB_DEVICE(0x0B05, 0x1742)},   /* Asus */
{USB_DEVICE(0x0DF6, 0x0017)},   /* Sitecom */

3. Compile and install the kernel (as a debian package would be great, meaning portable)
Instructions to do this in this good looking guy's (my) page : http://www.rikijpn.co.cc/en/make_kernel.php

4. Install the firmware
  1. sudo apt-get install firmware-ralink
  2. And/or get the sources for the firmware (http://www.ralinktech.com/en/04_support/support.php?sn=501, get the RT2870USB(RT2870/RT2770) drivers), and changing the variables in the following files:

    in Makefile (change as proper):
    LINUX_SRC = /usr/src/linux-source-2.6.26
    LINUX_SRC_MODULE = /lib/modules/2.6.26.custom+for+fujitsu/kernel/drivers/net/wireless/
    
    and in os/linux/config.mk:
    HAS_WPA_SUPPLICANT=y
    

    then make the usual ./configure && make && sudo make install
5. Edit your network interfaces file.
In /etc/network/interfaces, add something like:
auto wlan0
iface wlan0 inet dhcp
  wpa-ssid SSID_NAME 
  wpa-psk SSID_PASSWORD
6. Install the package "iw", for managing wireless devices.

Voila! Boot your computer the newly compiled kernel, and you'll see you'll now have a /dev/wlan0 device.
Check with the commands "iwconfig", and "iwlist wlan0 scanning" or plug out and back in the usb device and check it's detected OK in dmesg.

References

No comments:

Post a Comment

Sociable