# [Solved]Help with setting up my wireless! :O

## rabcor

I'm feeling very stupid here because i'm so damn close to getting this right... but gave up after hours of trying to make it work, and its probably working but i just don't know how to make it work right.

my card is Intel Centrino Advanced-N 6200 and the native linux driver should be iwlagn but the kernel insists on using iwlwifi.

lspci -v gives me

```
03:00.0 Network controller: Intel Corporation Centrino Advanced-N 6200 (rev 35) 

Subsystem: Intel Corporation Centrino Advanced-N 6200 2x2 AGN 

Flags: bus master, fast devsel, latency 0, IRQ 45 

Memory at f2400000 (64-bit, non-prefetchable) [size=8K] 

Capabilities: [c8] Power Management version 3 

Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+ 

Capabilities: [e0] Express Endpoint, MSI 00 

Capabilities: [100] Advanced Error Reporting 

Capabilities: [140] Device Serial Number 00-27-10-ff-ff-a5-2b-28 

Kernel driver in use: iwlwifi 

Kernel modules: iwlwifi 
```

so i activated the module in the kernel, and emerged iwl6000-ucode 

i emerged wireless-tools wpa_supplicant and networkmanager and (kde UI for networkmanager) networkmanagement

i did "ln -s net.eth0 net.wlan0" out of a guess from the handbook. i'm guessing theres little harm in using eth0 instead of lo right?

i've managed to get errors on running net.wlan0 related to wpa_supplicant or else, i've also managed to successfully start it. aswell as networkmanager and the UI for it.

Using said UI i was able to scan ssids by going to add, -ssid___"scan"- and i get a valid list of nearby ssids. one of which is the one i want to connect to.

doing that i selected my desired one and entered my wpa2 key. ideally that should do the trick right? apparently not. something somewhere went wrong.

my /etc/conf.d/net looks like this

```
#Generated by NetworkManager#

##### Global Configuration #####

modules="wpa_supplicant"

wpa_supplicant_wlan0="-Dwext" (found that idea [url=http://forums.gentoo.org/viewtopic-t-927346-start-0.html]here[/url]

##### Connection Configuration #####

#--------------------------------------------

config_wlan0="dhcp"

config_eth0="dhcp"

#--------------------------------------------

config_lo="127.0.0.1"
```

and my /etc/wpa_supplicant/wpa_supplicant.conf looks like this

```
ctrl_interface=/var/run/wpa_supplicant

network={

  ssid="a valid ssid"

  psk="very secret passphrase"

  priority=2

}
```

my ls -l /sys/class/net/ shows (for the wlan anyways)

```
lrwxrwxrwx 1 root root    0 jan 4 21:53 wlan0 -> ../../devices/pci0000:00/0000:00:1c.1/0000:03:00.0/net/wlan0 
```

Basically.

My wireless device is working, and looks like its working, but i don't find myself able to connect to a wirless network through any means i have tried, because i'm a noob and this is the first time i've tried to deal with wireless internet on linux.

additional help would be nice for 

1. How do i make my dhcp run after i get through the bootup (for example while i'm in kdm logging in) rather than during bootup, so i wont have to wait for it while booting? i need to use dhcp since this laptop will be mostly used other places than at my own home. Just being able to skip the dhcp if it fails rather than waiting for it to retry would be enough for me.

2. A good way to scan for ssids be it from terminal or from some user interface, i'm not liking the networkmanagement ssid scan.

----------

## roravun

Just a word of caution, last time I checked NetworkManager is only suitable for GUI only usage. Its command line cli tools are total garbage.

Use regular wpa_cli or wpa_gui. It has a `help` command, so you wont get lost.

About dhcp(cd) (as you are talking about a client). Take a look at /etc/dhcpcd.conf and its man page. 

I am sure you will find an option that allows you to set a timeout for ex. 2 seconds:

```

   timeout seconds

             The default timeout for waiting for a DHCP response is 30 seconds which may be too long or too short and can be

             changed here.

```

Or you could just remove 

```
 config_wlan0="dhcp" 
```

And use this just this

```

modules_wlan0="wpa_supplicant"

```

This is my entire /etc/conf.d/net on my laptop.

----------

## rabcor

ah thanks for your reply, i like the wpa_gui interface actually, can't i just skip networkmanager and wicd and just use this?

but here i'm beginning to see where the problem is, but how to fix it is beyond me.

When i try to connect to either one of the ssid's that are available to me. i get a

```
Last Message: bssid=**:**:**:**:**:** reason=0
```

* being just numbers and letters (it looks like hex to me... but i don't know what it actually is, i'm pretty certain it doesn't really matter tho)

Stratus just Flickers on and off of Scanning, Disconnected and Associationg, i could have sworn that i saw it successfully connect for a split second, authentication, encryption, ssid bssid and ip address all properly filled out but.. then it just dropped it and started scanning again.

So the problem i'm guessing is that my card always keeps scanning for networks constantly, and refuses to stay connected to a network.

my /etc/wpa_supplicant/wpa_supplicant.conf now looks just like this...

```
ctrl_interface=/var/run/wpa_supplicant 
```

i didn't see the point in having a network in there.

Also i checked on my router to make sure to see if my laptop had actually connected to it in that moment i saw it happen, and it seems it did. this laptop has never connected to the router before so i'm certain that since it just shows a trace of having actually connected to the router it did there.

Edit: I unmerged NetworkManager and NetworkManagement. i had to reboot after that for it to change anything but now i managed to make it successfully connect for some reason and it just works all of a sudden i managed to set wpa_gui to save my configurations to wpa_supplicant and now after testing some things to make sure... everything is working exactly like i want it to!  :Very Happy:  thanks a lot roravun you were a great help pointing me in the right direction and simplifying my /etc/conf.d/net configuration aswell!

Finally having my wireless up and running is a lot of stress relief, since i have to have this laptop fully functional only 5 days from now, and i haven't exactly used linux a lot yet.

----------

## roravun

Ad Edit:

Ah yes, that was to be expected. Once you let NetworkManager in you must accept it as your new lord  :Wink: 

That is you can not have NM enabled and use other stuff to control your network, as NetworkManager will constantly struggle to regain its lost control.

----------

