Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] iwlwifi: connected to router, but no connection
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
bheinze
n00b
n00b


Joined: 12 Apr 2005
Posts: 31

PostPosted: Thu Sep 06, 2018 8:57 pm    Post subject: [solved] iwlwifi: connected to router, but no connection Reply with quote

Hi all,

I succeeded in installing Gentoo on a Thinkpad T430, but I'm having a hard time connecting it to wifi. Actually connecting it to the router is easy, but I can't get any connection or ping to go through. Once I restart the router internet is available immediately.

I run
Code:
wpa_supplicant -B -i wlp3s0 -c /etc/wpa_supplicant/wpa_supplicant.conf
dhcpcd

Syslog shows:
Code:
kernel: [  190.961825] wlp3s0: authenticate with xx:xx:xx:xx:xx:xx
kernel: [  190.964190] wlp3s0: send auth to xx:xx:xx:xx:xx:xx (try 1/3)
kernel: [  190.966708] wlp3s0: authenticated
kernel: [  190.966851] wlp3s0: waiting for beacon from 00:26:4d:5c:54:3e
kernel: [  190.979057] wlp3s0: associate with xx:xx:xx:xx:xx:xx (try 1/3)
kernel: [  190.982921] wlp3s0: RX AssocResp from xx:xx:xx:xx:xx:xx (capab=0x411 status=0 aid=1)
kernel: [  191.000025] wlp3s0: associated
dhcpcd[1608]: wlp3s0: carrier acquired
dhcpcd[1608]: wlp3s0: IAID yy:yy:yy:yy
dhcpcd[1608]: wlp3s0: rebinding lease of 192.168.2.105
dhcpcd[1608]: wlp3s0: probing address 192.168.2.105/24
dhcpcd[1608]: wlp3s0: leased 192.168.2.105 for infinity
dhcpcd[1608]: wlp3s0: adding route to 192.168.2.0/24
dhcpcd[1608]: wlp3s0: adding default route via 192.168.2.1
dhcpcd[2095]: sending commands to master dhcpcd process
dhcpcd[1608]: control command: dhcpcd

