Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] DHCPCD + wpa_supplicant without WEXT
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
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2583

PostPosted: Fri Sep 12, 2014 7:26 pm    Post subject: [SOLVED] DHCPCD + wpa_supplicant without WEXT Reply with quote

After first problems with dhcpcd are solved I am starting this new thread as the next problem is with wpa_supplicant. I am using dhcpcd-9999 as network manager instead of netifrc and I finally removed wext support from my kernel as described in this post.

Now the wireless has a problem since wpa_supplicant can no longer connect to the access point. It turned out that I had to add one more parameter "ap_scan=2" in the head of the configuration file but that's only one step closer to the solution. Next step, I had to learn how to debug wpa_supplicant and,

here comes the error log in pastebin.

In it I can read
Quote:
EAP: EAP entering state DISABLED
EAPOL: Supplicant port status: Unauthorized

But what does that mean, what is wrong here? I have no clue :-(

EDIT
Subject changed


Last edited by charles17 on Tue Sep 16, 2014 9:49 am; edited 5 times in total
Back to top
View user's profile Send private message
umka69
Tux's lil' helper
Tux's lil' helper


Joined: 31 Mar 2013
Posts: 124

PostPosted: Sat Sep 13, 2014 3:38 pm    Post subject: Reply with quote

It seems that you need to enable WEXT in your kernel.
http://wiki.gentoo.org/wiki/Wifi
_________________
Make a wish, this text is magic. :)
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2583

PostPosted: Sat Sep 13, 2014 5:16 pm    Post subject: Reply with quote

umka69 wrote:
It seems that you need to enable WEXT in your kernel.
http://wiki.gentoo.org/wiki/Wifi
I intentionally removed wext because according to UberLord's posting it should work without.
Today I cross checked debugging of wpa_supplicant once with wext enabled in the kernel (gentoo-sources:3.14.14) and once without.

Comparing the debug logs may take us one step closer to the root cause of the problem. I've put the diff in pastebin.

It looks like something called RTM_NEWLINK goes wrong and only can add the interface with CONFIG_NL80211_WEXT=y in the kernel.
Quote:
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlp8s0' added
RTM_NEWLINK is mentioned in man rtnetlink, but not easy to understand.

Any idea?


Last edited by charles17 on Sat Sep 13, 2014 5:42 pm; edited 1 time in total
Back to top
View user's profile Send private message
umka69
Tux's lil' helper
Tux's lil' helper


Joined: 31 Mar 2013
Posts: 124

PostPosted: Sat Sep 13, 2014 5:40 pm    Post subject: Reply with quote

Show your wpa_supplicant.conf please.
_________________
Make a wish, this text is magic. :)
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2583

PostPosted: Sat Sep 13, 2014 6:00 pm    Post subject: Reply with quote

umka69 wrote:
Show your wpa_supplicant.config please.
Did you mean this file?
Quote:
/etc/wpa_supplicant_wpa_supplicant.conf
Quote:
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=wheel
# eapol_version=2
ap_scan=2
update_config=1
What do you think should I put there?
Just to make it clear, this topic is about using dhcpcd as network manager in a pure mac80211 kernel without the old wireless extensions compatibility.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6737
Location: Blighty

PostPosted: Sat Sep 13, 2014 8:50 pm    Post subject: Reply with quote

Maybe you need to enable the nl80211 driver in wpa supplicant.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2583

PostPosted: Sat Sep 13, 2014 9:16 pm    Post subject: Reply with quote

UberLord wrote:
Maybe you need to enable the nl80211 driver in wpa supplicant.

From the debug log I can see the driver being ok:
Quote:
wpa_supplicant v2.0
random: Trying to read entropy from /dev/random
Successfully initialized wpa_supplicant
Initializing interface 'wlp8s0' conf '/etc/wpa_supplicant/wpa_supplicant.conf' driver 'nl80211' ctrl_interface '/var/run/wpa_supplicant' bridge 'N/A'
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6737
Location: Blighty

PostPosted: Sat Sep 13, 2014 11:47 pm    Post subject: Reply with quote

http://roy.marples.name/projects/dhcpcd/ci/3815155e933d566f03cb369e669ed7b9389cb480?sbs=0

After that patch I needed to add this to dhcpcd.conf

Code:
env wpa_supplicant_driver=nl80211


To get it to work. Without that, I had the same issues you did with WEXT disabled.
I think that's a bug with wpa_supplicant.

In summary, dhcpcd fully works with WEXT disabled now :)
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2583

PostPosted: Sun Sep 14, 2014 8:05 am    Post subject: Reply with quote

UberLord wrote:
I think that's a bug with wpa_supplicant.
Upstream? Cannot find an upstream bugtracker to report there :-(

UberLord wrote:
In summary, dhcpcd fully works with WEXT disabled now :)

That's really great!! I have tested and it also works for me.

P.S.:
Regression test with kernel still having wext enabled also works.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6737
Location: Blighty

PostPosted: Sun Sep 14, 2014 8:09 am    Post subject: Reply with quote

Last I checked, upstream just had mailing lists.
Tell them that the driver should test nl80211 first and if that fails drop back to WEXT.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2583

PostPosted: Sun Sep 14, 2014 2:03 pm    Post subject: Reply with quote

UberLord wrote:
http://roy.marples.name/projects/dhcpcd/ci/3815155e933d566f03cb369e669ed7b9389cb480?sbs=0

After that patch I needed to add this to dhcpcd.conf

Code:
env wpa_supplicant_driver=nl80211
That looks equivalent to netifrc having that certain line in the config file as recommended in http://wiki.gentoo.org/wiki/Wpa_supplicant#Setup_with_netifrc_as_network_manager

One more thing
On the comparison table in http://wiki.gentoo.org/wiki/Network_management I have added that line for DHCPCD. May I ask you to care for or just comment on those question marks I've left there behind?
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6737
Location: Blighty

PostPosted: Sun Sep 14, 2014 3:47 pm    Post subject: Reply with quote

Done.

Now, if someone could create a dhcpcd-ui project page as I suck @ wiki text :)
It has a GTK+ front-end, the QT port is almost complete and has an applet just for systemd so applications can depend on dhcpcd saying "network ready".

http://roy.marples.name/projects/dhcpcd-ui
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2583

PostPosted: Mon Sep 15, 2014 7:36 am    Post subject: Reply with quote

UberLord wrote:
Last I checked, upstream just had mailing lists.
Tell them that the driver should test nl80211 first and if that fails drop back to WEXT.

According to http://w1.fi/cgit/hostap/plain/wpa_supplicant/ChangeLog that might already work in a newer version. In case that really works your workaround in 10-wpa_supplicant were no longer needed.
Code:
   * changed the default driver interface from wext to nl80211 if both are
     included in the build
My version is the presently stable wpa_supplicant-2.0-r2. Did you test with the newer version?
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6737
Location: Blighty

PostPosted: Mon Sep 15, 2014 8:19 am    Post subject: Reply with quote

No, I'm mainly running stable.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
charles17
Advocate
Advocate


Joined: 02 Mar 2008
Posts: 2583

PostPosted: Mon Sep 15, 2014 9:10 am    Post subject: Reply with quote

UberLord wrote:
No, I'm mainly running stable.
So do I, only some few packages with ~amd64.
Regarding the fix in wpa_supplicant, I've upgraded to wpa_supplicant-2.2.-r1 and locally redid your changes from http://roy.marples.name/projects/dhcpcd/info/3815155e933d566f03cb369e669ed7b9389cb480 and after rebooting it still works. :D
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