# Another wifi issue (RTL8192CU & wpa_supplicant)

## lfb

Dear gurus,

I tried to get my usb wlan stick

```
t41 ~ # lsusb | grep Edimax

Bus 002 Device 002: ID 7392:7811 Edimax Technology Co., Ltd EW-7811Un 802.11n Wireless Adapter [Realtek RTL8188CUS]

```

to work several times now, after three weeks of accepting its denial of service I now feel strong enough to give it another try  :Smile:  So maybe you can me with this (of course I read all topics connected to the rtl8192cu chip and the network/wlan guides of the gentoo documentation). So here are the facts: I am running kernel 3.2.12, I installed all available kernel modules,

```
t41 lfb # grep 8192 /usr/src/linux-3.2.12-gentoo/.config

CONFIG_RTL8192CE=m

CONFIG_RTL8192SE=m

CONFIG_RTL8192DE=m

CONFIG_RTL8192CU=m

CONFIG_RTL8192C_COMMON=m

```

plus the driver from the realtek website. I suppose this is why I end up getting this error message with dmesg

```
t41 lfb # dmesg | grep 8192

[    0.017490] PM: Registering ACPI NVS region at 3ff77000 (8192 bytes)

[    5.395688] rtl8192cu 2-1:1.0: usb_probe_interface

[    5.395695] rtl8192cu 2-1:1.0: usb_probe_interface - got id

[    6.054953] rtl8192cu: MAC address: 00:1f:1f:bf:44:1a

[    6.054962] rtl8192cu: Board Type 0

[    6.095250] usbcore: registered new interface driver rtl8192cu

[    6.149138] Error: Driver 'rtl8192cu' is already registered, aborting...

```

Besides that we have

```
t41 lfb # ifconfig wlan0

wlan0     Link encap:Ethernet  HWaddr 00:1f:1f:bf:44:1a  

          BROADCAST MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

```

and

```
t41 lfb # lsmod | grep rtl

rtl8192cu              67136  0 

rtl8192c_common        40639  1 rtl8192cu

rtlwifi                68012  1 rtl8192cu

```

Now if i start the service

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

```

with the corresponding dmesg

```
t41 lfb # dmesg | tail

[  778.327092] wlan0: associated

[  778.332503] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

[  788.334222] wlan0: disassociating from 00:1c:f0:b1:80:6a by local choice (reason=3)

[  788.341433] cfg80211: Calling CRDA for country: US

[  788.342348] wlan0: deauthenticating from 00:1c:f0:b1:80:6a by local choice (reason=3)

[  789.122029] wlan0: no IPv6 routers present

[  789.263341] wlan0: authenticate with 00:1c:f0:b1:80:6a (try 1)

[  789.463049] wlan0: authenticate with 00:1c:f0:b1:80:6a (try 2)

[  789.663048] wlan0: authenticate with 00:1c:f0:b1:80:6a (try 3)

[  789.863057] wlan0: authentication with 00:1c:f0:b1:80:6a timed out

```

This is my wpa_supplicant.conf

```
t41 lfb # cat /etc/wpa_supplicant/wpa_supplicant.conf 

update_config=1

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

eapol_version=1

ap_scan=1

fast_reauth=1

network={

    ssid="KLUK2"

    scan_ssid=1

    key_mgmt=IEEE8021X

    psk="..."

    priority=11

}

```

and it seems that a connection is established for a very short time, but then I am disconnected soon (and I also don't get an IP address):

```
t41 lfb # wpa_cli 

wpa_cli v0.7.3

Copyright (c) 2004-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.

Selected interface 'wlan0'

Interactive mode

> status

bssid=00:1c:f0:b1:80:6a

ssid=KLUK2

id=1

mode=station

pairwise_cipher=NONE

group_cipher=NONE

key_mgmt=IEEE 802.1X (no WPA)

wpa_state=ASSOCIATED

Supplicant PAE state=CONNECTING

suppPortStatus=Unauthorized

EAP state=IDLE

<2>Authentication with 00:1c:f0:b1:80:6a timed out.

> <2>CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=3

> <2>CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=3

> <2>CTRL-EVENT-SCAN-RESULTS 

> <2>Trying to authenticate with 00:1c:f0:b1:80:6a (SSID='KLUK2' freq=2437 MHz)

<2>CTRL-EVENT-SCAN-RESULTS 

<2>CTRL-EVENT-BSS-REMOVED 0 00:1d:19:cd:43:a1

> <2>CTRL-EVENT-BSS-REMOVED 1 00:24:fe:82:ea:d9

> <2>CTRL-EVENT-BSS-REMOVED 2 00:04:0e:8e:a7:fe

> <2>CTRL-EVENT-SCAN-RESULTS 

