LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Closed Thread
 
Search this Thread
Old 08-18-2012, 03:11 AM   #1
Mercury305
Member
 
Registered: Jul 2012
Location: Rockville, MD
Distribution: CrunchBang / Ubuntu
Posts: 540

Rep: Reputation: Disabled
iw reg set


I am trying to configure the restriction for "iw" but I don't know where the file is. I don't want to go through

ifconfig wlan0 down
iw reg set BO #a country with low wireless restrictions
ifconfig wlan0 up

every time I boot.

Thanks

Last edited by Mercury305; 08-18-2012 at 03:19 AM.
 
Old 08-18-2012, 03:30 AM   #2
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad T61 6457-4XG
Posts: 4,533

Rep: Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190
"whereis iw" will tell you that the executable is in /usr/sbin (in Slackware).

So to use it you need to be root, else you will get "command not found".

But if you put that in /etc/rc.d/rc.local this should work, provided /etc/rc.d/rc.local be executable of course.

Use the full path for commands though, as at startup time $PATH could not be set yet.

Last edited by Didier Spaier; 08-18-2012 at 03:48 AM.
 
Old 08-18-2012, 11:15 AM   #3
Mercury305
Member
 
Registered: Jul 2012
Location: Rockville, MD
Distribution: CrunchBang / Ubuntu
Posts: 540

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Didier Spaier View Post
"whereis iw" will tell you that the executable is in /usr/sbin (in Slackware).

So to use it you need to be root, else you will get "command not found".

But if you put that in /etc/rc.d/rc.local this should work, provided /etc/rc.d/rc.local be executable of course.

Use the full path for commands though, as at startup time $PATH could not be set yet.
thanks i didnt mean that. I meant if it wrote into a config file for example lilo and lilo.conf.

I wanted to know where the output of iw reg set goes to and find a way to permanently set my wireless regulation standard to BO instead of US or whatever it is listed as in whatever file it is.
 
Old 08-18-2012, 12:11 PM   #4
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad T61 6457-4XG
Posts: 4,533

Rep: Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190
iw is supposed to supersede iwconfig in configuring wireless devices.

It is provided in Slackware but not (yet) used in configuration scripts.

Anyhow, as iwconfig, iw relies on /etc/wpa_supplicant.conf to configure encrypted wireless connections.

IOW, somehow /etc/wpa/supplicant is to iw what lilo.conf is to lilo.

So to answer directly your question:
Quote:
I wanted to know where the output of iw reg set goes to and find a way to permanently set my wireless regulation standard to BO instead of US or whatever it is listed as in whatever file it is.
1) I don't know where output of iw (nor iwconfig) goes but it should probably feed some tables in RAM (as for instance the rules you set up with the "iptables" command do)
2) To permanently set up your wireless regulation standard to BO instead of US (which is the default, by the way), just edit /etc/wpa_supplicant.conf, so that it includes this line:
Code:
country=BO
EDIT As "modinfo cfg80211" shows, alternatively it should be possible to set the ieee80211_regdom parameter of the cfg80211 module in /etc/modprobe.d/something.conf as an option but I didn't see it recommended anywhere.

Last edited by Didier Spaier; 08-18-2012 at 12:29 PM. Reason: EDITadded
 
Old 08-18-2012, 12:21 PM   #5
philanc
Member
 
Registered: Jan 2011
Posts: 67

Rep: Reputation: 32
Quote:
Originally Posted by Mercury305 View Post
I am trying to configure the restriction for "iw" but I don't know where the file is. I don't want to go through

ifconfig wlan0 down
iw reg set BO #a country with low wireless restrictions
ifconfig wlan0 up

every time I boot.
If you use wpa_supplicant, you can add the following line to /etc/wpa_supplicant.conf
COUNTRY=BO

(if I understand correctly the doc -- I didn't tried it myself)

HTH

Phil

Edit: ... Didier was faster than me on this :-)

Last edited by philanc; 08-18-2012 at 12:23 PM.
 
Old 08-18-2012, 12:38 PM   #6
Mercury305
Member
 
