# Linksys WUSB600N and Gentoo, please help needed. [SOLVED]

## Mercurioneo

Hello everyone, 

I am new in this forum and in gentoo. I have installed gentoo for the first time two days ago, I did it through ubuntu with stage 3, because I wasn't able to do it with the minimal cd of installation, the reason is that my Linksys WUSB600 wireless device doesn't work with minimal cd and default installation. I would need your help to know how can I do this device to work for installation (for the next time), but most important after installation. I suppose that I have to mark something at menuconfig previous to kernel compilation...

If you can help me it would be great, and any help will be very appreciated. 

Thank you very much for your help and time.Last edited by Mercurioneo on Wed Jan 14, 2015 12:45 pm; edited 1 time in total

----------

## Mercurioneo

I have been investigating and it seems that it is the same as Ralink rt2870. Maybe this can be a clue.

Thanks

----------

## charles17

You need to activate the corresponding ralink driver http://i.imgur.com/Tq0fnQs.png in menuconfig. Then check lspci if the driver gets listed *Quote:*   

> # lspci -k

 

Also these wiki articles could be helpful for you: 

https://wiki.gentoo.org/wiki/Wifi

https://wiki.gentoo.org/wiki/Network_management_using_DHCPCD

https://wiki.gentoo.org/wiki/Wpa_supplicant

----------

## Mercurioneo

Thank you, I did it this way, the problem now it's that I need to configure wireless to be automatic after reboot. Net-setup only works with livecd, any suggestions?

----------

## khayyam

 *Mercurioneo wrote:*   

> [...] the problem now it's that I need to configure wireless to be automatic after reboot. Net-setup only works with livecd, any suggestions?

 

Mercurioneo ... this depends entirely on what you're using to manage network, so for example netifrc:

/etc/conf.d/net

```
modules_wlan0="!plug !iwconfig wpa_supplicant dhcpcd"

wpa_supplicant_wlan0="-Dnl80211 -qq"

config_wlan0="dhcp"

enable_ipv6_wlan0="false"
```

NOTE: your 'device' may be named something other than 'wlan0' (check with 'ifconfig -a').

/etc/wpa_supplicant/wpa_supplicant.conf

```
ctrl_interface=DIR=/run/wpa_supplicant GROUP=wheel

update_config=1

network={

   ssid="name_of_AP"

   psk="your_psk_here"

   # other parameter ... if needed

}
```

Once configured you add the service to the runlevel (here 'default') and 'start' it.

```
# ln -s /etc/init.d/net.lo /etc/init.d/net.wlan0

# rc-update add net.wlan0 default

# /etc/init.d/net.wlan0 start
```

HTH & best ... khay

----------

## charles17

 *Mercurioneo wrote:*   

> Thank you, I did it this way, the problem now

 In case you really followed those three wiki articles it will already work automatically and nothing else to be done. No netifrc at all.

----------

## Mercurioneo

Thank you so much for your answers. I have followed the wikis but I think I did something wrong, too much time today working on it..... So I think I will try to fix it tomorrow. If wiki doesn't work for me, I will try khayyam suggestion. Thank you very much Khayyam for your detailed answer  :Smile: . I have my network without WEP pass, is open, restricted by mac. I don't know if I need to configure wpa_supplicant.conf... Maybe to just put my SSID. Finally my wifi device is named wlp0s29f7u1, so I have to replace wlan0 with it, is right?

Thanks again.

----------

## khayyam

 *Mercurioneo wrote:*   

> Thank you very much Khayyam for your detailed answer :). I have my network without WEP pass, is open, restricted by mac. I don't know if I need to configure wpa_supplicant.conf... Maybe to just put my SSID. Finally my wifi device is named wlp0s29f7u1, so I have to replace wlan0 with it, is right?

 