```

At this point I hope I didn't miss important information and maybe someone has a suggestion for me?

Many thanks in advance,

Lukas

----------

## BillWho

lfb,

One thing I noticed in wpa_supplicant.conf  that's not quite right is:

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

Try changing it to:

```
ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

```

Besides the ssid and psk, my wpa_supplicant.conf contains:

```
proto=WPA2

key_mgmt=WPA-PSK

pairwise=CCMP TKIP

group=CCMP TKIP 

```

I'm not sure about the the Realtek modules, but you might want to check if dependencies are needed:

```
gentoo ~ # modinfo rt2800lib|grep depends:

depends:        crc-ccitt,rt2x00lib,mac80211

```

In my case I need crc-ccitt and mac80211 so my module list for Ralink is:

```
gentoo ~ # lsmod|grep rt2

rt2800usb              11612  0 

rt2x00usb               6706  1 rt2800usb

rt2800lib              34222  1 rt2800usb

rt2x00lib              27134  3 rt2x00usb,rt2800lib,rt2800usb

mac80211              263941  3 rt2x00lib,rt2x00usb,rt2800lib

cfg80211              113814  2 mac80211,rt2x00lib

crc_ccitt               1019  1 rt2800lib

```

This is my adapter:

```
ASUSTek Computer, Inc. USB-N13 802.11n Network Adapter (rev. A1) [Ralink RT3072]
```

Good luck   :Wink: 

----------

## micmac

Hello!

I have a wifi card which requires the module rtl8192ce. I guess it's very similar to yours. I'm also running the same kernel you have installed (well, 3.2.18 actually).

I think you should keep using the in-kernel module. Installing the module from the Realtek website is probably not necessary and neither recommended.

This is what struck me in the configuration you posted:

```
key_mgmt=IEEE8021X
```

This is what /usr/share/doc/wpa_supplicant-0.7.3-r5/wpa_supplicant.conf.bz2 says about it:

```
# IEEE8021X = IEEE 802.1X using EAP authentication and (optionally) dynamically

#       generated WEP keys
```

Is that really what you want? What kind of wireless security are you running on your access point?

Here's my config for an access point with WPA2, TKIP disabled, AES enabled:

```
update_config=0

ctrl_interface=/var/run/wpa_supplicant

country=US

network={

   ssid="Texas"

   proto=RSN

   key_mgmt=WPA-PSK

   pairwise=CCMP

   group=CCMP

   psk="passphrase"

   }

```

It's a pretty simple config, but it works very well.

----------

## lfb

Tanks for the replies!!

A dependency of the module was not the problem

```
t41 lfb # modinfo rtl8192cu | grep depends

depends:        rtlwifi,rtl8192c-common

```

both of them are already loaded together with rtl8192cu. In terms of wpa_supplicant, I changed the ctrl_interface-lines according to your suggestion. My access point is pretty old, it uses WEP. This is the scan_result of wpa_cli:

```
scan_results bssid / frequency / signal level / flags / ssid

00:1c:f0:b1:80:6a       2437    -46     [WEP][ESS]      KLUK2

```

Could the wpa_supplicant.conf still be wrong in some other details?

----------

## micmac

Hi,

try this config:

```
network={

        ssid="static-wep-test"

        key_mgmt=NONE

        wep_key0="abcde"

        wep_tx_keyidx=0

}
```

 *Quote:*   

> # wep_key0..3: Static WEP key (ASCII in double quotation, e.g. "abcde" or
> 
> # hex without quotation, e.g., 0102030405)
> 
> # wep_tx_keyidx: Default WEP key index (TX) (0..3)

 

----------

## lfb

Wow, that made my wlan0 interface get an IP address! I've never been that far  :Smile: 

Unfortunately, I still get that message about net.wlan0 being inactive

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

```

and there is no internet connection. Besides, my IP address I get via the wired eth0 interface is in a completely different range, what could this mean??

```
t41 lfb # ifconfig 

eth0      Link encap:Ethernet  HWaddr 00:0d:60:8b:ee:f9  

          inet addr:192.168.178.56  Bcast:192.168.178.255  Mask:255.255.255.0

          inet6 addr: fe80::20d:60ff:fe8b:eef9/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:121625 errors:0 dropped:0 overruns:0 frame:0

          TX packets:76421 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:164581061 (156.9 MiB)  TX bytes:5927752 (5.6 MiB)

lo        Link encap:Local Loopback  

          inet addr:127.0.0.1  Mask:255.0.0.0

          inet6 addr: ::1/128 Scope:Host

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:108 errors:0 dropped:0 overruns:0 frame:0

          TX packets:108 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0 

          RX bytes:8564 (8.3 KiB)  TX bytes:8564 (8.3 KiB)

wlan0     Link encap:Ethernet  HWaddr 00:1f:1f:bf:44:1a  

          inet addr:169.254.4.233  Bcast:169.254.255.255  Mask:255.255.0.0

          inet6 addr: fe80::21f:1fff:febf:441a/64 Scope:Link

          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:14 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000 

          RX bytes:0 (0.0 B)  TX bytes:2025 (1.9 KiB)

```

Thanks in advance!

Lukas

----------

## micmac

The message about net.wlan0 being inactive is normal. I get that all the time.

Can you post your network config file?

/etc/conf.d/net

/etc/conf.d/network

----------

## lfb

Here is conf.d/net

```
t41 lfb # 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 :]!).

modules="wpa_supplicant"

config_wlan0="dhcp"

config_eth0="dhcp"

wpa_supplicant_wlan0="-Dnl80211"

wpa_timeout_wlan0=10

dns_domain_lo=""

```

and in conf.d/network everything is commented out, I never touched that file.

```
t41 lfb # cat /etc/conf.d/network 

# Assign static IP addresses and run custom scripts per interface.

# Seperate commands with ;

# Prefix with ! to run a shell script.

# Use \$int to represent the interface

#ifconfig_eth0="192.168.0.10 netmask 255.255.255.0"

# You also have ifup_eth0 and ifdown_eth0 to run other commands when

# eth0 is started and stopped.

# You should note that we don't stop the network at system shutdown by default.

# If you really need this, then set shutdown_network=YES

# Lastly, the interfaces variable pulls in virtual interfaces that cannot

# be automatically detected.

#interfaces="br0 bond0 vlan0"

# You can also use files instead of variables here if you like:

# /etc/ifconfig.eth0 is equivalent to ifconfig_eth0

# /etc/ip.eth0 is equivalent to ifconfig_eth0

# /etc/ifup.eth0 is equivalent to ifup_eth0

# /etc/ifdown.eth0 is equivalent to ifdown_eth0

# Any files found will automatically be put into the interfaces variable.

# You don't need to escape variables in files, so use $int instead of \$int.

# If you require DHCP, you should install dhcpcd and it to the boot or

# default runlevel.

# NIS users can set the domain name here

#domainname="foobar"

# You can assign a default route

#defaultroute="gw 192.168.0.1"

#defaultroute6="gw 2001:a:b:c"

# ifconfig under Linux is not that powerful and doesn't easily handle

# multiple addresses

# On the other hand, ip (iproute2) is quite powerful and is also supported

#ip_eth0="192.168.0.10/24; 192.168.10.10/24"

# You can also use ip to add the default route.

#defaultiproute="via 192.168.0.1"

#defaultiproute6="via 2001:a:b:c"

# ip doesn't handle MTU like ifconfig, but we can do it like so

#ifup_eth0="ip link set \$int mtu 1500"

# Create a bonded interface

#interfaces="bond0"

#ifup_bond0="modprobe bonding; ifconfig \$int up; ifenslave \$int bge0"

#ifconfig_bond0="192.168.0.10 netmask 255.255.255.0"

#ifdown_bond0="rmmod bonding"

# Create tap interface and a bridge interface.

# We add the tap to the bridge.

# An external program, like dhcpcd, will configure the IP on the bridge

#interfaces="tun0 br0"

#ifup_tun0="tunctl -t \$int"

#ifdown_tun0="tunctl -d \$int"

#ifup_br0="brctl addbr \$int; brctl add \$int eth1; brtctl add \$int eth2"

#ifdown_br0="ifconfig \$int down; btctl delbr \$int"

# Create VLAN

#interfaces="eth0_2 eth0_3 eth0_4"

#ifup_eth0="vconfig add \$int 2; vconfig add \$int 3; vconfig add \$int 4"

#ifconfig_eth0_2="192.168.2.10 netmask 255.255.255.0"

#ifconfig_eth0_3="192.168.3.10 netmask 255.255.255.0"

#ifconfig_eth0_4="192.168.4.10 netmask 255.255.255.0"

#ifdown_eth0="vconfig rem \$int.2; vconfig rem \$int.3; vconfig rem \$int.4"

# Normally you would use wpa_supplicant to configure wireless, but you can

# use iwconfig also

#ifup_wlan0="iwconfig \$int key s:secretkey enc open essid foobar"

```

----------

## micmac

Can you change /etc/conf.d/net to this:

```
modules_wlan0="wpa_supplicant"

wpa_supplicant_wlan0="-Dnl80211"

config_wlan0="dhcp"

config_eth0="dhcp"
```

And then unplug network cable and restart? If it still doesn't work please post related parts of /var/log/messages.

