# [SOLVED] net.wlan0 has started, but is inactive

## Al79

Hi all,

I'm tring to setup my atheros wifi, but I get this error message on netword device startup:

```
# /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

```

Some details on my system:

```
# lspci -vv

03:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01)

        Subsystem: AzureWave AW-NB037H 802.11bgn Wireless Half-size Mini PCIe Card [AR9002WB-1NGCD]

        Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-

        Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-

        Latency: 0, Cache Line Size: 64 bytes

        Interrupt: pin A routed to IRQ 17

        Region 0: Memory at ddc00000 (64-bit, non-prefetchable) [size=64K]

        Capabilities: [40] Power Management version 3

                Flags: PMEClk- DSI- D1+ D2- AuxCurrent=375mA PME(D0+,D1+,D2-,D3hot+,D3cold+)

                Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-

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

                Address: 00000000  Data: 0000

        Capabilities: [60] Express (v2) Legacy Endpoint, MSI 00

                DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s <512ns, L1 <64us

                        ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-

                DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-

                        RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-

                        MaxPayload 128 bytes, MaxReadReq 512 bytes

                DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr+ TransPend-

                LnkCap: Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 <512ns, L1 <64us

                        ClockPM- Surprise- LLActRep- BwNot-

                LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+

                        ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-

                LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-

                DevCap2: Completion Timeout: Not Supported, TimeoutDis+

                DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-

                LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-, Selectable De-emphasis: -6dB

                         Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-

                         Compliance De-emphasis: -6dB

                LnkSta2: Current De-emphasis Level: -6dB

        Capabilities: [100 v1] Advanced Error Reporting

                UESta:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-

                UEMsk:  DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-

                UESvrt: DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-

                CESta:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+

                CEMsk:  RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+

                AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-

        Capabilities: [140 v1] Virtual Channel

                Caps:   LPEVC=0 RefClk=100ns PATEntryBits=1

                Arb:    Fixed- WRR32- WRR64- WRR128-

                Ctrl:   ArbSelect=Fixed

                Status: InProgress-

                VC0:    Caps:   PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-

                        Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-

                        Ctrl:   Enable+ ID=0 ArbSelect=Fixed TC/VC=ff

                        Status: NegoPending- InProgress-

        Capabilities: [160 v1] Device Serial Number 00-15-17-ff-ff-24-14-12

        Capabilities: [170 v1] Power Budgeting <?>

        Kernel driver in use: ath9k

        Kernel modules: ath9k
```

I tried to configure my kernel(3.0.6-gentoo) as suggested in this thread, but even if my device look like the same (at least for lspci) I can't let it work:

```
Networking support ->

  Wireless ->

   <*>   cfg80211 - wireless configuration API

   [*]     enable powersave by default

   [*]     cfg80211 wireless extensions compatibility

   [*]   Wireless extensions sysfs files

   <*>   Common routines for IEEE802.11 drivers

   <*>   Generic IEEE 802.11 Networking Stack (mac80211)

Device drivers->

  Network device support->

     Wireless LAN ->

         Atheros Wireless Cards ->

            <M>   Atheros 802.11n wireless cards support

            [*]     Atheros ath9k PCI/PCIe bus support

            [ ]     Atheros ath9k debugging

            [*]     Atheros ath9k rate control

```

```
# lsmod | grep -i ath

ath9k                  62457  0 

ath9k_common            1222  1 ath9k

ath9k_hw              240436  2 ath9k,ath9k_common

```

As you can see from my iwconfig command, device is recognized:

```
# iwconfig wlan0 

wlan0     IEEE 802.11bgn  ESSID:off/any  

          Mode:Managed  Access Point: Not-Associated   Tx-Power=15 dBm   

          Retry  long limit:7   RTS thr:off   Fragment thr:off

          Encryption key:off

          Power Management:off

```

```
# dmesg | grep -i ath

[    6.345978] ath9k 0000:03:00.0: PCI INT A -> GSI 17 (level, low) -> IRQ 17

[    6.345992] ath9k 0000:03:00.0: setting latency timer to 64

[    6.395532] ath: EEPROM regdomain: 0x60

[    6.395535] ath: EEPROM indicates we should expect a direct regpair map

[    6.395538] ath: Country alpha2 being used: 00

[    6.395539] ath: Regpair used: 0x60

[    6.396901] ieee80211 phy0: Selected rate control algorithm 'ath9k_rate_control'

[    6.397071] Registered led device: ath9k-phy0

[    6.397075] ieee80211 phy0: Atheros AR9285 Rev:2 mem=0xf8c20000, irq=17

```

```
# cat /etc/conf.d/net | grep wlan0

config_wlan0="dhcp" 

modules="wpa_supplicant" 

iwconfig_wlan0="mode managed"

```

```
# cat /proc/net/wireless 

Inter-| sta-|   Quality        |   Discarded packets               | Missed | WE

 face | tus | link level noise |  nwid  crypt   frag  retry   misc | beacon | 22

 wlan0: 0000    0     0     0        0      0      0      0      0        0

```

```
# lshw -C network

  *-network               

       description: Wireless interface

       product: AR9285 Wireless Network Adapter (PCI-Express)

       vendor: Atheros Communications Inc.

       physical id: 0

       bus info: pci@0000:03:00.0

       logical name: wlan0

       version: 01

       serial: 74:2f:68:9d:49:29

       width: 64 bits

       clock: 33MHz

       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless

       configuration: broadcast=yes driver=ath9k driverversion=3.0.6-gentoo firmware=N/A latency=0 link=no multicast=yes wireless=IEEE 802.11bgn

       resources: irq:17 memory:ddc00000-ddc0ffff

```

