Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
can't get wlan to work as hostap with baselayout2 [solved]
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
javeree
Guru
Guru


Joined: 29 Jan 2006
Posts: 453

PostPosted: Thu Apr 21, 2011 1:34 pm    Post subject: can't get wlan to work as hostap with baselayout2 [solved] Reply with quote

The network setup I want to make is
ppp0 for access to internet (using dhcp)
eth0 for wired access from other PCs (192.168.0.1/24)
wlan0 working as an access point for other PCs (192.168.9.1/24)

With the new baselayout, I got ppp0 and eth0 working as desired, but wlan and hostapd fail.

I suspect something is wrong in the /etc/conf.d/net file, but could not find a solution.

Code:

# /etc/conf.d/net
# ppp0 related entries have been removed
# userid and password related entries adapted
modules="iproute2"
modules_wlan=" \
        !iwconfig \
        !wpa_supplicant \
        !plug \
        !netplug \
        "
config_wlan="192.168.9.1 netmask 255.255.255.0"
        "
config_lan="192.168.0.1 netmask 255.255.255.0"
dhcp_lan="release"

postdown() {
        # Enable Wake-On-LAN for the lan interface
        # Probably a good idea to set RC_DOWN_INTERFACE="no" in /etc/conf.d/rc
        # as well ;)
        einfo "Calling postdown for ${IFACE}"
        [[ ${IFACE} != "lo" ]] && ethtool -s "${IFACE}" wol pumbg
        # Return 0 always
        return 0
}

essid_wlan="MYSSID"
mode_wlan="Master"
channel_wlan="3"
key_Vereecke="s:MYSSIDPWD"


Quote:
/etc/init.d/net.wlan --verbose start
* Bringing up interface wlan
* Loaded modules: apipa arping bonding br2684ctl tuntap bridge ccwgroup clip ethtool macchanger macnet netplugd wpa_supplicant ssidnet iproute2 pppd system vlan dhcpcd ip6to4
* Running preup ...
* Configuring wlan for MAC address 00:60:B3:94:1A:DD ... [ ok ]
* netplug does not work with wireless
* Starting wpa_supplicant on wlan ...
* Detaching to start `/usr/sbin/wpa_supplicant' ... [ ok ]
* Starting wpa_cli on wlan ...
* Detaching to start `/usr/bin/wpa_cli' ... [ ok ]
* Backgrounding ... ...
* WARNING: net.wlan has started, but is inactive


In the above, what amazes me is that this seems to try to call wpa_supplicant, and tries to plug, even though I've excluded these from the config.

Quote:
iwconfig

wlan IEEE 802.11bg ESSID:"VereeckeRouter"
Mode:Managed Access Point: Not-Associated Tx-Power=20 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off


Code:

#/etc/hostapd/hostapd.conf

interface=wlan
driver=nl80211
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
dump_file=/tmp/hostapd.dump
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid=MYSSID
hw_mode=g
channel=3
beacon_int=100
dtim_period=2
max_num_sta=255
rts_threshold=2347
fragm_threshold=2346
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wme_enabled=1
wme_ac_bk_cwmin=4
wme_ac_bk_cwmax=10
wme_ac_bk_aifs=7
wme_ac_bk_txop_limit=0
wme_ac_bk_acm=0
wme_ac_be_aifs=3
wme_ac_be_cwmin=4
wme_ac_be_cwmax=10
wme_ac_be_txop_limit=0
wme_ac_be_acm=0
wme_ac_vi_aifs=2
wme_ac_vi_cwmin=3
wme_ac_vi_cwmax=4
wme_ac_vi_txop_limit=94
wme_ac_vi_acm=0
wme_ac_vo_aifs=2
wme_ac_vo_cwmin=2
wme_ac_vo_cwmax=3
wme_ac_vo_txop_limit=47
wme_ac_vo_acm=0
eapol_key_index_workaround=0
eap_server=0
own_ip_addr=192.168.9.1
wpa=3
wpa_passphrase=MYSSIDPWD
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP


Quote:
/etc/init.d/hostapd --verbose start

* WARNING: hostapd is scheduled to start when net.wlan has started



I guess this is just a consequence of wlan not starting correctly

Can someone help me find the problem with my config ?

I've also seen there is a new configuration file for the network since baselayout2, called /etc/{init,conf}.d/network. I have not find documentation yet on how to move net.xxxx configuration to network.

P.S. the 'equivalent' configuration in baselayout 1 did work.


Last edited by javeree on Wed Apr 27, 2011 7:39 am; edited 1 time in total
Back to top
View user's profile Send private message
javeree
Guru
Guru


Joined: 29 Jan 2006
Posts: 453

PostPosted: Wed Apr 27, 2011 7:34 am    Post subject: Reply with quote

Today, I rewrote my /etc/conf.d/net, and replaced

Quote:
modules_wlan=" \
!iwconfig \
!wpa_supplicant \
!plug \
!netplug \
"


with

Quote:
modules_wlan="!iwconfig !wpa_supplicant"


after this, wlan was correctly assigned a static IP address and hostapd ran correctly.
I am not sure if it as a spacing issue or somethign with the 'plug' statements I left out, and it was too late to test.

Just to let you know it is solved
Back to top
View user's profile Send private message
jacques.bernardes
n00b
n00b


Joined: 29 Oct 2009
Posts: 22

PostPosted: Thu Jul 14, 2011 4:45 pm    Post subject: Reply with quote

Hi Folks

The most important thing is include the following linis in your /etc/conf.d/net file

Quote:
mode_wlan0="master"
essid_wlan0="YourESSID"
channel_wlan0="01"



Regards


Jacques
Back to top
View user's profile Send private message
donjames
Apprentice
Apprentice


Joined: 19 Dec 2004
Posts: 251
Location: 32°9'50" N 94°50'54" W

PostPosted: Sat Nov 15, 2014 3:31 am    Post subject: Reply with quote

jacques.bernardes wrote:
Hi Folks

The most important thing is include the following linis in your /etc/conf.d/net file

Quote:
mode_wlan0="master"
essid_wlan0="YourESSID"
channel_wlan0="01"



Regards


Jacques



Hi Jacques,

I have been trying for 3 days to configure my Gentoo Linux computer to be a wireless access point. When I added the three lines to /etc/conf/net, that you recommended, it starting working!

Thanks very much for your input.

Sincerely,

Don James
Henderson, Texas, USA
Back to top
View user's profile Send private message
donjames
Apprentice
Apprentice


Joined: 19 Dec 2004
Posts: 251
Location: 32°9'50" N 94°50'54" W

PostPosted: Sat Nov 15, 2014 3:36 am    Post subject: Reply with quote

jacques.bernardes wrote:
Hi Folks

The most important thing is include the following linis in your /etc/conf.d/net file

Quote:
mode_wlan0="master"
essid_wlan0="YourESSID"
channel_wlan0="01"



Regards


Jacques


Hi Jacques,
I got my wireless access point to work after entering the 3 lines that you recommended.

Thanks,

Don James
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