# * WARNING: net.wlan0 has started, but is inactive

## ComputerNerd

I am new to gentoo and so have it has been great except for the fact that wifi does not work when I run

```

Mordor yoda # /etc/init.d/net.wlan0 start  

 * Bringing up interface wlan0

 *   Starting wpa_supplicant on wlan0 ...                                 [ ok ]

 *   Starting wpa_cli on wlan0 ...                                        [ ok ]

 *   Backgrounding ... ...

 * WARNING: net.wlan0 has started, but is inactive

```

I get the warning and then I try to run wpa_gui and it says my card is inactive because of this when I press scan nothing happens and I unable to connect.

Here is more info about my system

```

Mordor yoda # 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,

# please review /usr/share/doc/openrc*/net.example* and save your configuration

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

config_eth0="dhcp"

modules="wpa_supplicant"

wpa_supplicant_wlan0="-Dnl80211"

config_wlan0="dhcp"

```

```

Mordor yoda # cat /etc/wpa_supplicant/wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=0

update_config=1

```

```

Mordor yoda # lsusb

Bus 001 Device 002: ID 0bda:8197 Realtek Semiconductor Corp. RTL8187B Wireless Adapter

```

Last edited by ComputerNerd on Wed Feb 27, 2013 2:30 am; edited 1 time in total

----------

## khayyam

ComputerNerd ...

the problem seems to be your mixing film franchises ... but seriously, the 'warning' is not at issue, infact its standard, net.wlan0 has been started but the task of managing the connection has been handed off to wpa_supplicant, so it warns you.

The configuration looks mostly fine, but (unrelated to your problem) you might want to confine wpa_supplicant to wlan0 like so:

/etc/conf.d/net

```
modules_wlan0="!plug wpa_supplicant"
```

Also, your wpa_supplicant.conf definition for 'group' should be changed, as your user is not GID=0 ... assuming your in the 'wheel' group change it to the following:

/etc/wpa_supplicant/wpa_supplicant.conf

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

update_config=1
```

I imagine this is the reason you can't scan, insufficient privilages, and so the above should solve your issue. If not, then you should provide further info, you can have wpa_supplicant log with the following:

/etc/conf.d/net

```
wpa_supplicant_wlan0="-Dnl80211 -d -f /var/log/wpa_supplicant.log"
```

.... '-dd' for even more debugging.

HTH & best ... khay

----------

## ComputerNerd

bad news after applying your changes things are worse off

```

Mordor yoda # /etc/init.d/net.wlan0 restart

 * Caching service dependencies ...                                                                                                                               [ ok ]

 * Bringing up interface wlan0

 *   Starting wpa_supplicant on wlan0 ...

wpa_supplicant v0.7.3

Copyright (c) 2003-2010, Jouni Malinen <j@w1.fi> and contributors

This program is free software. You can distribute it and/or modify it

under the terms of the GNU General Public License version 2.

Alternatively, this software may be distributed under the terms of the

BSD license. See README and COPYING for more details.

This product includes software developed by the OpenSSL Project

for use in the OpenSSL Toolkit (http://www.openssl.org/)

usage:

  wpa_supplicant [-BddhKLqqstuvW] [-P<pid file>] [-g<global ctrl>] \

        -i<ifname> -c<config file> [-C<ctrl>] [-D<driver>] [-p<driver_param>] \

        [-b<br_ifname>] [-f<debug file>] \

        [-o<override driver>] [-O<override ctrl>] \

        [-N -i<ifname> -c<conf> [-C<ctrl>] [-D<driver>] \

        [-p<driver_param>] [-b<br_ifname>] ...]

drivers:

  wext = Linux wireless extensions (generic)

  nl80211 = Linux nl80211/cfg80211

  hostap = Host AP driver (Intersil Prism2/2.5/3)

  atmel = ATMEL AT76C5XXx (USB, PCMCIA)

  ndiswrapper = Linux ndiswrapper (deprecated; use wext)

  ipw = Intel ipw2100/2200 driver (old; use wext with Linux 2.6.13 or newer)

  wired = Wired Ethernet driver

  ralink = Ralink Wireless Client driver

options:

  -b = optional bridge interface name

  -B = run daemon in the background

  -c = Configuration file

  -C = ctrl_interface parameter (only used if -c is not)

  -i = interface name

  -d = increase debugging verbosity (-dd even more)

  -D = driver name (can be multiple drivers: nl80211,wext)

  -g = global ctrl_interface

  -K = include keys (passwords, etc.) in debug output

  -t = include timestamp in debug messages

  -h = show this help text

  -L = show license (GPL and BSD)

  -o = override driver parameter for new interfaces

  -O = override ctrl_interface parameter for new interfaces

  -p = driver parameters

  -P = PID file

  -q = decrease debugging verbosity (-qq even less)

  -u = enable DBus control interface

  -v = show version

  -W = wait for a control interface monitor before starting

  -N = start describing new interface

example:

  wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf                                                                                                        [ ok ]

 *   Starting wpa_cli on wlan0 ...

Failed to connect to wpa_supplicant - wpa_ctrl_open: No such file or directory

 *   start-stop-daemon: failed to start `/usr/bin/wpa_cli'                                                                                                        [ !! ]

 *   start-stop-daemon: fopen `/var/run/wpa_supplicant-wlan0.pid': No such file or directory

 * ERROR: net.wlan0 failed to start

```

Also I know I am mixing movie/book series it is on purpose.

----------

## khayyam

 *ComputerNerd wrote:*   

> bad news after applying your changes things are worse off

 

ComputerNerd ... for whatever reason net-wireless/wpa_supplicant-0.7.3-r5 still doesn't accept the '-d' or '-f' switch. I'd reported this as a bug as it is set by the 'debug' useflag (which is not what is acutally enabled). So, either remove the '-d -f /var/log/wpa_supplicant.log', or re-merge with the 'debug' useflag enabled. You shouldn't need logging, as it should work with only the suggested changes to 'group' (I thought that would be clear from the above).

best ... khay

----------

## ComputerNerd

ok thank you it works now.

----------

## John R. Graham

Moved from Other Things Gentoo to Networking & Security where it fits better.

- John

----------

