# WiFi configuration

## hrvoje

Hello everyone, I have been using various GNU/Linux distributions for a while, latest (and most complicated in terms of installation and configuration) being Arch. So I decided to try Gentoo because I want to learn more about how it works and generally for the fun of doing it.

So i have one problem left unsolved which is obviously configuring my WiFi. During installation everything works well as i setup the network using: 

```
# net-setup wlp3s0
```

though I had to change encryption from WPA2 to WEP. I assume the installation CD is using wireless-tools right? 

During installation I made a symbolic link to my interface typing: 

```
# cd /etc/init.d

# ln -s net.lo net.wlp3s0
```

and made it load at boot time using rc-update. I also installed wpa_supplicant (which took a little over 2 hours to complete and I don't know why) using: 

```
# emerge net-wireless/wpa_supplicant
```

and tried to configure it as best as i could though I must admit I don't really understand how it should be done exactly. Maybe I should try wpa_gui but I don't know what does it mean to "build wpa_supplicant with the the qt4 USE flag enabled" and there was no example of it I could find.

Next thing, when I log into my system ifconfig lists only the lo interface. ifconfig -a lists lo and sit0, so I guess maybe I have forgotten to include some modules during kernel compilation. I have Intel Corporation WiFi Link 5100 network controller and I know I should use iwlwifi driver.

Any idea on what I missed? What is the difference between including something and marking it as "module" in kernel configuration? Is there any way to include missing modules without going trough the whole installation process (I did it a few times already)? Can you suggest some good reading about kernel configuration?

----------

## DONAHUE

action steps below assume you boot the new install and have wired internet--

you probably need firmware; suggest 

```
emerge linux-firmware
```

 you will get more firmware than you need but not a significant amount in terms of bytes.

reboot, run 

```
ifconfig -a
```

 check that wlp3s0 is listed, if so the kernel has recognized your NIC and installed firmware and driver for it.

run 

```
emerge --info
```

 depending on which profile you picked you will or will not have qt4 listed in USE= line.

If you have qt4 listed and you emerged wpa_supplicant you will have installed wpa_gui. Of course you will need a GUI running in order to run wpa_gui. 

If qt4 is not currently in your global USE flags you can add it for wpa_supplicant. Create a file /etc/portage/package.use and add the line  *Quote:*   

> net-wireless/wpa_supplicant qt4

  to it. 

```
echo "net-wireless/wpa_supplicant qt4"  /etc/portage/package.use 
```

 is one way to do this. 

You can also add qt4 globally by adding it to the "USE=" line in /etc/portage/make.conf. References:

http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?style=printable&full=1#book_part2

http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?style=printable&full=1#book_part3

http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml?style=printable&full=1#book_part4

 *Quote:*   

> Is there any way to include missing modules without going trough the whole installation process (I did it a few times already)?

  Modules versus builtin is a kernel question not an install question. Modules can be built without rebuilding the kernel and be installed with modprobe or insmod while the kernel is running.

 *Quote:*   

> Can you suggest some good reading about kernel configuration?

 References:

http://kernel-seeds.org/

http://swift.siphos.be/linux_sea/

Kernel's menuconfig: *Quote:*   

> -*- Networking support  --->
> 
> --- Wireless                                                       
> 
> [*]   cfg80211 - wireless configuration API                        
> ...

 

/etc/conf.d/net should work with:   *Quote:*   

> dns_servers="8.8.8.8"
> 
> modules_wlp3s0="wpa_supplicant"
> 
> wpa_supplicant_wlp3s0="-Dnl80211"
> ...

 

need to have /etc/wpa_supplicant/wpa_supplicant.conf contain:  *Quote:*   

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

 

 start wpa_gui and configure for your network. If you can't use wpa_gui edit /etc/wpa_supplicant/wpa_supplicant.conf to add  *Quote:*   

> network={
> 
> 	ssid="your network's ssid"
> 
> 	psk="your passphrase"
> ...

  which should work for a home network.

----------

## khayyam

 *DONAHUE wrote:*   

> 
> 
> ```
> ctrl_interface=/var/run/wpa_supplicant
> 
> ...

 

DONAHUE, hrvoje ... slight correction there ... if you use wpa_gui as a user you would need to have 'group' set to set to some group the user is in (ie, the 'wheel' group) ... with "ctrl_interface_group=0" only root will be able to access the ctrl_interface (and so use wpa_gui).

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

update_config=1
```

best ... khay

----------

## hrvoje

Thanks guys, everything is up and running!

----------