a weird difference with mentioned thread is this:

```
# rfkill list

Can't open RFKILL control device: No such file or directory

```

finally this is my wpa_supplicant.conf file:

```
ctrl_interface=/var/run/wpa_supplicant

eapol_version=2

update_config=1

ctrl_interface_group=0

ap_scan=1

network={

        ssid="<MYSSID>"

        psk=<MYPASK>

}

```

my wpa_supplicant.conf is cutted&paste from another machine that can surf, so it shouldn't matter, but...

I changed my rc.conf as suggested in this thread:

```
# grep rc_depend_strict /etc/rc.conf

rc_depend_strict="NO"

```

and my wifi doesn't work, while at these guys look like it woks. I tried to add "-Dwext" on wpa_supplicant command instead of run it as a deamon, but it doesn't work too. 

Sorry for very long post, but without my test and system information would be really unuseful. 

Any idea would be greatly appreciated.

Thanks in advance.Last edited by Al79 on Wed Dec 14, 2011 5:36 pm; edited 1 time in total

----------

## barul

You can ignore that message, network will be ok anyway.

----------

## Al79

 *barul wrote:*   

> You can ignore that message, network will be ok anyway.

 

hmm I can't ping..how can ignore it?

----------

## Gusar

Just a guess, do you have rfkill support in your kernel? Seems not. So make sure your kernel has rfkill support, then "rfkill list" will show something usable and we'll go from there.

----------

## Al79

 *Gusar wrote:*   

> Just a guess, do you have rfkill support in your kernel? Seems not. So make sure your kernel has rfkill support, then "rfkill list" will show something usable and we'll go from there.

 

```
# rfkill list

0: phy0: Wireless LAN

        Soft blocked: no

        Hard blocked: no

1: hci0: Bluetooth

        Soft blocked: no

        Hard blocked: no

```

----------

## Gusar

Ok, that looks good. The next step is starting wpa_supplicant manually instead of using the scripts:

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

----------

## Al79

 *Al79 wrote:*   

> [...]I tried to add "-Dwext" on wpa_supplicant command instead of run it as a deamon, but it doesn't work too. [...]
> 
> 

 

----------

## Gusar

"Doesn't work" is not something that you can receive help with.

----------

## Al79

 *Gusar wrote:*   

> "Doesn't work" is not something that you can receive help with.

 

```
# wpa_supplicant -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf

(on another shell)

# dmesg | tail 

[  171.747220] ADDRCONF(NETDEV_UP): wlan0: link is not ready

# dhcpcd wlan0

dhcpcd[3984]: version 5.2.12 starting

dhcpcd[3984]: wlan0: waiting for carrier

dhcpcd[3984]: timed out

dhcpcd[3984]: allowing 8 seconds for IPv4LL timeout

dhcpcd[3984]: timed out

```

----------

## Gusar

No output from wpa_supplicant? That's the benefit of not running it as a daemon, it gives you output of what it does. Try adding -d or -dd, maybe it'll say something then. But this kinda indicates a problem earlier in the stack. Use pastebin to post the full dmesg output, maybe that will gives us something we can use.

----------

## Al79

 *Gusar wrote:*   

> No output from wpa_supplicant? That's the benefit of not running it as a daemon, it gives you output of what it does. Try adding -d or -dd, maybe it'll say something then. But this kinda indicates a problem earlier in the stack. Use pastebin to post the full dmesg output, maybe that will gives us something we can use.

 

wpa_supplicant output:

http://pastebin.com/nB6XUVAx

dmesg:

http://pastebin.com/zbgincxv

----------

## Gusar

That shows wpa_supplicant does find some networks. Is the one you want among them? Are you using a hidden SSID? If yes, add scan_ssid=1 to the network block in wpa_supplicant.conf. Also, on what channel is the network you want to connect to?

Beyond this, all I have are guesses. I see you have a bluetooth device, so load ath9k with btcoex_enable=1. Also try nohwcrypt=1.

----------

## Al79

 *Gusar wrote:*   

> That shows wpa_supplicant does find some networks. Is the one you want among them? Are you using a hidden SSID? If yes, add scan_ssid=1 to the network block in wpa_supplicant.conf. Also, on what channel is the network you want to connect to?
> 
> Beyond this, all I have are guesses. I see you have a bluetooth device, so load ath9k with btcoex_enable=1. Also try nohwcrypt=1.

 

ok now it works. I added scan_ssid=1 to my wpa_supplicant.conf

thanks for your help.

----------

## frank56

I have the same problem but how do I add scan_ssid=1 to my wpa_supplicant.conf. This is what I have now.:

```
network={

        ssid="hidden"

        psk="hidden"

        proto=RSN

        key_mgmt=WPA-PSK

        pairwise=TKIP

        auth_alg=OPEN

        priority=1

}

```

I am going to give this one a try see if it works

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

update_config=1

###### Security Configuration ######

network={

        proto=RSN

        pairwise=TKIP

        auth_alg=OPEN

        ssid="hidden"

        priority=1

        psk="hidden "

        key_mgmt=WPA-PSK

        scan_ssid=1

}

```

----------

## frank56

Not working too well, Wireless connection making and breaking connection..  Here is my dmesg wlan0 wgetpaste:

http://paste.pocoo.org/show/528243/

----------

## gentooP4

 *barul wrote:*   

> You can ignore that message, network will be ok anyway.

 

Yes, to be fair I get that message and mine works fine

----------

