Search This Blog

Sunday, January 31, 2010

Getting Buffalo NFiniti wireless adapter working in linux

Recently, in getting the home dvr setup and working, it needed to be moved into another room. The best solution would be to run cat5 cable to that room, but to do it properly was going to be cumbersome, getting into the attic and running wires is not fun. The easy solution was to get wireless setup on the pc.

I searched and found a reasonably priced wireless-n card on Amazon. It was a Buffalo NFinity Wireless-N USB 2.0 adapter. This will hopefully give me the needed speed when viewing HD content on my PS3 in another room.

Well, the product arrives, and the process of getting installed under Linux began. Unfortunately it did not work "out of the box" so I started searching for what the card really was.... and in the end, it turns out to be a Ralink chipset card, and uses the RT3070USB drivers. They are downloadable from their website. This was like 3 or 4 hour search.

But the fun did not end there. Come to find out, the card may or may not have its "id" in the files provided from Ralink, so I had to modify the source to get it to work. Finally, after that, it worked like a charm.

Here are the steps I took to get this card working in Myth/Ubuntu 9.10...

1. Obtain drivers from Ralink (Ralink Driver Site).
2. Download the RT3070USB(RT307x) driver. In my case it was 2009_1110_RT3070_Linux_STA_v2.1.2.0.tar.bz2
3. Uncompress the resulting file with tar -xvzf 2009_1110_RT3070_Linux_STA_v2.1.2.0.tar (change as needed for the most current driver)
4. CD to the directory created
5. CD to the os/linux directory
6. Open the config.mk file in your favorite editor
7. In the config.mx file, change the HAS_WPA_SUPPLICANT=n and the HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=n lines to have =y on the end instead of =n.
8. Save the file.
9. In a terminal window, type in lsusb. You should get a line that ends in Melco, Inc.
10. Notate the ID for the device, in my case it was 0411:015d
11. Open the usb_main_dev.c in your favorite editor.
12. Search for the id earlier in the form of 0x0411,0x15d.
13. If it is found, you are good to go, else add a line to the end of the list that looks like this.... {USB_DEVICE(0x0411,0x015d)}, /* Baffulo WIFI N USB */ If this line is not present, it will not detect and associate the device to the driver.
14. Save and exit out of your editor.
15. CD back to the main directory.
16. Make the driver, sudo make
17. Install the driver, sudo make install
18. To be on the safe side, at this point I restarted. When the pc came back up, I just used the wireless manager in GNome to setup the network connection.

Some futher issues I ran into was that for whatever reason, traffic was still trying to go out the eth0 and not the new wireless connection. I had to edit my /etc/network/interfaces file and comment out the auto eth0 line. At this point, when the pc starts, the wireless connects and works just fine. There were some other things that were specific to my setup with MythTV, but I'll leave those out unless someone asks.

Hopefully this helps someone.

4 comments:

  1. Thanks Chris,
    I have the same adapter. I'm no linux genius so a few things baffle me. For instance, I plugged my Nfiniti in the usb slot on my notebook, and it seems to recognize it and find my router. I configure it with my router password and it seems to try but no luck. My lsusb lists ID 0411:015d MelCo., Inc. as it did yours. So is this article of yours suggesting that I dump the assigned driver and follow your directions?

    ReplyDelete
  2. Thanks for the instructions.
    There are a few changes in the latest version (DPO_RT3070_LinuxSTA_V2.3.0.4_20100604)
    -first the tar file seems to have been "tared" twice so you need call bunzip then call tar twice...
    -the USB IDs have moved from usb_main_dev.c to common/rtusb_dev_id.c
    -the config.mk contains the right WPA settings and doesn't need to be modified

    ReplyDelete
  3. Hi I wonder what is the list/array look like as you mentioned in point 13?
    "13. If it is found, you are good to go, else add a line to the end of the list that looks like this.... {USB_DEVICE(0x0411,0x015d)}, /* Baffulo WIFI N USB */ If this line is not present, it will not detect and associate the device to the driver."

    ReplyDelete
  4. This comment has been removed by a blog administrator.

    ReplyDelete