Mercurioneo ... you're welcome. Correct, use wlp0s29f7u1 in place of wlan0. As for wpa_supplicant and open networks, you don't actually need wpa_supplicant in that case, you can use iwconfig (see: /usr/share/doc/netifrc-{version}/net.example.bz2). I'd advise against using an open network, even if "restricted by mac", as its trivial to sniff the network and gain the mac address, and then associate. You can use use wpa_supplicant (omit the psk) but as the name suggests its an 802.1x supplicant.

best ... khay

----------

## Mercurioneo

Good morning everyone,

I have read all wiki pages and I have decided to use dhcpd to manage network, but I have try a lot of configurations and it doesn't work.

My info:

wifi lan device name: wlp0s29f7u1

WEP encryption: Open but restricted by MAC

Router ip:192.168.1.1

dhcp

net mask: 255.255.255.0

I think no more info is needed to configure DHCPCD.

I have configured the following dhcpcd.conf (I didn't modify default options, only added some lines)

/etc/conf.d/dhcpcd.conf

```

hostname

duid

persistent

option rapid_commit

option domain_name_servers, domain_name, domain_search, host_name

option classless_static_routes

option ntp_servers

require dhcp_server_identifier

slaac private

DHCP

nohook lookup-hostname

interface wlp0s29f7u1

ssid Madriguera

static routers=192.168.1.1

static domain_name_servers=192.168.1.1

```

From "host" to "nohook lookup-hostname" is the default configuration at dhpcd.conf, I have just added the last 4 lines. As I told you I am really new at gentoo, and I have a lot of doubts, ssid Madriguera syntax is correct, should I use ssid "Madriguera" or ssid="Madriguera", can I check my changes without rebooting the pc doing  /etc/init.d/dhcpcd restart?

Thanks in advance for your support and patience.

----------

## charles17

 *Mercurioneo wrote:*   

> From "host" to "nohook lookup-hostname" is the default configuration at dhpcd.conf,

 Not exactly. Compared to the default http://roy.marples.name/projects/dhcpcd/tree?ci=tip you've added the DHCP line.

Does your AP provide DHCP? In that case you'd better remove any changes from dhcpcd.conf. 

Your four lines are for static IP address and are only needed if the AP doesn't provide DHCP.

----------

## Mercurioneo

 *charles17 wrote:*   

> Does your AP provide DHCP? In that case you'd better remove any changes from dhcpcd.conf. 
> 
> Your four lines are for static IP address and are only needed if the AP doesn't provide DHCP.

 

My AP provides DHCP. Can you tell me what to do? Should I remove all I added? This is how it was at the beggining and it didn't work. I suppose at least the SSID has to be provided...

----------

## charles17

 *Mercurioneo wrote:*   

> Should I remove all I added? 

 Yes.

Open wpa_gui, do a scan and connect to your AP.

(You can use Ctrl+Alt+F12 to see what happens)

----------

## Mercurioneo

 *charles17 wrote:*   

>  *Mercurioneo wrote:*   Should I remove all I added?  Yes.
> 
> Open wpa_gui, do a scan and connect to your AP.
> 
> (You can use Ctrl+Alt+F12 to see what happens)

 

Hi charles17, thanks for your patience and for the wikis that are really cool. I am a new user in gentoo, I just have followed the installation handbook..., now I don't have access to my wifi, so I don't have wpa_supplicant installed, I think the best thing I can do is to start again with installation process through Ubuntu and install wpa_supplicant before rebooting my system....

Now I don't have wifi so emerge --ask wpa_supplicant doesn't work.

Please let me know which other applications I need to install before rebooting my pc, I have removed  all I added to dhcpcd and still doesn't work, I have even commented option rapid_commid and change duid to clientid (as I have read some routers need to change this lines) and nothing changed...

Thanks again.

----------

## charles17

 *Mercurioneo wrote:*   

> Hi charles17, thanks for your patience and for the wikis that are really cool. I am a new user in gentoo, I just have followed the installation handbook..., now I don't have access to my wifi, so I don't have wpa_supplicant installed, I think the best thing I can do is to start again with installation process 

 

Hold on. No need for startover. People here will help you.  Don't dismiss your works.

Packages I can think of you were missing are wpa_supplicant and dhcpcd. There is something called sneakernetwork or so ...

What about using ethernet?

----------

## Mercurioneo

The problem is that I can't use ethernet... I have try configuration of wikis, also the proposed by khayyam, and it doesn't work, even after reinstalling gentoo. I don't know what to do next... I'm desperated... I will chroot from ubuntu to be able to paste here logs for ideas...

----------

## charles17

Please check if you are having the driver listed in "lspci -k" *Quote:*   

> $ /usr/sbin/lspci -k
> 
> 08:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02)
> 
>         Subsystem: Hewlett-Packard Company PRO/Wireless 3945ABG [Golan] Network Connection
> ...

 

