# My wifi nterface is active but I cannot browse the Internet

## augustin_meaulnes

Hi,

With the help of assistants on the Harware forum I could manage to set my kernel in order to have it working with my wifi Cardbus extension ( Atheros AR5001X+ Wireless Adapter).

I followed the  Gentoo documentation to write this file: /etc/wpa_supplicant/wpa_supplicant.conf

 *Quote:*   

> jaaf-laptop jaaf # cat /etc/wpa_supplicant/wpa_supplicant.conf
> 
> ctrl_interface=/var/run/wpa_supplicant
> 
> ctrl_interface_group=0
> ...

 

I also followed the  Gentoo documentation to write this file /etc/conf.d/net (le -Dnl80211 comes from an other source and seems to work)

 *Quote:*   

> jaaf-laptop jaaf # cat /etc/conf.d/net
> 
> # This blank configuration will automatically use DHCP for any net.*
> 
> # scripts in /etc/init.d. To create a more complete configuration,
> ...

 

After that the Gentoo documentation doesn't say what to do. I found in an other source that I could check my connection with this command:

```
jaaf-laptop jaaf # wpa_supplicant -Dnl80211 -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
```

 *Quote:*   

> Trying to authenticate with 00:1d:6a:d5:7d:05 (SSID='Livebox-940C' freq=2437 MHz)
> 
> Trying to associate with 00:1d:6a:d5:7d:05 (SSID='Livebox-940C' freq=2437 MHz)
> 
> Associated with 00:1d:6a:d5:7d:05
> ...

 

Looking at the Network tools GUI I can see that my wlan0 interface is now active but my browser doesn't browse.

What did I forget to do?

----------

## d2_racing

Did you try with WICD or networkmanager ?

----------

## augustin_meaulnes

I cannot emerge netwokmanager (errors)

I emerged wicd but I don't understand how to use it.

Is it something additional to wpa_supplicant or does it replace it?

----------

## augustin_meaulnes

After boot a dialog bow appears:

 *Quote:*   

> wicd needs to access your computer's network cards 
> 
> Prompt for passwd: 

  I give the passwd then

 *Quote:*   

> Message erroor box
> 
> Failed to run /usr/sbin/wicd as user root
> 
> (translated from French) The underlying  authorization mechanism (sudo) doesn't permit you to launch this programm. Please get in touch with your administartor Close

 

 after close button

 *Quote:*   

> Could not connect to wicd's D-Bus interface. Check the wicd log for error messages Valid

 

After the Valid button

Then the initial box

Force to close with X button.

The daemon falls down.

Nothing in /var/log/wicd/wicd.logLast edited by augustin_meaulnes on Thu Nov 11, 2010 2:07 pm; edited 1 time in total

----------

## d2_racing

Hi, can you post this :

```

$ groups

# groups

```

----------

## augustin_meaulnes

Here you are.

```
jaaf@jaaf-laptop ~ $ groups
```

 *Quote:*   

> wheel users jaaf

 

```
jaaf@jaaf-laptop ~ $ su

Mot de passe : 

jaaf-laptop jaaf # groups
```

 *Quote:*   

> root bin daemon sys adm disk wheel floppy dialout tape video
> 
> jaaf-laptop jaaf # 

 

----------

## patrix_neo

Hard to tell if you have been given any ip-address or not.

You should have some info in /var/run/dhcpc/wlan0.conf or such.

Look if you have any dns servers in there.

What does route say?

Do you have a gw?

What does iwconfig and ifconfig tells you?

Can you ping google.com ?

----------

## TJNII

Can you ping 192.168.1.1?

----------

## augustin_meaulnes

I made some progress

Changed /etc/cond.d/net  commenting the last 2 lines

 *Quote:*   

> jaaf-laptop jaaf # cat /etc/conf.d/net
> 
> # This blank configuration will automatically use DHCP for any net.*
> 
> # scripts in /etc/init.d.  To create a more complete configuration,
> ...

 

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

After having done this:

During boot:

 *Quote:*   

>  Starting wlan0
> 
>  Configuration not set for wlan0 - assuming DHCP
> 
>  .....
> ...

 

Then the wicd  dialog boxes 

 *Quote:*   

> wicd needs to access your computer's network cards 
> 
> Prompt for passwd: 

  I give the passwd then

 *Quote:*   

> Message erroor box
> 
> Failed to run /usr/sbin/wicd as user root
> 
> (translated from French) The underlying  authorization mechanism (sudo) doesn't permit you to launch this programm. Please get in touch with your administartor Close

 

 after close button

 *Quote:*   

> Could not connect to wicd's D-Bus interface. Check the wicd log for error messages Valid

 

After the Valid button

Then the initial box

Force to close with X button.

The daemon falls down.

```
jaaf@jaaf-laptop ~ $ su

Mot de passe : 

jaaf-laptop jaaf # /etc/init.d/net.wlan0 start
```

 *Quote:*   

>  * Starting wlan0
> 
>  *   Configuration not set for wlan0 - assuming DHCP
> 
>  *   Bringing up wlan0
> ...

 

```
jaaf-laptop jaaf # wpa_supplicant -Dnl80211 -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf
```

 *Quote:*   

> Trying to authenticate with 00:1d:6a:d5:7d:05 (SSID='Livebox-940C' freq=2437 MHz)
> 
> Trying to associate with 00:1d:6a:d5:7d:05 (SSID='Livebox-940C' freq=2437 MHz)
> 
> Associated with 00:1d:6a:d5:7d:05
> ...

 

From second terminal