----------

## lfb

Still no internet connection  :Sad: 

Here are the interesting parts of /var/log/messages:

```
t41 lfb # cat /var/log/messages | grep 'Jun \+2 11:5*' | grep rtl

Jun  2 11:53:20 t41 kernel: [    5.247633] rtl8192cu 2-1:1.0: usb_probe_interface

Jun  2 11:53:20 t41 kernel: [    5.247639] rtl8192cu 2-1:1.0: usb_probe_interface - got id

Jun  2 11:53:20 t41 kernel: [    5.918291] rtl8192cu: MAC address: 00:1f:1f:bf:44:1a

Jun  2 11:53:20 t41 kernel: [    5.918302] rtl8192cu: Board Type 0

Jun  2 11:53:20 t41 kernel: [    6.004273] rtlwifi: rx_max_size 15360, rx_urb_num 8, in_ep 1

Jun  2 11:53:20 t41 kernel: [    6.004488] ieee80211 phy0: Selected rate control algorithm 'rtl_rc'

Jun  2 11:53:20 t41 kernel: [    6.005550] usbcore: registered new interface driver rtl8192cu

Jun  2 11:53:20 t41 kernel: [    6.068355] Error: Driver 'rtl8192cu' is already registered, aborting...

Jun  2 11:53:53 t41 kernel: [   45.723645] rtl8192cu: MAC auto ON okay!

Jun  2 11:53:54 t41 kernel: [   45.983609] rtl8192cu: Tx queue select: 0x05

Jun  2 11:53:54 t41 kernel: [   45.987612] rtl8192c_common: Loading firmware file rtlwifi/rtl8192cufw.bin

```

```
t41 lfb # cat /var/log/messages | grep 'Jun \+2 11:5*' | grep wlan

Jun  2 11:53:54 t41 kernel: [   46.644871] ADDRCONF(NETDEV_UP): wlan0: link is not ready

Jun  2 11:53:55 t41 /etc/init.d/net.wlan0[1981]: WARNING: net.wlan0 has started, but is inactive

Jun  2 11:53:56 t41 kernel: [   48.065260] wlan0: authenticate with 00:1c:f0:b1:80:6a (try 1)

Jun  2 11:53:56 t41 kernel: [   48.068309] wlan0: authenticated

Jun  2 11:53:56 t41 kernel: [   48.106249] wlan0: associate with 00:1c:f0:b1:80:6a (try 1)

Jun  2 11:53:56 t41 kernel: [   48.109309] wlan0: RX AssocResp from 00:1c:f0:b1:80:6a (capab=0x471 status=0 aid=1)

Jun  2 11:53:56 t41 kernel: [   48.109313] wlan0: associated

Jun  2 11:53:56 t41 kernel: [   48.114573] ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready

Jun  2 11:53:56 t41 wpa_cli: interface wlan0 CONNECTED

Jun  2 11:53:56 t41 dhcpcd[2190]: wlan0: checking for 169.254.4.233

Jun  2 11:54:01 t41 dhcpcd[2190]: wlan0: using IPv4LL address 169.254.4.233

Jun  2 11:54:05 t41 dhcpcd[2205]: wlan0: broadcasting for a lease

Jun  2 11:54:06 t41 kernel: [   58.706029] wlan0: no IPv6 routers present

```

Any ideas?

----------

## BillWho

lfb.

I don't know if wpa_supplicant_wlan0="-Dnl80211"  is unique to your card, but in /etc/conf.d/net I have:

```
modules="wpa_supplicant"

wpa_supplicant_wlan0="-Dwext -c/etc/wpa_supplicant/wpa_supplicant.conf"

wpa_timeout_wlan0=60

config_wlan0="192.168.1.103/24 brd 192.168.1.255"

routes_wlan0="default via 192.168.1.1"

```

I assign static ip addresses so just change your first two lines.

Good luck   :Wink: 

----------

## lfb

Still no connection with a static IP adress.

The wpa_supplicant_wlan0="-Dnl80211" is necessary to bring up the interface for the Edimax stick, "-Dwext" doesn't work. However, I have another wlan stick

```
t41 ~ # lsusb -v | grep -A 15 'Bus 002 Device 011'

Bus 002 Device 011: ID 050d:1102 Belkin Components 

Device Descriptor:

  bLength                18

  bDescriptorType         1

  bcdUSB               2.00

  bDeviceClass            0 (Defined at Interface level)

  bDeviceSubClass         0 

  bDeviceProtocol         0 

  bMaxPacketSize0        64

  idVendor           0x050d Belkin Components

  idProduct          0x1102 

  bcdDevice            2.00

  iManufacturer           1 Realtek

  iProduct                2 802.11n WLAN Adapter

  iSerial                 3 00e04c000001

  bNumConfigurations      1

```