And does the driver and firmware get loaded on reboot? dmesg will tell you. *Quote:*   

> $ dmesg | grep 08:00.0
> 
> [    0.153630] pci 0000:08:00.0: [8086:4222] type 00 class 0x028000
> 
> [    0.153682] pci 0000:08:00.0: reg 0x10: [mem 0xe8000000-0xe8000fff]
> ...

 

Download http://w1.fi/releases/wpa_supplicant-2.2.tar.gz and copy it into /usr/portage/distfiles/ and try emergeing wpa_supplicant-2.2-r1

----------

## Mercurioneo

It is an usb device, I have run lusb and obtain

Bus 002 Device 002:ID 1737:0071 Linksys WUSB600N v1 Dual-Band Wireless-N Network Adapter [Ralink RT2870]

Thats all.

----------

## charles17

 *Mercurioneo wrote:*   

> It is an usb device, I have run lusb and obtain
> 
> Bus 002 Device 002:ID 1737:0071 Linksys WUSB600N v1 Dual-Band Wireless-N Network Adapter [Ralink RT2870]

 So you might need to activate the corresponding usb device driver http://i.imgur.com/7m2vdoV.png. Did you?

----------

## Mercurioneo

 *charles17 wrote:*   

>  *Mercurioneo wrote:*   It is an usb device, I have run lusb and obtain
> 
> Bus 002 Device 002:ID 1737:0071 Linksys WUSB600N v1 Dual-Band Wireless-N Network Adapter [Ralink RT2870] So you might need to activate the corresponding usb device driver http://i.imgur.com/7m2vdoV.png. Did you?

 

My kernel is compiled with that driver and I even instaled firmware... The only thing is that I choose to compile as module instead of the own kernel, I don't know if this may be a problem.

----------

## Mercurioneo

I have found the following post that seems to solve the same issue

https://forums.gentoo.org/viewtopic-t-986174-highlight-rt2870.html

I will try it tomorrow and comment.

Thanks charles17 for all your help.

----------

## charles17

 *Mercurioneo wrote:*   

> I have found the following post that seems to solve the same issue
> 
> https://forums.gentoo.org/viewtopic-t-986174-highlight-rt2870.html

 The important part of that thread is *Quote:*   

> $ ifconfig -a

 I assumed you already did this within https://wiki.gentoo.org/wiki/Wifi.  Will you please help improving this wiki article with your experience.

----------

## Mercurioneo

 *charles17 wrote:*   

>  *Mercurioneo wrote:*   I have found the following post that seems to solve the same issue
> 
> https://forums.gentoo.org/viewtopic-t-986174-highlight-rt2870.html The important part of that thread is *Quote:*   $ ifconfig -a I assumed you already did this within https://wiki.gentoo.org/wiki/Wifi.  Will you please help improving this wiki article with your experience.

 

Yes I did it following the wiki step by step, and it didn't work for me. Sure I would like to help improving the wiki article, but english is not my mothertongue, I am spaniard... so I would prefer if you can do it for me. 

Finally the post linked has solved my issue. I have follow the steps and solved with a little modification, because I am not using WPA encryption, in my case the network is open and only restricted by MAC as I mention before.

