# [SOLVED] Wireless card doesn't work

## YTW

Things wrong before wpa_supplicant. If an inet address is provided I know how to set wpa_supplicant then.

ifconfig wlp5s0

```
wlp5s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500

        ether c4:46:19:93:23:6c  txqueuelen 1000  (Ethernet)

        RX packets 0  bytes 0 (0.0 B)

        RX errors 0  dropped 0  overruns 0  frame 0

        TX packets 0  bytes 0 (0.0 B)

        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
```

Here is all dmesg with cable

But if no cable, it ends up with

```
[   17.748315] IPv6: ADDRCONF(NETDEV_UP): wlp5s0: link is not ready

[   17.766688] IPv6: ADDRCONF(NETDEV_UP): wlp5s0: link is not ready

[   17.769779] IPv6: ADDRCONF(NETDEV_UP): enp3s0: link is not ready

[   17.782591] IPv6: ADDRCONF(NETDEV_UP): enp3s0: link is not ready

[   17.973739] IPv6: ADDRCONF(NETDEV_UP): wlp5s0: link is not ready
```

when I want to invoke wlp5s0 via dhcpcd without cable

it shows

```
wlp5s0: waiting for carrier

time out

dhcpcd exited
```

Here is all lsmod

Here is all lspci -vvv

Here is all /usr/src/linux/.configLast edited by YTW on Mon Sep 19, 2016 5:41 pm; edited 1 time in total

----------

## NeddySeagoon

YTW,

The sequence of events to bring up wifi is wpa_supplicant starts the radio link, that gets the link associated and authenticated.

From this point on, its just like a wired link, it can be used to exchange data, which is what dhcpcd does to get your IP address, route and so on.

I understand that dhcpcd can also run wpa_supplicant but I've not done that.

Rather I use 

```
/etc/init.d/net.wlan0 start
```

 to do it all. The settings in the net file the net file causes wpa_supplicant to be run.

wpa_supplicant is not run as a service as it would be possible to have two instances running. 

As you have the wlp5s0 interface, your kernel is probably OK

----------

## YTW

I don't have /etc/init.d/net.wlan0.

Thus I killall wpa_supplicant then run it directly by

```
wpa_supplicant -Dnl80211 -iwlp5s0 -c/etc/wpa_supplicant/wpa_supplicant.conf
```

It shows 

```
Successfully initialized wpa_supplicant
```

But still no available IP for wlp5s0.

And if killall wpa_supplicant then

```
/etc/init.d/wpa_supplicant start
```

It shows

```
Successfully initialized wpa_supplicant
```

But still no available IP for wlp5s0.

Here is /etc/wpa_supplicant/wpa_supplicant.conf content:

```
# Allow users in the 'video' group to control wpa_supplicant

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

# Make this file writable for wpa_gui / wpa_cli

update_config=1
```

----------

## mir3x

Read man wpa_supplicant.conf 

or jsut google for expmaple wpa configurations and tune to your network.

U didnt configured network for wpa_supplicant, so how does it know where to connect ?

----------

## YTW

Not work. 

I did't need to configure ssid info in wpa_supplicant.conf if wlp5s0 provided ip and wpa_supplicant started only with ctrl_interface info before. I could then scan nearest AP by wpa_supplicant GUI on desktop environment.

Tha's what I set:

```
#Allow users in the 'video' group to control wpa_supplicant

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

# Make this file writable for wpa_gui / wpa_cli

update_config=1

network={

        ssid="CHT0588"

        psk="xxxxxxxx"

        priority=5

}
```

Would it be possible that drivers conflict?

Because when I only compiled ath9k as module for wifi card, it's OK. But after genkernel all that make a lot of useless drivers, it become situation now.

Here is rc-update show, what are related network? I want to give a try to delete them...

```
               binfmt | boot                                   

             bootmisc | boot                                   

                 dbus |      default                           

                devfs |                                 sysinit

                dmesg |                                 sysinit

                 fsck | boot                                   

             hostname | boot                                   

              hwclock | boot                                   

              keymaps | boot                                   

            killprocs |                        shutdown        

    kmod-static-nodes |                                 sysinit

                local |      default nonetwork                                                                                                                                                  

           localmount | boot                                                                                                                                                                    

             loopback | boot                                                                                                                                                                    

              modules | boot                                                                                                                                                                    

             mount-ro |                        shutdown                                                                                                                                         

                 mtab | boot                                                                                                                                                                    

             netmount |      default                                                                                                                                                            

               procfs | boot                                                                                                                                                                    

                 root | boot                                                                                                                                                                    

            savecache |                        shutdown                                                                                                                                         

                 sshd |      default                                                                                                                                                            

                 swap | boot                                                                                                                                                                    

            swapfiles | boot                                                                                                                                                                    

               sysctl | boot                                                                                                                                                                    

                sysfs |                                 sysinit                                                                                                                                 

             sysklogd |      default                                                                                                                                                            

         termencoding | boot                                                                                                                                                                    

         tmpfiles.dev |                                 sysinit                                                                                                                                 

       tmpfiles.setup | boot                                   

                 udev |                                 sysinit

              urandom | boot 
```

----------

## Roman_Gruber

Just an example which works here. and do not worry, that Ssid / psk is invalid as the modem has died to a thunderstorm recently. (the modem now rest in electronics heaven just kidding)

```
cat /etc/wpa_supplicant/wpa_supplicant.conf 

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

network={

ssid="Knight"

psk="da4sLabETHReCoDc3qJNd20N"

}

```

I use this with the provided wlan / adsl2 modem from my provider. Gentoo eudev, no systemd, no networkmanager.

