Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved]wpa_supplicant and dhcpcd OK, but no wifi 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
Jmi
n00b
n00b


Joined: 12 Feb 2023
Posts: 3

PostPosted: Mon Feb 13, 2023 7:18 pm    Post subject: [Solved]wpa_supplicant and dhcpcd OK, but no wifi connection Reply with quote

Hi,

I am new to gentoo (1 month ago), but it is a long time since I am on another source based distribution (Lunar).

Everything waas fine after installation and after first update. But after my last update, wifi does not work anymore. Here is what i could understand so far :

1) the status of wpa_supplicant told me that their was a problem with one of the line of /etc/wpa_supplicant.conf. Very strange since it is the same file since the installation, and it seems that there was no version update in wpa_supplicant since my installation. So why this problem suddnely?
2) After fixing wpa_supplicant.conf, the service is started correctly (wpa_supplicant@wlp4s0 too)
3) dhcpcd service is ok
4) juste after booting, the status of dhcpcd tells me that it has a carrier for wlp4s0, then it losts it. Why!?
5) if I do a "dhcpcd wlp4s0", the status of dhcpcd has a line "control_free: No such file or directory". I didn't find any info about it on google.
6) evrything is ok with ethernet, so dhcpcd seems ok
7) everything is ok on another distribution, so the hardware is ok
8 ) If I share my phone connection, I can connect on the wifi of my phone !? (wtf!?)
9) I checked my box paramters (that really didn't change since long time ago), and my MAC adresse is listed in the authorized list.

So I really dp not understand what happened after this upgrade? Is someone can help?

Here is the output of journalctl (only network related lines)
Code:

févr. 13 19:14:48 gentoo-linux wpa_supplicant[1140]: Successfully initialized wpa_supplicant
févr. 13 19:14:48 gentoo-linux dhcpcd[1137]: dhcpcd-9.4.1 starting
févr. 13 19:14:48 gentoo-linux dhcpcd[1148]: dev: loaded udev
févr. 13 19:14:48 gentoo-linux dhcpcd[1148]: DUID 00:04:8e:5b:1a:81:43:e8:11:cb:8c:2d:9a:87:6e:18:9a:ea
févr. 13 19:14:48 gentoo-linux systemd[1]: Starting wpa_supplicant.service...
févr. 13 19:14:48 gentoo-linux wpa_supplicant[1149]: Successfully initialized wpa_supplicant
févr. 13 19:14:48 gentoo-linux systemd[1]: Started wpa_supplicant.service.
févr. 13 19:14:48 gentoo-linux systemd-networkd[1043]: wlp4s0: Link UP
févr. 13 19:14:48 gentoo-linux wpa_supplicant[1140]: wlp4s0: CTRL-EVENT-REGDOM-CHANGE init=DRIVER type=WORLD
févr. 13 19:14:48 gentoo-linux dhcpcd[1148]: no interfaces have a carrier
févr. 13 19:14:48 gentoo-linux systemd[1]: Started dhcpcd.service.
févr. 13 19:14:48 gentoo-linux systemd[1]: Reached target network.target.
févr. 13 19:14:48 gentoo-linux dhcpcd[1148]: enp0s31f6: waiting for carrier
févr. 13 19:14:48 gentoo-linux dhcpcd[1148]: wlp4s0: waiting for carrier
févr. 13 19:14:48 gentoo-linux systemd-networkd[1043]: enp0s31f6: Link UP
févr. 13 19:14:48 gentoo-linux dhcpcd[1148]: wlp4s0: carrier acquired
févr. 13 19:14:48 gentoo-linux dhcpcd[1148]: wlp4s0: IAID 71:1f:e6:c7
févr. 13 19:14:48 gentoo-linux dhcpcd[1148]: wlp4s0: adding address fe80::3033:b7ca:1482:1cd1
févr. 13 19:14:48 gentoo-linux dhcpcd[1148]: wlp4s0: carrier lost
févr. 13 19:14:49 gentoo-linux dhcpcd[1148]: wlp4s0: deleting address fe80::3033:b7ca:1482:1cd1
févr. 13 19:14:51 gentoo-linux systemd[1]: systemd-rfkill.service: Deactivated successfully.
févr. 13 19:14:51 gentoo-linux wpa_supplicant[1140]: wlp4s0: CTRL-EVENT-REGDOM-CHANGE init=DRIVER type=COUNTRY alpha2=FR
févr. 13 19:14:58 gentoo-linux wpa_supplicant[1140]: wlp4s0: SME: Trying to authenticate with e6:42:da:df:2d:b4 (SSID='Redmi' freq=2472 MHz)
févr. 13 19:14:58 gentoo-linux kernel: wlp4s0: authenticate with e6:42:da:df:2d:b4
févr. 13 19:14:58 gentoo-linux kernel: wlp4s0: send auth to e6:42:da:df:2d:b4 (try 1/3)
févr. 13 19:14:58 gentoo-linux wpa_supplicant[1140]: wlp4s0: Trying to associate with e6:42:da:df:2d:b4 (SSID='Redmi' freq=2472 MHz)
févr. 13 19:14:58 gentoo-linux kernel: wlp4s0: authenticated
févr. 13 19:14:58 gentoo-linux kernel: wlp4s0: associate with e6:42:da:df:2d:b4 (try 1/3)
févr. 13 19:14:58 gentoo-linux kernel: wlp4s0: RX AssocResp from e6:42:da:df:2d:b4 (capab=0x1431 status=0 aid=3)
févr. 13 19:14:58 gentoo-linux kernel: wlp4s0: associated
févr. 13 19:14:58 gentoo-linux systemd-networkd[1043]: wlp4s0: Connected WiFi access point: Redmi (e6:42:da:df:2d:b4)
févr. 13 19:14:58 gentoo-linux wpa_supplicant[1140]: wlp4s0: Associated with e6:42:da:df:2d:b4
févr. 13 19:14:58 gentoo-linux wpa_supplicant[1140]: wlp4s0: CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
févr. 13 19:14:58 gentoo-linux wpa_supplicant[1140]: wlp4s0: WPA: Key negotiation completed with e6:42:da:df:2d:b4 [PTK=CCMP GTK=CCMP]
févr. 13 19:14:58 gentoo-linux wpa_supplicant[1140]: wlp4s0: CTRL-EVENT-CONNECTED - Connection to e6:42:da:df:2d:b4 completed [id=2 id_str=]
févr. 13 19:14:58 gentoo-linux kernel: IPv6: ADDRCONF(NETDEV_CHANGE): wlp4s0: link becomes ready
févr. 13 19:14:58 gentoo-linux dhcpcd[1148]: wlp4s0: carrier acquired
févr. 13 19:14:58 gentoo-linux systemd-networkd[1043]: wlp4s0: Gained carrier
févr. 13 19:14:58 gentoo-linux dhcpcd[1148]: wlp4s0: connected to Access Point: Redmi
févr. 13 19:14:58 gentoo-linux dhcpcd[1148]: wlp4s0: IAID 71:1f:e6:c7
févr. 13 19:14:58 gentoo-linux dhcpcd[1148]: wlp4s0: adding address fe80::23b6:6a2c:6dc9:a7c7
févr. 13 19:14:59 gentoo-linux dhcpcd[1148]: wlp4s0: soliciting an IPv6 router
févr. 13 19:14:59 gentoo-linux systemd-networkd[1043]: wlp4s0: Gained IPv6LL
févr. 13 19:14:59 gentoo-linux systemd-timesyncd[1132]: Network configuration changed, trying to establish connection.
févr. 13 19:14:59 gentoo-linux dhcpcd[1148]: wlp4s0: rebinding lease of 192.168.43.142
févr. 13 19:15:00 gentoo-linux dhcpcd[1148]: wlp4s0: probing address 192.168.43.142/24
févr. 13 19:15:04 gentoo-linux dhcpcd[1148]: wlp4s0: leased 192.168.43.142 for 3599 seconds
févr. 13 19:15:04 gentoo-linux dhcpcd[1148]: wlp4s0: adding route to 192.168.43.0/24
févr. 13 19:15:04 gentoo-linux dhcpcd[1148]: wlp4s0: adding default route via 192.168.43.1
févr. 13 19:15:04 gentoo-linux systemd-timesyncd[1132]: Network configuration changed, trying to establish connection.
févr. 13 19:15:04 gentoo-linux systemd-resolved[1130]: wlp4s0: Bus client set DNS server list to: 192.168.43.1
févr. 13 19:15:11 gentoo-linux dhcpcd[1148]: wlp4s0: no IPv6 Routers available
févr. 13 19:15:36 gentoo-linux systemd-resolved[1130]: Clock change detected. Flushing caches.
févr. 13 19:15:36 gentoo-linux systemd-timesyncd[1132]: Contacted time server 162.159.200.1:123 (2.gentoo.pool.ntp.org).
févr. 13 19:15:36 gentoo-linux systemd-timesyncd[1132]: Initial clock synchronization to Mon 2023-02-13 19:15:36.420972 CET.
févr. 13 19:15:40 gentoo-linux dhcpcd[1148]: wlp4s0: carrier lost
févr. 13 19:15:40 gentoo-linux kernel: wlp4s0: deauthenticated from e6:42:da:df:2d:b4 (Reason: 3=DEAUTH_LEAVING)
févr. 13 19:15:40 gentoo-linux systemd-networkd[1043]: wlp4s0: Lost carrier
févr. 13 19:15:40 gentoo-linux systemd-timesyncd[1132]: No network connectivity, watching for changes.
févr. 13 19:15:40 gentoo-linux dhcpcd[1148]: wlp4s0: deleting address fe80::23b6:6a2c:6dc9:a7c7
févr. 13 19:15:40 gentoo-linux wpa_supplicant[1140]: wlp4s0: CTRL-EVENT-DISCONNECTED bssid=e6:42:da:df:2d:b4 reason=3
févr. 13 19:15:40 gentoo-linux dhcpcd[1148]: wlp4s0: deleting route to 192.168.43.0/24
févr. 13 19:15:40 gentoo-linux dhcpcd[1148]: wlp4s0: deleting default route via 192.168.43.1


And my wpa_supplicant.conf
Code:

ctrl_interface=/run/wpa_supplicant
update_config=1
ap_scan=1
fast_reauth=0
#p2p_disabled=1

network={
   ssid="RainbowF5"
#   proto=WPA2
#   #permet de s'y connecter, même si masqué
#   scan_ssid=1
   key_mgmt=WPA-PSK
   psk="Ma super phrase"
   priority=5
}
network={
   ssid="RainbowF2"
   proto=WPA2
   #permet de s'y connecter, même si masqué
   scan_ssid=1
   key_mgmt=WPA-PSK
   psk="Ma super phrase"
   priority=4
}

#the phone that works :
network={
   ssid="Redmi"
   key_mgmt=WPA-PSK
   psk="Ma superphrase"
   priority=3
}



Thank you very much.


Last edited by Jmi on Tue Feb 14, 2023 5:21 pm; edited 2 times in total
Back to top
View user's profile Send private message
sublogic
Apprentice
Apprentice


Joined: 21 Mar 2022
Posts: 222
Location: Pennsylvania, USA

PostPosted: Tue Feb 14, 2023 3:39 am    Post subject: Reply with quote

Maybe: try re-emerging wpa_supplicant with USE=tkip. Create a file /etc/portage/package.use/wpa_supplicant with content:
Code:
>=net-wireless/wpa_supplicant-2.10-r1 tkip
I am dubious, though, because the related change in wpa_supplicant happened a year ago and you said you installed last month.

If it doesn't work, remove the file and emerge again.
Back to top
View user's profile Send private message
Jmi
n00b
n00b


Joined: 12 Feb 2023
Posts: 3

PostPosted: Tue Feb 14, 2023 5:14 pm    Post subject: [Solved]wpa_supplicant and dhcpcd OK, but no wifi connection Reply with quote

Great, you were right.

I don't know what hapened. Certainly, the first time, I was not familiar with USE flags and I certainly used it on the command line. So I suppose there had a re-emerge during the update process.

That lead me to a question :
How can I know the history of emerge/unmerge in general (what was emerged/unmerged and when) and for a package in particular (which version, with which USE flag and when was merged/unmerged)? I can't find it in emerge or equery man pages.

[EDIT]
Ok, I found the answer to my question : genlop (and qlop) even if it does not give the history of USE flags. So it confirms that wpa_supplicant was re-emerged during the update (why? It will stay a mistery)
[/EDIT]

Thanks for the help on wpa_supplicant!
Back to top
View user's profile Send private message
sublogic
Apprentice
Apprentice


Joined: 21 Mar 2022
Posts: 222
Location: Pennsylvania, USA

PostPosted: Wed Feb 15, 2023 3:44 am    Post subject: Reply with quote

Great.

You have an old router that uses TKIP, a deprecated (and vulnerable) part of the protocol. The wpa_supplicant USE flag for it was turned off about a year ago. Your cell phone is more recent and doesn't use TKIP, so wpa_supplicant works fine with it. If you can't upgrade the router, USE=tkip is a band-aid for wpa_supplicant.

What I don't understand is why the flag was on after your first update. One of life's little mysteries I guess.
Back to top
View user's profile Send private message
Jmi
n00b
n00b


Joined: 12 Feb 2023
Posts: 3

PostPosted: Thu Feb 16, 2023 8:07 pm    Post subject: Reply with quote

Thanks to you I changed the parameters of my box.
Two years old is not so old, so I checked and saw that I have three choices : TKIP ; AES ; TKIP+AES. I chose TKIP+AES thinking it was the best choice, but no matter how I configure the wpa_supplicant.conf file (proto=RSN, group=CCMP), it need to be emerged with tkip USE flag. So I changed the parameter to "AES" only, and now it works wothout the tkip USE flag.
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