Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
changing a/b/g mode with conf.d/wireless
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
vorticies82
n00b
n00b


Joined: 02 Oct 2004
Posts: 36

PostPosted: Wed Aug 24, 2005 9:44 pm    Post subject: changing a/b/g mode with conf.d/wireless Reply with quote

I have an a/b/g atheros card that I want to use as an access point. I want it in b/g mode on channel 11. The card defaults to a(5Ghz) mode. I can change it to b/g mode by giving this command

iwpriv ath0 mode 3

Then I can use iwconfig to change the channel

iwconfig ath0 channel 11

and everything works fine. The problem is, I want this to be done automatically by the startup scripts. In my /etc/conf.d/wireless I have this

mode_ath0="master"
iwpriv_ath0="mode 3"
essid_ath0="DataNode01"
channel_ath0="11"
iwpriv_ath0="hide_ssid 1"

The hide_ssid successfully gets set to 1, but the mode doesn't get changed. /etc/init.d/net.ath0 fails to start because it can't change the channel to 11. The reason it can't change the channel is because the card is still in a(5Ghz) mode. If I comment out the line to change the channel, it still fails, this time telling me that it can't change the channel to 3 (even though I never asked it to set the channel to 3). Also, the order doesn't seem to matter. I can switch the first two lines and get the same result. Any ideas?

Any help would be appreciated. Thanks in advance.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Tue Aug 30, 2005 6:01 am    Post subject: Reply with quote

The problem is that your last iwpriv statement overrides the first one. Here's how to chain them

Code:

iwpriv_ath0="mode 3 hide_ssid 1"
channel_ath0="11"


And voila :)
_________________
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
vorticies82
n00b
n00b


Joined: 02 Oct 2004
Posts: 36

PostPosted: Thu Sep 01, 2005 12:10 am    Post subject: Reply with quote

Thanks for the help.

Ok, now I have this in conf.d/wireless

iwpriv_ath0="mode 3 hide_ssid 1"
channel_ath0="11"
mode_ath0="master"
essid_ath0="DataNode01"

The mode changes successfully, which was my primary concern, but now the hide_ssid doesn't get set.
Back to top
View user's profile Send private message
mterlouw
n00b
n00b


Joined: 17 Feb 2004
Posts: 32

PostPosted: Tue Sep 26, 2006 7:56 pm    Post subject: Reply with quote

I know this is an old topic, but the way to do this nowadays is as follows:
Code:
# Configure multiple iwpriv settings (example).
iwpriv_ath0=(
    "mode 3"
    "hide_ssid 1"
)
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