Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Wireless card doesn't work
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
YTW
n00b
n00b


Joined: 30 Aug 2016
Posts: 65
Location: Taiwan

PostPosted: Mon Sep 19, 2016 7:45 am    Post subject: [SOLVED] Wireless card doesn't work Reply with quote

Things wrong before wpa_supplicant. If an inet address is provided I know how to set wpa_supplicant then.
ifconfig wlp5s0
Code:
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
Code:
[   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
Code:
wlp5s0: waiting for carrier
time out
dhcpcd exited


Here is all lsmod

Here is all lspci -vvv

Here is all /usr/src/linux/.config


Last edited by YTW on Mon Sep 19, 2016 5:41 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 42558
Location: 56N 3W

PostPosted: Mon Sep 19, 2016 8:39 am    Post subject: Reply with quote

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
Code:
/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
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
YTW
n00b
n00b


Joined: 30 Aug 2016
Posts: 65
Location: Taiwan

PostPosted: Mon Sep 19, 2016 10:24 am    Post subject: Reply with quote

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

Thus I killall wpa_supplicant then run it directly by
Code:
wpa_supplicant -Dnl80211 -iwlp5s0 -c/etc/wpa_supplicant/wpa_supplicant.conf

It shows
Code:
Successfully initialized wpa_supplicant

But still no available IP for wlp5s0.

And if killall wpa_supplicant then
Code:
/etc/init.d/wpa_supplicant start

It shows
Code:
Successfully initialized wpa_supplicant

But still no available IP for wlp5s0.

Here is /etc/wpa_supplicant/wpa_supplicant.conf content:
Code:
# 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
Back to top
View user's profile Send private message
mir3x
Guru
Guru


Joined: 02 Jun 2012
Posts: 427

PostPosted: Mon Sep 19, 2016 10:57 am    Post subject: Reply with quote

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 ?
_________________
Installation aborted to prevent system self-destruction
Back to top
View user's profile Send private message
YTW
n00b
n00b


Joined: 30 Aug 2016
Posts: 65
Location: Taiwan

PostPosted: Mon Sep 19, 2016 11:57 am    Post subject: Reply with quote

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:
Code:
#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...
Code:
               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
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Mon Sep 19, 2016 12:10 pm    Post subject: Reply with quote

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)

Code:
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:

Code:
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:

Code:
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 ...
Back to top
View user's profile Send private message
YTW
n00b
n00b


Joined: 30 Aug 2016
Posts: 65
Location: Taiwan

PostPosted: Mon Sep 19, 2016 1:03 pm    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Mon Sep 19, 2016 1:21 pm    Post subject: Reply with quote

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

--

Code:
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
Code:
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.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5583

PostPosted: Mon Sep 19, 2016 4:32 pm    Post subject: Reply with quote

Disregard the above, they aren't even reading your posts.
Code:
pkill wpa_supplicant
rc-update add dhcpcd default
rc-update add wpa_supplicant default
/sbin/openrc
Back to top
View user's profile Send private message
YTW
n00b
n00b


Joined: 30 Aug 2016
Posts: 65
Location: Taiwan

PostPosted: Mon Sep 19, 2016 5:07 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3806
Location: Austro Bavaria

PostPosted: Mon Sep 19, 2016 9:02 pm    Post subject: Reply with quote

Ant P. wrote:
Disregard the above, they aren't even reading your posts.
Code:
pkill wpa_supplicant
rc-update add dhcpcd default
rc-update add wpa_supplicant default
/sbin/openrc


Thanks for your kind works. I appreciate this.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum