Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to configure net.wlan0 to use iw
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
defer-
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jun 2007
Posts: 140
Location: Finland

PostPosted: Mon Apr 14, 2014 7:50 pm    Post subject: How to configure net.wlan0 to use iw Reply with quote

I would like to use net.wlan0 to auto connect to access point with iproute2/iw/dhcpcd. Now it tries to use wpa_supplicant. If Gentoo networking doesnt support iw yet i would like to know how i could patch it to support it.

Here is my current /etc/conf.d/net
Code:
modules="iproute2 iw dhcpcd"
config_wlan0="dhcp"
preferred_aps="internets"


EDIT:
I found out iw isnt supported because there is no iw.sh module in /lib/netifrc/net. I would like to create module for iw but its very hard to understand iwconfig.sh because iwconfig doesnt even work anymore on new kernels. If there is any documentation for creating module for gentoo networking please let me know.
_________________
https://github.com/defer-
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Mon Apr 14, 2014 11:16 pm    Post subject: Re: How to configure net.wlan0 to use iw Reply with quote

defer- wrote:
I would like to use net.wlan0 to auto connect to access point with iproute2/iw/dhcpcd. Now it tries to use wpa_supplicant. If Gentoo networking doesnt support iw yet i would like to know how i could patch it to support it.

defer- ... honestly, I think you want wpa_supplicant, yes, iw can be used to configure the interface but wpa_supplicant does a host of things that iw doesn't (like WPA/WPA2/RSN). Also, it runs daemonised and can interface with other network components (ie, netifrc itself, and so dhcpcd) on certain events (see /etc/wpa_supplicant/wpa_cli.sh for an example).

defer- wrote:
Code:
modules="iproute2 iw dhcpcd"

This won't work because (as you noticed) there is no iw intergration. However, in such cases you need to "not" the modules like so ...
Code:
modules="!iwconfig !wpa_supplicant foo bar"

defer- wrote:
EDIT: I found out iw isnt supported because there is no iw.sh module in /lib/netifrc/net. I would like to create module for iw but its very hard to understand iwconfig.sh because iwconfig doesnt even work anymore on new kernels. If there is any documentation for creating module for gentoo networking please let me know.

iwconfig should work if you have CONFIG_CFG80211_WEXT (the WEXT compatibility layer for NL80211) enabled. However, iwconfig.sh only works with WEP, and the same is true for iw, it doesn't support WPA supplication: "If you need to connect to an AP with WPA or WPA2 encryption requirements then you must use wpa_supplicant." (from the iw documentation). So, as I said, you probably do want wpa_supplicant ... but looking at iwconfig.sh it shouldn't be too difficult to write a similar script to support iw ... I imagine the reason this hasn't happened is there is little interest in providing additional support for WEP.

HTH & best ... khay
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