--

You may use the verbose / talkative option with wpa_supplicant. do not send the process in teh background as daemon!

Getting wlan running is a bit tricky always for myself. Just try around / read the docs for any distro and try to fix it

 *Quote:*   

> ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=video 

 

no idea if this syntax is okay

you may try my example.

Regarding modules loaded. You may try lsmod / lsmod / lspci -kk / lsusb / I think there is something else too to give output

--

Please check if you get the same, as it seems i have hte same card as you.

example:

```
lspci -kk

 ... snip

03:00.0 Network controller: Qualcomm Atheros AR9485 Wireless Network Adapter (rev 01)

   Subsystem: AzureWave AR9485 Wireless Network Adapter

   Kernel driver in use: ath9k

 ... snip

```

-- 

Also please check if you have the same in your kernel. y or m is fine, n is bad

kernel related:

```
ASUS-G75VW gentoo # grep ATH9 /usr/src/linux/.config

CONFIG_ATH9K_HW=y

CONFIG_ATH9K_COMMON=y

CONFIG_ATH9K_BTCOEX_SUPPORT=y

CONFIG_ATH9K=y

CONFIG_ATH9K_PCI=y

# CONFIG_ATH9K_AHB is not set

# CONFIG_ATH9K_DEBUGFS is not set

# CONFIG_ATH9K_DYNACK is not set

# CONFIG_ATH9K_WOW is not set

CONFIG_ATH9K_RFKILL=y

# CONFIG_ATH9K_CHANNEL_CONTEXT is not set

CONFIG_ATH9K_PCOEM=y

CONFIG_ATH9K_HTC=y

# CONFIG_ATH9K_HTC_DEBUGFS is not set

CONFIG_ATH9K_HWRNG=y

```

--

Usually, I use the old naming for my wlan interface:

wpa_supplicant ...

dhcpcd wlan0

You may only need to use dhcpcd to aquire an ip address. have you tried that after using wpa_supplicant?

What does your (tail -f) /var/log/messages say?

I usually get some gibberish for my wlan card. like aquiring ip address and such ...

----------

## YTW

With the same wpa_supplicant.conf, it JUST works after dhcpcd that wlp5s0 has ip finally.

But when I reboot, it still shows wait carrier to time out then exit.

It can not reproductively work.

How to delete Network Manager at boot?

And I suspect killall command not works all the time.

How to check all processes alive in command line?

----------

## Roman_Gruber

 *Quote:*   

> With the same wpa_supplicant.conf, it JUST works after dhcpcd that wlp5s0 has ip finally. 

 

My way for years was to fire up manually wpa_supplicant, than dhcpcd wlan0.

In my understandings wpa_supplicant establish the connection from your wlan card to your wlan access point, lets call it now like that.

Dhcpcd asks your access point, please give me an ip-address or you have to set up all the gateway / ip-address / route stuff yourself manually. 

Thats the intended behaviour

--

```
rc-update show

                acpid | boot                                          

            alsasound |      default                                  

               binfmt | boot                                          

             bootmisc | boot                                          

          consolefont | boot                                          

                cupsd |      default                                  

                 dbus | boot                                          

                devfs |                                        sysinit

        device-mapper | boot                                          

              dmcrypt | boot                                          

                dmesg |                                        sysinit

                 fsck | boot                                          

             hostname | boot                                          

              hotplug |      default                                  

              hwclock | boot                                          

              keymaps | boot                                          

            killprocs |                        shutdown               

    kmod-static-nodes |                                        sysinit

                local |      default nonetwork                        

           localmount | boot                                          

             loopback | boot                                          

                  lvm | boot                                          

              modules | boot                                          

             mount-ro |                        shutdown               

                 mtab | boot                                          

             netmount |      default                                  

           ntp-client |      default                                  

               procfs | boot                                          

                 root | boot                                          

            savecache |                        shutdown               

            swapfiles | boot                                          

               sysctl | boot                                          

                sysfs |                                        sysinit

            syslog-ng | boot default                                  

         termencoding | boot                                          

         tmpfiles.dev |                                        sysinit

       tmpfiles.setup | boot                                          

                 udev | boot                                   sysinit

         udev-trigger |                                        sysinit

              urandom | boot                                          

       wpa_supplicant |      default                                  

                  xdm |      default    
```

I have wpa_supplicant in teh default level with eudev, which calls /etc/init.d/network I suppose somewhere in the boot process.

---

 *Quote:*   

> How to check all processes alive in command line?

 

e.g. for chrome

```
ps aux|grep chrome
```

--

 *Quote:*   

> And I suspect killall command not works all the time. 

 

nope, it never does

ps aux| grep process

kill -9 processnumber_given_from_ps_aux

--

Please note:

/etc/init.d/servicename stop or restart or start

remove networkmanager from rc-update

rc-update del networkmanager

assuming the service networkmanager is called networkmanager. In my expierence networkmanger is a crappy script and never worked as it should.

----------

## Ant P.

Disregard the above, they aren't even reading your posts.

```
pkill wpa_supplicant

rc-update add dhcpcd default

rc-update add wpa_supplicant default

/sbin/openrc
```

----------

## YTW

Thx! It reproducibly works!

I am curious why pkill or kill -9 PID doesn't kill all wpa_supplicant.

It must leave one with a new PID.

----------

## Roman_Gruber

 *Ant P. wrote:*   

> Disregard the above, they aren't even reading your posts.
> 
> ```
> pkill wpa_supplicant
> 
> ...

 

Thanks for your kind works. I appreciate this.

----------