which works with exactly the same kernel modules. It's possible to start this one with "-Dwext", but neither dynamic nor static IP addresses work out here, too...

----------

## BillWho

lfb.

Did you try 

```
wpa_supplicant_wlan0="-Dnl80211 -c/etc/wpa_supplicant/wpa_supplicant.conf" 
```

I noticed this in the lsusb output 

```
iProduct                2 802.11n WLAN Adapter
```

Are the mac80211 and cfg80211 modules required   :Question: 

----------

## lfb

Hm, I recompiled my kernel with these two modules. Now I have

```
t41 lfb # lsmod

Module                  Size  Used by

snd_intel8x0           19910  0 

snd_intel8x0m           8143  0 

snd_ac97_codec         77011  2 snd_intel8x0,snd_intel8x0m

ac97_bus                 718  1 snd_ac97_codec

snd_pcm                47081  3 snd_intel8x0,snd_intel8x0m,snd_ac97_codec

rtl8192cu              67136  0 

rtl8192c_common        40639  1 rtl8192cu

rtlwifi                68012  1 rtl8192cu

snd_timer              12031  1 snd_pcm

snd                    33696  5 snd_intel8x0,snd_intel8x0m,snd_ac97_codec,snd_pcm,snd_timer

mac80211              168526  3 rtl8192cu,rtl8192c_common,rtlwifi

cfg80211              110180  2 rtlwifi,mac80211

soundcore               3460  1 snd

snd_page_alloc          4907  3 snd_intel8x0,snd_intel8x0m,snd_pcm

```

but still no connection   :Crying or Very sad: , neither with dhcp nor static IP address...

```
t41 lfb # ping -I wlan0 192.168.187.1 # (this is my router)

PING 192.168.187.1 (192.168.187.1) from 169.254.4.233 wlan0: 56(84) bytes of data.

From 169.254.4.233: icmp_seq=2 Destination Host Unreachable

From 169.254.4.233: icmp_seq=3 Destination Host Unreachable

From 169.254.4.233: icmp_seq=4 Destination Host Unreachable

```

----------

## BillWho

lfb,

 *Quote:*   

> 
> 
> ```
> PING 192.168.187.1 (192.168.187.1) from 169.254.4.233 wlan0:
> ```
> ...

 

Is 169.254.4.233 a dhcp assignment  :Question:   That's a little strange - it's not on the same segment.

Double check your depends again with:

```
for m in $(lsmod|grep "^rt\|^mac\|^cfg"|awk '{print $1}');do echo -n "$m :";modinfo "$m"|grep depends;done
```

One of those should depend on usbcore that I didn't notice in your list 

```
rt2800usb :depends:        rt2x00lib,rt2800lib,rt2x00usb,usbcore
```

Do you have any nameserver entries in /etc/resolv.conf  :Question:  You can use nameserver 8.8.8.8 if you don't have one.

If you try to start wlan0 from the cl with 

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

does it connect or provide a clue why not   :Question: 

And try 

```
wpa_supplicant -d -iwlan0 -Dnl80211,wext -c/etc/wpa_supplicant/wpa_supplicant.conf
```

 You can specify multiple driver wrappers on the cl.

----------

## lfb

Thanks for your ideas again!

First of all, none of my modules seems to depend on usbcore:

```
t41 lfb # for m in $(lsmod|grep "^rt\|^mac\|^cfg"|awk '{print $1}');do echo -n "$m :";modinfo

"$m"|grep depends;done

rtl8192cu :depends:        rtlwifi,mac80211,rtl8192c-common

rtl8192c_common :depends:        mac80211

rtlwifi :depends:        mac80211,cfg80211

mac80211 :depends:        cfg80211

cfg80211 :depends:        

```

The IP address 169.254.4.233 is the dhcp assignment... I was wondering about that, too. However I

can define a static address in the same segment, which doesn't have any affect. About my

resolv.conf, that's a little strange. With static IP's I set the nameserver manually. With dhcp,

resolv.conf is updated only for the eth0 interface, not for wlan0:

