# configuring Ralink USB wireless - confused total beginner

## Jeff_texas

I'm utterly and totally new at gentoo. So be kind. Over the last couple of days I've followed the gentoo handbook and successfully partitioned my disk, got wired networking to work, downloaded the stage three tarball, built the kernal, and even emerged several packages (including x11 and xfce). So overall I'm feeling pretty good about my progress.

But I can't get my USB dongle wireless adapter to work. (It works fine under other Linuxi distros, including Fedora and Ubuntu). Unfortunately, I can't describe my configuration as precisely as I would like because I've tried so many different things, sometimes not understanding exactly what I was doing. But here's the general situation:

1. lsusb shows "Bus 001 Device 003: I 148f:3070 Ralink Technology, Corp. RT2870/RT300 Wireless Adapter (and some other things).

2. ifconfig shows enp3s0 (ethernet adapter) and lo. No sign of wlan0 or anything similar.

3. iwconfig shows "lo   no wireless extensions"  and  "enp3s0   no wireless extensions."

4. wpa_gui running under xfce (I'm not even sure when I installed it)  shows nothing at all in Adapter and Network dropdown lists.

5. I have rebuilt the kernel many times with every option in menuconfig that looked like it might possibly be related to the Ralink adapter, including the Ralink USB device driver.

6. I have emerged the linux_firmware package, which I read somewhere might be needed. No luck.

7. I have tried using genkernel all to build a kernel with (as I understand it) pretty much everything. Still no luck.

So I'm stuck. I've spent a couple of days reading in these forums and elsewhere and randomly trying different things, without success. And again, I'm totally new at this.

Any advice on what to try and where to go next? (I don't really think it's a complicated hardware support issue: this appears to be a common and well-supported device. I think I probably just need to be pointed in the right direction.)

Thanks.

----------

## DONAHUE

```
ifconfig -a
```

 if wireless NIC appears the kenel can find it and install a driver for it. Did the kernel find it? If so, what is its name?

```
cd /usr/src/linux;make menuconfig
```

 edit to include:  *Quote:*   

> -*- Networking support  --->
> 
> -*-   Wireless  --->
> 
> --- Wireless
> ...

 mount /boot if appropriate, recompile, recopy the kernel

if needed 

```
emerge dhcpcd wpa_supplicant
```

```
rc-update show
```

 If wpa_supplicant, dhcpcd, or dhcp appear in any run level use rc-update del <program> <runlevel> to remove them

```
cd /etc/init.d

ln -s net.lo net.<your wireless NIC's name>

rc-update add net.<your wireless NIC's name> default
```

```
nano /etc/conf.d/net
```

 Edit to: *Quote:*   

> modules_<your wireless NIC's name>="wpa_supplicant"
> 
> wpa_supplicant_<your wireless NIC's name>="-Dnl80211"
> 
> wpa_timeout_<your wireless NIC's name>=30
> ...

  Then 

```
nano /etc/wpa_supplicant/wpa_supplicant.conf
```

 Edit to  *Quote:*   

> ctrl_interface=/var/run/wpa_supplicant
> 
> ctrl_interface_group=0
> 
> update_config=1

  configure your network using wpa_gui; if unable add  *Quote:*   

> network={
> 
> 	ssid="yourssid"
> 
> 	psk="yourpsk"
> ...

  to wpa_supplicant.conf and hope

EDIT: to add rc-update add net.<your wireless NIC's name> default

----------

## Jeff_texas

Ifconfig -a shows enp3s0 (ethernet adapter) and lo. No sign of any wireless adapter.

Once that is resolved I will follow your instructions about building the kernel (although I think I have already built it with all of the menuconfig options you specifh).

Thanks for the quick reply.

----------

## DONAHUE

The kernel has to be right for the wireless nic to appear in ifconfig -a.

----------

## Jeff_texas

Okay, you're saying that I need to follow your instructions and rebuild the kernel now? (Sorry, I misunderstood. I thought you meant that having the adapter appear in the ifconfig list needed to happen _before_ I tried rebuilding the kernel.)

Would it maybe be better for me to start over completely from the beginning and resinstall gentoo from the tarball (given that I have installed a variety of things and am not entirely sure of the state of my system), or should rebuilding the kernel with the options you specify and following your other instructions probably be sufficient?

Thanks again.

----------

## DONAHUE

no, reinstall is only hope for many windows probs. linuxes are best repaired; particularly source based linux

----------

## DONAHUE

the no wireless in ifconfig -a is purely a kernel config problem unless the hard ware is broken. could be in usb configuration also does lsusb (emerge usbutils to get it) run from the installed gentoo find the NIC?

what is the result of 

```
 lsmod | grep -i rt
```

 With the kernel as recommended? I see  *Quote:*   

> rt2800usb              20651  0 
> 
> rt2x00usb              10354  1 rt2800usb
> 
> rt2800lib              75066  1 rt2800usb
> ...

 

----------

## Jeff_texas

I'm currently working on rebuilding the kernel.

Even before kernel rebuild, lsusb shows "Bus 001 Device 003: I 148f:3070 Ralink Technology, Corp. RT2870/RT300 Wireless Adapter" (and some other things).

I take that to mean that it's not a USB issue.

----------

## DONAHUE

agreed unlikely to be usb config then.

----------

## Jeff_texas

Built kernel okay.

In step:

```
ln -s net.lo net.<your wireless NIC's name>
```

What is my wireless NIC's name? Or where do I find it? (I have a feeling this is really dumb question, but I'm confused.)

----------

## DONAHUE

should appear in 

```
ifconfig -a 
```

 when the correct driver is loaded should require a reboot or 

```
modprobe rt2800
```

 after make and make modules_install has run on the new kernel config

----------

## Jeff_texas

Success! At least partially. NIC shows in ifconfig. Name is wlpos18f2u4. I've edited the config files per your instructions and rebooted. Just started wpa_gui. I see the adapter listed. I'm getting ready to start to conigure the network.

----------

## DONAHUE

sweet!! I say. My fingers crossed.

----------

## Jeff_texas

It works!!! Yay!!!

I have rolled up the ethernet cable  and am now connected to my home wireless network. 

Sometimes after somebody tells me how to do something, I look back and think that I could have figured it out eventually. But I don't get that feeling here: I don't think there is any way I could have done this without being walked through it. So again, many thanks.Last edited by Jeff_texas on Wed Mar 12, 2014 3:33 am; edited 1 time in total

----------

## DONAHUE

enjoy.

----------

## Mercurioneo

 *DONAHUE wrote:*   

> enjoy.

 

Hello,

I would like to say thanks for this post, it helps me to solve my problem with linksys WUSB600N v1, which uses ratlink rt2870.

Only a pair of things, in my case I don't have any pass in my network, it is only protected by MAC, I live at the countryside and nobody is going to steal my network, I use MAC but perfectly could be with no protection at all.

wpa_supplicant.conf that fix the problem for me is:

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

update_config=1

network={ 

   ssid="etap" 

   key_mgmt=NONE 

   auth_alg=OPEN 

}

```

Finally one thing that was needed for me is to install wireless tools to be able to use iwconfig, so previous to all steps of your guide

```
emerge -av net-wireless/wireless-tools
```

Once again, thank you so much for your help.  :Smile: 

----------