So the only modification is at wpa_supplicant.conf, in my case this is the configuration that it works:

```

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

update_config=1

network={

ssid="Madriguera"

proto=RSN

key_mgmt=NONE

pairwise=NONE

auth_alg=OPEN

}

```

Also iwconfig command is needed at net file so it is mandatory to install using emerge the tool, so 

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

 previously to all steps.

Regarding MAC protection, I am not using encryption at all because I live at the countryside so no risk to be stealed by someone. That's the reason.

----------

## charles17

 *Mercurioneo wrote:*   

> So the only modification is at wpa_supplicant.conf, in my case this is the configuration that it works:
> 
> ```
> 
> ctrl_interface=/var/run/wpa_supplicant
> ...

 Did you get thet from wpa_gui?  Staying at a hotel with open WEP wlan, I got this entry autogenerated using wpa_gui

```
network={

   ssid="etap"

   key_mgmt=NONE

   auth_alg=OPEN

}
```

 *Quote:*   

> Also iwconfig command is needed at net file so it is mandatory to install using emerge the tool, so

 Did you mean /etc/conf.d/net?  That file is specific to Gentoo net.* scripts aka net-misc/netifrc. It is regardless for dhcpcd and should be deleted after unmerging netifrc.

 *Quote:*   

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

 Cannot believe that be needed for wpa_supplicant.

----------

## Mercurioneo

 *charles17 wrote:*   

> Did you get thet from wpa_gui?  Staying at a hotel with open WEP wlan, I got this entry autogenerated using wpa_gui
> 
> ```
> network={
> 
> ...

 

I put the code manually, so you are right with this one is enough

 *charles17 wrote:*   

> 
> 
> Did you mean /etc/conf.d/net?  That file is specific to Gentoo net.* scripts aka net-misc/netifrc. It is regardless for dhcpcd and should be deleted after unmerging netifrc.

 

I mean, maybe I am wrong because I am very new at gentoo but this is the code that works for me in net file

          code

modules_<your wireless NIC's name>="wpa_supplicant" 

           wpa_supplicant_<your wireless NIC's name>="-Dnl80211" 

           wpa_timeout_<your wireless NIC's name>=30 

iwconfig_<your wireless NIC's name>_mode="Managed" 

dhcpcd_<your wireless NIC's name>="-t 10" 

           config_<your wireless NIC's name>="dhcp" 

           code

In the red line iwconfig is used so I think that wirless-tools are needed to use that command 

 *charles17 wrote:*   

>  *Quote:*   
> 
> ```
> emerge -av net-wireless/wireless-tools
> ```
> ...

 

Not for wpa_supplicant but for net file according to the code used above. Please confirm if iwconfig can be used at net file without wireless-tools installed.

Thanks

----------

## charles17

 *Mercurioneo wrote:*   

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

 Your setup looks very complicated.  Guess you're having net.wlp0s29f7u1 in a runlevel?  You can check your runlevels with  *Quote:*   

> $ rc-config show all

 and *Quote:*   

> $ rc-config list

 

And for testing if your setup could be simplified you could temporarily remove net.wlp0s29f7u1 from the runlevels and put dhcpcd instead *Quote:*   

> # /etc/init.d/net.wlp0s29f7u1 stop
> 
> # rc-update del net.wlp0s29f7u1
> 
> # /etc/init.d/dhcpcd start
> ...

 After reboot, it should work out of the box. If so, you could cleanup from netifrc.  If not you still could return to net.wlp0s29f7u1.

----------

## Mercurioneo

 *charles17 wrote:*   

>  *Mercurioneo wrote:*            code
> 
> modules_<your wireless NIC's name>="wpa_supplicant" 
> 
>            wpa_supplicant_<your wireless NIC's name>="-Dnl80211" 
> ...

 

I have done it, ant it's working  :Smile: , 

1 please let me know how can I optimize the configuration of net file and wpa_supplicant. Should I change/remove any line? 

2. What should I do to cleanup from netifric?

3. If I run rc-config show all, I can still see net.wlp0s29f7u1 but without any tag as boot or default is this ok?

Thanks so much.

----------

## charles17

 *Mercurioneo wrote:*   

> 1 please let me know how can I optimize the configuration of net file and wpa_supplicant. Should I change/remove any line? 

 See 2. And, in case you are going to use wpa_supplicant you'd better use "GROUP=wheel".

 *Mercurioneo wrote:*   

> 2. What should I do to cleanup from netifric?

 See http://i.imgur.com/RndrNcw.png from the wiki.

 *Mercurioneo wrote:*   

> 3. If I run rc-config show all, I can still see net.wlp0s29f7u1 but without any tag as boot or default is this ok?

 Did you mean $ rc-config list?

After cleanup, it should no longer have any net.* service listed. It should show dhcpcd in default and wpa_supplicant not assigned.  *Quote:*   

> $ rc-config list | grep 'dhcpcd\|net\.\|wpa_supplicant'
> 
> dhcpcd                    default
> 
> wpa_supplicant

 

----------

## Mercurioneo

 *charles17 wrote:*   

>  *Mercurioneo wrote:*   1 please let me know how can I optimize the configuration of net file and wpa_supplicant. Should I change/remove any line?  See 2. And, in case you are going to use wpa_supplicant you'd better use "GROUP=wheel".
> 
>  *Mercurioneo wrote:*   2. What should I do to cleanup from netifric? See http://i.imgur.com/RndrNcw.png from the wiki.
> 
>  *Mercurioneo wrote:*   3. If I run rc-config show all, I can still see net.wlp0s29f7u1 but without any tag as boot or default is this ok? Did you mean $ rc-config list?
> ...

 

I have follow all the steps and it is still working  :Smile: .  Rc-config only shows dhcpcd as default and wpa_applicant not assignet.

Can I delete wpa_applicant.conf? How does the system know that should use my ssid if I remove that file?

Sorry for my ignorance   :Embarassed: 

----------

## charles17

 *Mercurioneo wrote:*   

> Can I delete wpa_applicant.conf?

 No, that one's needed and very important.  Only net.* script crap to be deleted. and netifrc to be unmerged.

----------

## Mercurioneo

 *charles17 wrote:*   

>  *Mercurioneo wrote:*   Can I delete wpa_applicant.conf? No, that one's needed and very important.  Only net.* script crap to be deleted. and netifrc to be unmerged.

 

Ok I see, I have added GROUP=wheel, and I have created an user out of wheel group, but still have internet connection, maybe is a stupid question, but what is the purpose of add GROUP=wheel then?

Thanks again.

Could you recommend me some guide to understand all these things?

----------

## charles17

 *Mercurioneo wrote:*   

> Ok I see, I have added GROUP=wheel, and I have created an user out of wheel group, but still have internet connection, maybe is a stupid question, but what is the purpose of add GROUP=wheel then?
> 
> Thanks again.
> 
> Could you recommend me some guide to understand all this things?

 

There are lots of information. First of all do *Quote:*   

> $ groups

 Then read *Quote:*   

> $ man 1 groups
> 
> $ man 8 wpa_supplicant
> 
> $ man 5 wpa_supplicant.conf

 

----------

## Mercurioneo

 *charles17 wrote:*   

>  *Mercurioneo wrote:*   Ok I see, I have added GROUP=wheel, and I have created an user out of wheel group, but still have internet connection, maybe is a stupid question, but what is the purpose of add GROUP=wheel then?
> 
> Thanks again.
> 
> Could you recommend me some guide to understand all this things? 
> ...

 

Thank you so much, regarding what you say about adding GROUP=wheel, I think is the same as my line ctrl_interface_group=0 in my wpa_supplicant.conf, isn't it?

----------