```
t41 lfb # cat /etc/resolv.conf 

# Generated by dhcpcd

# /etc/resolv.conf.head can replace this line

# /etc/resolv.conf.tail can replace this line

t41 lfb # /etc/init.d/net.eth0 start

* Bringing up interface eth0

*   dhcp ...

*     Running dhcpcd ...

dhcpcd[4295]: version 5.2.12 starting

dhcpcd[4295]: eth0: rebinding lease of 192.168.178.56

dhcpcd[4295]: eth0: acknowledged 192.168.178.56 from 192.168.178.1

dhcpcd[4295]: eth0: checking for 192.168.178.56

dhcpcd[4295]: eth0: leased 192.168.178.56 for 864000 seconds

dhcpcd[4295]: forked to background, child pid 4318

[ ok ]

*     received address 192.168.178.56/24

*     [ ok ]

t41 lfb # cat /etc/resolv.conf 

# Generated by dhcpcd from eth0

# /etc/resolv.conf.head can replace this line

domain fritz.box

nameserver 192.168.178.1

# /etc/resolv.conf.tail can replace this line

t41 lfb # /etc/init.d/net.eth0 stop

* Bringing down interface eth0

*   Stopping dhcpcd on eth0 ...

*   [ ok ]

*   Removing addresses

t41 lfb # echo "" > /etc/resolv.conf 

t41 lfb # /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

t41 lfb # cat /etc/resolv.conf 

t41 lfb #

```

Running wpa_supplicant in the foreground brings up this:

```
t41 lfwpa_supplicant -d -iwlan0 -Dnl80211 -c/etc/wpa_supplicant/wpa_supplicant.conf

Initializing interface 'wlan0' conf '/etc/wpa_supplicant/wpa_supplicant.conf' driver 'nl80211' ctrl_interface 'N/A' bridge 'N/A'

Configuration file '/etc/wpa_supplicant/wpa_supplicant.conf' -> '/etc/wpa_supplicant/wpa_supplicant.conf'

Reading configuration file '/etc/wpa_supplicant/wpa_supplicant.conf'

update_config=1

ctrl_interface='/var/run/wpa_supplicant'

ctrl_interface_group='wheel'

Priority group 0

   id=0 ssid='KLUK2'

netlink: Operstate: linkmode=1, operstate=5

Own MAC address: 00:1f:1f:bf:44:1a

wpa_driver_nl80211_set_key: ifindex=14 alg=0 addr=0x80a6125 key_idx=0 set_tx=0 seq_len=0 key_len=0

wpa_driver_nl80211_set_key: ifindex=14 alg=0 addr=0x80a6125 key_idx=1 set_tx=0 seq_len=0 key_len=0

wpa_driver_nl80211_set_key: ifindex=14 alg=0 addr=0x80a6125 key_idx=2 set_tx=0 seq_len=0 key_len=0

wpa_driver_nl80211_set_key: ifindex=14 alg=0 addr=0x80a6125 key_idx=3 set_tx=0 seq_len=0 key_len=0

RSN: flushing PMKID list in the driver

Setting scan request: 0 sec 100000 usec

EAPOL: SUPP_PAE entering state DISCONNECTED

EAPOL: Supplicant port status: Unauthorized

EAPOL: KEY_RX entering state NO_KEY_RECEIVE

EAPOL: SUPP_BE entering state INITIALIZE

EAP: EAP entering state DISABLED

EAPOL: Supplicant port status: Unauthorized

EAPOL: Supplicant port status: Unauthorized

ctrl_interface_group=10 (from group name 'wheel')

Added interface wlan0

State: DISCONNECTED -> SCANNING

Starting AP scan for wildcard SSID

Scan requested (ret=0) - scan timeout 10 seconds

nl80211: Event message available

nl80211: Scan trigger

nl80211: Event message available

nl80211: New scan results available

Received scan results (4 BSSes)

BSS: Start scan result update 1

BSS: Add new id 0 BSSID c0:25:06:02:80:8d SSID 'FRITZ!Box Fon WLAN 7320'

BSS: Add new id 1 BSSID 00:1d:19:cd:43:a1 SSID 'EasyBox-CD4313'

BSS: Add new id 2 BSSID 00:1c:f0:b1:80:6a SSID 'KLUK2'

BSS: Add new id 3 BSSID 00:04:0e:8e:a7:fe SSID 'KLUK'

New scan results available

Selecting BSS from priority group 0

Try to find WPA-enabled AP

0: c0:25:06:02:80:8d ssid='FRITZ!Box Fon WLAN 7320' wpa_ie_len=22 rsn_ie_len=20 caps=0x431

   skip - SSID mismatch

1: 00:1d:19:cd:43:a1 ssid='EasyBox-CD4313' wpa_ie_len=26 rsn_ie_len=24 caps=0x431

   skip - SSID mismatch

2: 00:1c:f0:b1:80:6a ssid='KLUK2' wpa_ie_len=0 rsn_ie_len=0 caps=0x431

   skip - no WPA/RSN IE

3: 00:04:0e:8e:a7:fe ssid='KLUK' wpa_ie_len=0 rsn_ie_len=0 caps=0x411

   skip - no WPA/RSN IE

Try to find non-WPA AP

0: c0:25:06:02:80:8d ssid='FRITZ!Box Fon WLAN 7320' wpa_ie_len=22 rsn_ie_len=20 caps=0x431

   skip - SSID mismatch

1: 00:1d:19:cd:43:a1 ssid='EasyBox-CD4313' wpa_ie_len=26 rsn_ie_len=24 caps=0x431

   skip - SSID mismatch

2: 00:1c:f0:b1:80:6a ssid='KLUK2' wpa_ie_len=0 rsn_ie_len=0 caps=0x431

   selected non-WPA AP 00:1c:f0:b1:80:6a ssid='KLUK2'

Automatic auth_alg selection: 0x1

WPA: clearing AP WPA IE

WPA: clearing AP RSN IE

WPA: clearing own WPA/RSN IE

Cancelling scan request

Trying to authenticate with 00:1c:f0:b1:80:6a (SSID='KLUK2' freq=2437 MHz)

No keys have been configured - skip key clearing

State: SCANNING -> AUTHENTICATING

EAPOL: External notification - EAP success=0

EAPOL: Supplicant port status: Unauthorized

EAPOL: External notification - EAP fail=0

EAPOL: Supplicant port status: Unauthorized

EAPOL: External notification - portControl=ForceAuthorized

EAPOL: Supplicant port status: Unauthorized

nl80211: Authenticate (ifindex=14)

wpa_driver_nl80211_set_key: ifindex=14 alg=1 addr=(nil) key_idx=0 set_tx=1 seq_len=0 key_len=13

nl80211: set_key failed; err=-67 Link has been severed)

  * bssid=00:1c:f0:b1:80:6a

  * freq=2437

  * SSID - hexdump_ascii(len=5):

     4b 4c 55 4b 32                                    KLUK2           

  * IEs - hexdump(len=0): [NULL]

  * Aunl80211: Authentication request send successfully

RTM_NEWLINK: operstate=0 ifi_flags=0x1003 ([UP])

RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added

EAPOL: disable timer tick

EAPOL: Supplicant port status: Unauthorized

nl80211: Event message available

nl80211: MLME event 37

SME: Authentication response: peer=00:1c:f0:b1:80:6a auth_type=0 status_code=0

Trying to associate with 00:1c:f0:b1:80:6a (SSID='KLUK2' freq=2437 MHz)

State: AUTHENTICATING -> ASSOCIATING

wpa_driver_nl80211_set_operstate: operstate 0->0 (DORMANT)

netlink: Operstate: linkmode=-1, operstate=5

SME: Could not parse own IEs?!

WPA: clearing own WPA/RSN IE

nl80211: Associate (ifindex=14)

  * bssid=00:1c:f0:b1:80:6a

  * freq=2437

  * SSID - hexdump_ascii(len=5):

     4b 4c 55 4b 32                                    KLUK2           

  * IEs - hexdump(len=0): [NULL]

nl80211: Association request send successfully

nl80211: Event message available

nl80211: Ignored unknown event (cmd=19)

nl80211: Event message available

nl80211: MLME event 38

Association info event

resp_ies - hexdump(len=16): 01 08 82 84 8b 96 0c 12 18 24 32 04 30 48 60 6c

freq=2437 MHz

State: ASSOCIATING -> ASSOCIATED

wpa_driver_nl80211_set_operstate: operstate 0->0 (DORMANT)

netlink: Operstate: linkmode=-1, operstate=5

Associated to a new BSS: BSSID=00:1c:f0:b1:80:6a

Associated with 00:1c:f0:b1:80:6a

WPA: Association event - clear replay counter

WPA: Clear old PTK

EAPOL: External notification - portEnabled=0

EAPOL: Supplicant port status: Unauthorized

EAPOL: External notification - portValid=0

EAPOL: Supplicant port status: Unauthorized

EAPOL: External notification - portEnabled=1

EAPOL: SUPP_PAE entering state S_FORCE_AUTH

EAPOL: Supplicant port status: Authorized

EAPOL: SUPP_BE entering state IDLE

Cancelling authentication timeout

State: ASSOCIATED -> COMPLETED

CTRL-EVENT-CONNECTED - Connection to 00:1c:f0:b1:80:6a completed (auth) [id=0 id_str=]

wpa_driver_nl80211_set_operstate: operstate 0->1 (UP)

netlink: Operstate: linkmode=-1, operstate=6

Cancelling scan request

wpa_driver_nl80211_set_key: ifindex=14 alg=1 addr=0x80a6125 key_idx=0 set_tx=1 seq_len=0 key_len=13

nl80211: Event message available

nl80211: Ignore connect event (cmd=46) when using userspace SME

RTM_NEWLINK: operstate=1 ifi_flags=0x11003 ([UP][LOWER_UP])

netlink: Operstate: linkmode=-1, operstate=6

RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added

RTM_NEWLINK: operstate=1 ifi_flags=0x11003 ([UP][LOWER_UP])

netlink: Operstate: linkmode=-1, operstate=6

RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added

RTM_NEWLINK: operstate=1 ifi_flags=0x11003 ([UP][LOWER_UP])

netlink: Operstate: linkmode=-1, operstate=6

RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added

RTM_NEWLINK: operstate=1 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])

```

Running wpa_supplicant with two specified drivers doesn't change anything...

----------

## BillWho

lfb,

According to these lines in your debug output

```
State: ASSOCIATED -> COMPLETED

CTRL-EVENT-CONNECTED - Connection to 00:1c:f0:b1:80:6a completed (auth) [id=0 id_str=]

wpa_driver_nl80211_set_operstate: operstate 0->1 (UP)

netlink: Operstate: linkmode=-1, operstate=6

Cancelling scan request

```

You're connected   :Exclamation: 

Remove -d and add -B to the wpa_supplicant line 

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

Then check resolve.conf and try to ping google.com 

```
ping -c3 google.com
```

----------

## lfb

I'm sorry for always coming up with new it-doesn't work replies...

I ran this after a reboot, wired interface is down:

```
t41 lfb # ifconfig wlan0 up

t41 lfb # wpa_supplicant -iwlan0 -B -Dnl80211 -c/etc/wpa_supplicant/wpa_supplicant.conf

t41 lfb # dhcpcd wlan0

dhcpcd[2011]: version 5.2.12 starting

dhcpcd[2011]: wlan0: checking for 169.254.4.233

dhcpcd[2011]: wlan0: using IPv4LL address 169.254.4.233

dhcpcd[2011]: forked to background, child pid 2025

t41 lfb # ping www.google.com

ping: unknown host www.google.com

t41 lfb # cat /etc/resolv.conf 

# Generated by dhcpcd

# /etc/resolv.conf.head can replace this line

# /etc/resolv.conf.tail can replace this line

t41 lfb # ping 192.168.178.1              # (the router in the network)

connect: Network is unreachable

t41 lfb # rfkill list

0: phy0: Wireless LAN

        Soft blocked: no

        Hard blocked: no

```

 :Crying or Very sad:   :Crying or Very sad:   :Crying or Very sad: 

----------

## BillWho

lfb,

Repeat the same sequence as above and instead of

```
cat /etc/resolv.conf 
```

do

```
echo "nameserver 8.8.8.8" >> /etc/resolv.conf

echo "nameserver 8.8.4.4" >> /etc/resolv.conf
```

then ping google

----------

## lfb

```
t41 lfb # ifconfig wlan0 up

t41 lfb # wpa_supplicant -iwlan0 -B -Dnl80211 -c/etc/wpa_supplicant/wpa_supplicant.conf

t41 lfb # dhcpcd wlan0

dhcpcd[2027]: version 5.2.12 starting

dhcpcd[2027]: wlan0: checking for 169.254.4.233

dhcpcd[2027]: wlan0: using IPv4LL address 169.254.4.233

dhcpcd[2027]: forked to background, child pid 2041

t41 lfb # echo "nameserver 8.8.8.8" >> /etc/resolv.conf 

t41 lfb # echo "nameserver 8.8.4.4" >> /etc/resolv.conf 

t41 lfb # ping www.google.com

ping: unknown host www.google.com

t41 lfb # cat /etc/resolv.conf 

# Generated by dhcpcd

# /etc/resolv.conf.head can replace this line

# /etc/resolv.conf.tail can replace this line

nameserver 8.8.8.8

nameserver 8.8.4.4

t41 lfb # ping 192.168.178.1

connect: Network is unreachable

```

----------

## BillWho

lfb,

I' m suspecting the network segment now  :Exclamation: 

PING 192.168.187.1 (192.168.187.1) from 169.254.4.233 wlan0   :Confused: 

Try this is /etc/conf.d/net

```
modules="wpa_supplicant"

wpa_supplicant_wlan0="Dnl80211 -c/etc/wpa_supplicant/wpa_supplicant.conf"

wpa_timeout_wlan0=60

#

config_wlan0="192.168.187.100/24 brd 192.168.187.255"

routes_wlan0="default via 192.168.187.1"

dns_servers_wlan0="8.8.8.8 8.8.4.4"

```

Reboot or restart wlan0 and cat /etc/resolv.conf to doublecheck

Check ifconfig -a for the ip

Check the routing table with route

ping 192.168.187.1 and if successful ping google 

While you're doing all this keep your fingers crossed   :Smile: 

----------