ifconfig -a
Code:
wlp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.2.105  netmask 255.255.255.0  broadcast 192.168.2.255
        ether zz:zz:zz:zz:zz:zz  txqueuelen 1000  (Ethernet)
        RX packets 299  bytes 98234 (95.9 KiB)
        RX errors 0  dropped 1  overruns 0  frame 0
        TX packets 10  bytes 1201 (1.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

route -n
Code:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.2.1     0.0.0.0         UG    303    0        0 wlp3s0
192.168.2.0     0.0.0.0         255.255.255.0   U     303    0        0 wlp3s0

When I ping 192.168.2.1 I get
Code:
ping: sendmsg: Network is unreachable


I restart the router, wpa_supplicant automatically reconnects, and internet is working fine!
Code:
dhcpcd[1608]: wlp3s0: carrier lost
kernel: [  458.034666] wlp3s0: deauthenticated from xx:xx:xx:xx:xx:xx (Reason: 2=PREV_AUTH_NOT_VALID)
dhcpcd[1608]: wlp3s0: deleting route to 192.168.2.0/24
dhcpcd[1608]: wlp3s0: deleting default route via 192.168.2.1
kernel: [  502.355775] wlp3s0: authenticate with xx:xx:xx:xx:xx:xx
kernel: [  502.373667] wlp3s0: send auth to xx:xx:xx:xx:xx:xx (try 1/3)
kernel: [  502.376243] wlp3s0: authenticated
kernel: [  502.376435] wlp3s0: waiting for beacon from xx:xx:xx:xx:xx:xx
kernel: [  502.425036] wlp3s0: associate with xx:xx:xx:xx:xx:xx (try 1/3)
kernel: [  502.535103] wlp3s0: associate with xx:xx:xx:xx:xx:xx (try 2/3)
kernel: [  502.671080] wlp3s0: associate with xx:xx:xx:xx:xx:xx (try 3/3)
kernel: [  502.783082] wlp3s0: association with xx:xx:xx:xx:xx:xx timed out
kernel: [  506.451871] wlp3s0: authenticate with xx:xx:xx:xx:xx:xx
kernel: [  506.455163] wlp3s0: send auth to xx:xx:xx:xx:xx:xx (try 1/3)
kernel: [  506.458604] wlp3s0: authenticated
kernel: [  506.458852] wlp3s0: waiting for beacon from xx:xx:xx:xx:xx:xx
kernel: [  506.521038] wlp3s0: associate with xx:xx:xx:xx:xx:xx (try 1/3)
kernel: [  506.524979] wlp3s0: RX AssocResp from xx:xx:xx:xx:xx:xx (capab=0x411 status=0 aid=1)
kernel: [  506.535726] wlp3s0: associated
dhcpcd[1608]: wlp3s0: carrier acquired
dhcpcd[1608]: wlp3s0: IAID yy:yy:yy:yy
dhcpcd[1608]: wlp3s0: rebinding lease of 192.168.2.105
dhcpcd[1608]: wlp3s0: probing address 192.168.2.105/24
dhcpcd[1608]: wlp3s0: leased 192.168.2.105 for infinity
dhcpcd[1608]: wlp3s0: adding route to 192.168.2.0/24
dhcpcd[1608]: wlp3s0: adding default route via 192.168.2.1


Can anyone give me some pointers why wifi only works after a router reset? I don't have any problems connecting to the router using Windows 7 on the same Thinkpad.

Thanks for your help!
Bernd


Last edited by bheinze on Sun Sep 23, 2018 12:06 pm; edited 1 time in total
Back to top
View user's profile Send private message
Dalinar
n00b
n00b


Joined: 25 Jun 2018
Posts: 6

PostPosted: Thu Sep 06, 2018 9:50 pm    Post subject: Reply with quote

You tried using nmcli instead of the wpa_supplicant? no idea why its not working

Could also maybe try:

Code:
rc-service wpa_supplicant restart


when it fails and specifying the interface for dhcpcd,

whats your net config?
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1344
Location: Montréal

PostPosted: Fri Sep 07, 2018 10:52 am    Post subject: Reply with quote

Dhcpcd can start wpa_supplicant by itself if the file /usr/share/dhcpcd/hooks/10-wpa_supplicant is copied, move or linked in the /lib/dhcpcd/dhcpcd-hooks directory:
Code:
ln -s /usr/share/dhcpcd/hooks/10-wpa_supplicant  /lib/dhcpcd/dhcpcd-hooks/10-wpa_supplicant

Than you do not need to start the wpa_supplicant service but only the dhcpcd service if the wpa_supplicant configuration file is /etc/wpa_supplicant/wpa_supplicant.conf. Using both wpa_supplicant and dhcpcd services can start twice wpa_supplicant what is to advoid.
You can set /etc/dhdpcd.conf to your needs and to only start wpa_supplicant for the wlp3s0 interfaces instead for all the network interfaces. Here is an example:
Code:
allowinterfaces wlan0
denyinterfaces br0 eth0 lo tap0

interface wlan0
env wpa_supplicant_driver=nl80211
dhcp

If you do not want dhcpcd start wpa_supplicant you can set instead in dhcpcd.conf
Code:
nohook wpa_supplicant

Is you router filter connexions by MAC addresses?
_________________
Paul
Back to top
View user's profile Send private message
bheinze
n00b
n00b


Joined: 12 Apr 2005
Posts: 31

PostPosted: Sat Sep 08, 2018 10:02 pm    Post subject: Reply with quote

Dalinar wrote:
You tried using nmcli instead of the wpa_supplicant? no idea why its not working


No didn't try it yet. I thought wpa_supplicant would be the easiest to use. :lol:


Dalinar wrote:
whats your net config?

Code:
#
# The network configuration file. This file is currently only used in
# conjunction with the TI-RPC code in the libtirpc library.
#
# Entries consist of:
#
#       <network_id> <semantics> <flags> <protofamily> <protoname> \
#               <device> <nametoaddr_libs>
#
# The <device> and <nametoaddr_libs> fields are always empty in this
# implementation.
#
udp        tpi_clts      v     inet     udp     -       -
tcp        tpi_cots_ord  v     inet     tcp     -       -
udp6       tpi_clts      v     inet6    udp     -       -
tcp6       tpi_cots_ord  v     inet6    tcp     -       -
rawip      tpi_raw       -     inet      -      -       -
local      tpi_cots_ord  -     loopback  -      -       -
unix       tpi_cots_ord  -     loopback  -      -       -


Logicien wrote:
Using both wpa_supplicant and dhcpcd services can start twice wpa_supplicant what is to advoid.


Good point. I stopped dhcpcd service and started wpa_supplicant and dhcpcd manually. But no success...

Logicien wrote:
Is you router filter connexions by MAC addresses?


No, no filter of any kind on the router.


One thing I noticed on https://wiki.gentoo.org/wiki/Iwlwifi is I should set the following kernel options.

Code:
[*] Networking support  --->
    [*] Wireless  --->
        <*>   cfg80211 - wireless configuration API
        <*>   Generic IEEE 802.11 Networking Stack (mac80211)
        [*]   Minstrel
        [*]     Minstrel 802.11n support
        [ ]       Minstrel 802.11ac support


However the "Minstrel 802.11n support" doesn't show up in my kernel configuration (make menuconfig). Was it removed in newer Kernel settings or do I have some kind of buggy kernel config?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sat Sep 08, 2018 10:14 pm    Post subject: Reply with quote

bheinze,

Its still there.
Code:
 CONFIG_MAC80211_RC_MINSTREL_HT:                                                                            │ 
  │                                                                                                            │ 
  │ This option enables the 'minstrel_ht' TX rate control algorithm                                            │ 
  │                                                                                                            │ 
  │ Symbol: MAC80211_RC_MINSTREL_HT [=y]                                                                       │ 
  │ Type  : bool                                                                                               │ 
  │ Prompt: Minstrel 802.11n support                                                                           │ 
  │   Location:                                                                                                │ 
  │     -> Networking support (NET [=y])                                                                       │ 
  │       -> Wireless (WIRELESS [=y])                                                                          │ 
  │         -> Minstrel (MAC80211_RC_MINSTREL [=y])                                                            │ 
  │   Defined at net/mac80211/Kconfig:30                                                                       │ 
  │   Depends on: NET [=y] && WIRELESS [=y] && MAC80211 [=y] && MAC80211_RC_MINSTREL [=y]                      │ 
  │         


Notice the Depends on:. The option will be hidden until that boolean expression evaluates to true.

-- edit --

In menuconfig, press 'z' to toggle the display of hidden options. Even though you can now see, search and navigate to the option, it will stay unelectable until you (recursively) fix the Depends on:
_________________
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
Dalinar
n00b
n00b


Joined: 25 Jun 2018
Posts: 6

PostPosted: Sat Sep 08, 2018 10:25 pm    Post subject: Reply with quote

bheinze wrote:
Dalinar wrote:
You tried using nmcli instead of the wpa_supplicant? no idea why its not working


No didn't try it yet. I thought wpa_supplicant would be the easiest to use. :lol:


Dalinar wrote:
whats your net config?

Code:
#
# The network configuration file. This file is currently only used in
# conjunction with the TI-RPC code in the libtirpc library.
#
# Entries consist of:
#
#       <network_id> <semantics> <flags> <protofamily> <protoname> \
#               <device> <nametoaddr_libs>
#
# The <device> and <nametoaddr_libs> fields are always empty in this
# implementation.
#
udp        tpi_clts      v     inet     udp     -       -
tcp        tpi_cots_ord  v     inet     tcp     -       -
udp6       tpi_clts      v     inet6    udp     -       -
tcp6       tpi_cots_ord  v     inet6    tcp     -       -
rawip      tpi_raw       -     inet      -      -       -
local      tpi_cots_ord  -     loopback  -      -       -
unix       tpi_cots_ord  -     loopback  -      -       -




Sorry, by your net config I meant your /etc/conf.d/net :lol:

Also try using nm, neither is easier tbh but nm does have a tui option which can sometimes be nice
If you cant connect to the internet you can always goto https://packages.gentoo.org/packages/net-misc/networkmanager , download ver 1.10.10 on another device then copy it across to your /usr/portage/distfiles then just merge as normal c:
try running nmtui after you've merged and connect through that
Back to top
View user's profile Send private message
bheinze
n00b
n00b


Joined: 12 Apr 2005
Posts: 31

PostPosted: Sun Sep 23, 2018 12:05 pm    Post subject: Reply with quote

NeddySeagoon wrote:
bheinze,
Notice the Depends on:. The option will be hidden until that boolean expression evaluates to true.

-- edit --

In menuconfig, press 'z' to toggle the display of hidden options. Even though you can now see, search and navigate to the option, it will stay unelectable until you (recursively) fix the Depends on:


If I press 'z' it does indeed show up:

Code:
  │ │         <*>   Generic IEEE 802.11 Networking Stack (mac80211)                           │ │ 
  │ │               *** CFG80211 needs to be enabled for MAC80211 ***                         │ │ 
  │ │         -*-   Minstrel                                                                  │ │ 
  │ │         -*-     Minstrel 802.11n support                                                │ │ 
  │ │         - -       Minstrel 802.11ac support                                             │ │ 
  │ │               Default rate control algorithm (Minstrel)  --->                           │ │ 
  │ │               *** Some wireless drivers require a rate control algorithm ***            │ │ 



But when I look into the option all requirements are met, why doesn't it show up by default?

Code:
  │ Symbol: MAC80211_RC_MINSTREL_HT [=y]                                                        │ 
  │ Type  : boolean                                                                             │ 
  │ Prompt: Minstrel 802.11n support                                                            │ 
  │   Location:                                                                                 │ 
  │     -> Networking support (NET [=y])                                                        │ 
  │       -> Wireless (WIRELESS [=y])                                                           │ 
  │         -> Minstrel (MAC80211_RC_MINSTREL [=y])                                             │ 
  │   Defined at net/mac80211/Kconfig:30                                                        │ 
  │   Depends on: NET [=y] && WIRELESS [=y] && MAC80211 [=y] && MAC80211_RC_MINSTREL [=y]       │ 



On a different note, I finally solved the problem:
I compiled the iwlwifi as a module and passed the option '11n_disable=1' to the iwlwifi module. Works like a charm now.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Sun Sep 23, 2018 12:12 pm    Post subject: Reply with quote

bheinze,

Code:
 -*-     Minstrel 802.11n support

That -*- means forced on by another selection. You may not deselect it.
_________________
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
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