```
jaaf@jaaf-laptop ~ $ su
```

```
Mot de passe : 

jaaf-laptop jaaf # dhcpcd wlan0
```

 *Quote:*   

> wlan0: dhcpcd 4.0.15 starting
> 
> wlan0: broadcasting for a lease
> 
> wlan0: offered 192.168.1.30 from 192.168.1.1
> ...

 

and it works

Question: why does the attempt during boot fail?

Question: why does the command "jaaf-laptop jaaf # /etc/init.d/net.wlan0 start" fail ?

Question: why am I not able to get the wicd applet?

I read in Ubuntu doc: "add the user to netdev group"

adduser doesn't exist in my installation? Where to find it?

----------

## patrix_neo

For adding a group to a existing user, don't use adduser. usermod is the appropriate one.

Like this:

```
usermod -aG <group> <user>
```

----------

## augustin_meaulnes

Ok. But contrarily to Ubuntu, it seems that the netdev group doesn't exist.

----------

## patrix_neo

True that. I had similar problems loading my net.eth0 with the current /etc/conf.d/net config...I think you need to structure it accordingly...My best tip.

[edit] If you try to refer to another distro - you cannot expect the same result. Linux is about choice. Furthermore, I actually made you learn something on the way. Take that with you.

----------

## augustin_meaulnes

I can no longer hear anything. I feel alone.

May be should I restate the situation

1-At boot time 

 *Quote:*   

> Nov 13 08:05:25 jaaf-laptop dhcpcd[3543]: eth0: using IPv4LL address 169.254.130.149
> 
> Nov 13 08:05:26 jaaf-laptop dhcpcd[4038]: wlan0: dhcpcd 4.0.15 starting
> 
> Nov 13 08:05:26 jaaf-laptop dhcpcd[4038]: wlan0: waiting for carrier
> ...

 

seems that the WAP cannot be authenticate or associated with.

2- After boot:

using  this wifi.sh

```
wpa_supplicant -Dnl80211 -iwlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf &

#-Dmadwifi or -Dwext doesn't work

dhcpcd wlan0 &
```

produce

 *Quote:*   

> Nov 13 08:07:23 jaaf-laptop dhcpcd[4626]: wlan0: dhcpcd 4.0.15 starting
> 
> Nov 13 08:07:23 jaaf-laptop dhcpcd[4626]: wlan0: waiting for carrier
> 
> Nov 13 08:07:24 jaaf-laptop kernel: [  155.401983] wlan0: authenticate with 00:1d:6a:d5:7d:05 (try 1)
> ...

 

Of course I could use a

```
 rc-update add wifi.sh default
```

and feel happy but it is not satisfactory to me that following the manual I cannot manage to start my wifi as stated.

Who could tell me where I made a mistake.

----------

## patrix_neo

I can see your /etc/conf.d/net says:

```
# This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d. To create a more complete configuration,

# please review /etc/conf.d/net.example and save your configuration

# in /etc/conf.d/net (this file :]!).

modules=( "wpa_supplicant" )

wpa_supplicant_wlan0="-Dnl80211"

dns_domain_lo="jaaf"

config_eth0=( "dhcp" )

routes_eth0=( "default via 192.168.1.1" )

#config_Livebox-940C=( "dhcp" )

#routes_Livebox-940C=( "default via 192.168.1.1" )

```

config_eth0=( "dhcp" ) isn't your wireless card. Find out what your wireless card has for name, I would guess it to be wlan0 instead of eth0.

----------

## augustin_meaulnes

Hi patrix_neo

I feel less alone now.Thank you.

You are right. My wireless interface is wlan0. But I also have a wired one which is called eth0.

To answer your proposal , i would say:

1- At the beginning I had in /etc/conf.d/net both config_eth0= ( "dhcp" ) and config_wlan0= ( "dhcp" ).

I was told by somebody on the forum to remove config_wlan0 as Iitis already  managed by wpa_supplicant., so I removed it.

2- Moreover everywhere I read about it is said that it is useless to write it as if not decalred it is assumed  dhcp by default.

3- Whatever it is I did what you suggested , replacing eth0  with wlan0 but there is no chage at all in the behavior.

Whatever it is, I wonder what service is missing when during boot the "something?" is waiting for carrier and why it doesn't miss when later on after boot I use my wifi.sh?

Looking forward to reading you.

----------

## patrix_neo

Well...I did when using wifi for a few years back...but mine was called conf_wpa_supplicant_wlan0=( "dhcp" ) That might have changed by now. Things do.

And look here : http://en.gentoo-wiki.com/wiki/Wireless/Configuration (if you have not allready).

When looking at your boot-up code, I see it is timing out. Try set a timeout in your /etc/conf.d/net.

Like this (maybe):

```
wpa_timeout_wlan0=30

or

ssociate_timeout_wlan0=30

```

The reason is, without this, the dhcp server in your router, I assume, cannot establish fast enough what ip-address is available for your card.

You can read more about timeout problems at that link above I gave you.

----------

## augustin_meaulnes

Hi,

I have tried the timeout with a value of 120.

There is no change

whenever I use the commands in my wifi.sh script after boot things are instantaneous.

There is also the fact that running iwconfig gives "no wireless extension" for wlan0

----------

## patrix_neo

There's more to the timeout problems than setting the timeout value to 120. There is a section about it on the gentoo wiki page. Take a look if there is something new for you there.

I know I had no success with iwconfig with my wifi card. My wifi card was called ra0 and not wlan0, because of proprietary binaries from ralink, I think.

----------