Registered: Jul 2012
Location: Rockville, MD
Distribution: CrunchBang / Ubuntu
Posts: 540

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Didier Spaier View Post
iw is supposed to supersede iwconfig in configuring wireless devices.

It is provided in Slackware but not (yet) used in configuration scripts.

Anyhow, as iwconfig, iw relies on /etc/wpa_supplicant.conf to configure encrypted wireless connections.

IOW, somehow /etc/wpa/supplicant is to iw what lilo.conf is to lilo.

So to answer directly your question:

1) I don't know where output of iw (nor iwconfig) goes but it should probably feed some tables in RAM (as for instance the rules you set up with the "iptables" command do)
2) To permanently set up your wireless regulation standard to BO instead of US (which is the default, by the way), just edit /etc/wpa_supplicant.conf, so that it includes this line:
Code:
country=BO
EDIT As "modinfo cfg80211" shows, alternatively it should be possible to set the ieee80211_regdom parameter of the cfg80211 module in /etc/modprobe.d/something.conf as an option but I didn't see it recommended anywhere.
ok i tried the wpasuplicant.conf adding the parameters. No change after reboot.
still requiring manual reg set to BO in able to change txpower to 27-30dbm
I guess I need to execute the file with wpa_suplicant? just dont know the exact command parameters tried -N didnt work.
Also can I somehow add manual set of txpower = 27dbm into the wpasuplicant.conf?

Last edited by Mercury305; 08-18-2012 at 12:39 PM.
 
Old 08-18-2012, 01:58 PM   #7
Didier Spaier
Senior Member
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slackware{,64}-{14.1,current} on a Lenovo Thinkpad T61 6457-4XG
Posts: 4,533

Rep: Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190Reputation: 1190
There is no way of setting the txpower directly with wpa_supplicant. To do that the intended command is:
Code:
iwconfig <interface> txpower <value>
see "man iwconfig".

To make this setting permanent in Slackware the only way I know is to include above command in /etc/rc.d/rc.local.

But as changing the regulatory country seems to have the side effect of changing the transmit power as well, setting the country to BO in wpa_supplicant.conf should do the same.

The way to enforce this setting depends on the way your network is configured. If it is in editing manually /etc/rc.d/rc.inet1.conf, just edit that file to have:
Code:
WLAN_WPA[<interface number>]="wpa_supplicant"
If you use wicd or Network Manager, I am not sure how to do that, hopefully someone else will tell you.

Last edited by Didier Spaier; 08-18-2012 at 02:00 PM.
 
Old 08-20-2012, 11:02 AM   #8
Mercury305
Member
 
Registered: Jul 2012
Location: Rockville, MD
Distribution: CrunchBang / Ubuntu
Posts: 540

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Didier Spaier View Post
There is no way of setting the txpower directly with wpa_supplicant. To do that the intended command is:
Code:
iwconfig <interface> txpower <value>
see "man iwconfig".

To make this setting permanent in Slackware the only way I know is to include above command in /etc/rc.d/rc.local.

But as changing the regulatory country seems to have the side effect of changing the transmit power as well, setting the country to BO in wpa_supplicant.conf should do the same.

The way to enforce this setting depends on the way your network is configured. If it is in editing manually /etc/rc.d/rc.inet1.conf, just edit that file to have:
Code:
WLAN_WPA[<interface number>]="wpa_supplicant"
If you use wicd or Network Manager, I am not sure how to do that, hopefully someone else will tell you.
Didi, thanks I am going to simply add the parameters into rc.d/

I thin the iw writes the output directly into the kernel not a config file. I'm sure there is a patch for it though.
 
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Reg:RHCE prakashkumar41 Red Hat 1 08-13-2010 06:56 PM
Windows: Which program can track the reg updates at software install and make a reg? frenchn00b General 5 11-20-2008 05:26 PM
Reg:COM maniviswa Linux - Server 1 05-22-2008 03:23 PM
Reg DHCP asrikanth82 Linux - Software 1 07-13-2007 08:44 AM
Nice surprise Kaffeine plays Reg 1 and Reg 2 disks 1kyle Suse/Novell 1 10-10-2005 05:47 PM


All times are GMT -5. The time now is 07:44 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration