The pfSense Store

Author Topic: What is txpower? Should I be able to set txpower higher than 30?  (Read 3142 times)

0 Members and 1 Guest are viewing this topic.

Offline ryan29

  • Newbie
  • *
  • Posts: 14
    • View Profile
I have one of these wireless cards.  Here's the datasheet (pdf).  Here's the info from ifconfig -v ath0_wlan0.

Code: [Select]
ath0_wlan0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 1500
        ether 00:80:48:71:10:41
        inet6 fe80::280:48ff:fe71:1041%ath0_wlan0 prefixlen 64 scopeid 0x9
        nd6 options=3<PERFORMNUD,ACCEPT_RTADV>
        media: IEEE 802.11 Wireless Ethernet autoselect mode 11g <hostap>
        status: running
        ssid ALIX0 channel 6 (2437 MHz 11g) bssid 00:80:48:71:10:41
        regdomain FCC country CA indoor ecm authmode WPA2/802.11i -wps -tsn
        privacy MIXED deftxkey 3
        AES-CCM 2:128-bit
        AES-CCM 3:128-bit powersavemode OFF powersavesleep 100 txpower 30
        txpowmax 50.0 -dotd rtsthreshold 2346 fragthreshold 2346 bmiss 7
        11a     ucast NONE    mgmt  6 Mb/s mcast  6 Mb/s maxretry 6
        11b     ucast NONE    mgmt  1 Mb/s mcast  1 Mb/s maxretry 6
        11g     ucast NONE    mgmt  1 Mb/s mcast  1 Mb/s maxretry 6
        turboA  ucast NONE    mgmt  6 Mb/s mcast  6 Mb/s maxretry 6
        turboG  ucast NONE    mgmt  1 Mb/s mcast  1 Mb/s maxretry 6
        sturbo  ucast NONE    mgmt  6 Mb/s mcast  6 Mb/s maxretry 6
        11na    ucast NONE    mgmt  0 MCS  mcast  0 MCS  maxretry 6
        11ng    ucast NONE    mgmt  0 MCS  mcast  0 MCS  maxretry 6
        half    ucast NONE    mgmt  3 Mb/s mcast  3 Mb/s maxretry 6
        quarter ucast NONE    mgmt  1 Mb/s mcast  1 Mb/s maxretry 6
        scanvalid 60 -bgscan bgscanintvl 300 bgscanidle 250
        roam:11a     rssi    7dBm rate 12 Mb/s
        roam:11b     rssi    7dBm rate  1 Mb/s
        roam:11g     rssi    7dBm rate  5 Mb/s
        roam:turboA  rssi    7dBm rate 12 Mb/s
        roam:turboG  rssi    7dBm rate 12 Mb/s
        roam:sturbo  rssi    7dBm rate 12 Mb/s
        roam:11na    rssi    7dBm  MCS  1
        roam:11ng    rssi    7dBm  MCS  1
        roam:half    rssi    7dBm rate  6 Mb/s
        roam:quarter rssi    7dBm rate  3 Mb/s
        -pureg protmode OFF -ht -htcompat -ampdu ampdulimit 8k
        ampdudensity NA -amsdu -shortgi htprotmode RTSCTS -puren smps -rifs
        -wme burst -dwds -hidessid apbridge dtimperiod 1 doth -dfs inact
        bintval 100
        groups: wlan

A post on another forum says txpowmax is 2x the actual max dBm.  This seems right since my card has a tolerance of  +1dBm/-1.5dBm, meaning txpowmax should be 49-54.

Now, the part I'm unsure about is txpower.  Is it dBm or is it a percentage of txpowmax?  The dd-wrt wiki says it's dBm, but I've seen posts on this forum where people have a txpower value that is higher than txpowmax.  My values above don't make sense to me either since txpowmax indicates 25dBm is the max power, but txpower would be at 30dBm.

If I change the regulator domain from CA (FCC) back to the default, which uses US (FCC), the card defaults to 26 for txpower.  I'm a bit confused and Google hasn't been much help tonight.  Can anyone explain to me what kind of values I should expect for txpowmax and txpower and what I should be setting them to if they need to be overridden?

Edit: I forgot to mention, I can set txpower to anything below 30 by using ifconfig ath0_wlan0 txpower XX where XX is a value (ex: 20).
« Last Edit: April 26, 2012, 02:42:41 am by jptech »

Offline jimp

  • Administrator
  • Hero Member
  • *****
  • Posts: 14935
    • View Profile
Re: What is txpower? Should I be able to set txpower higher than 30?
« Reply #1 on: May 01, 2012, 11:28:46 am »
<rd id="fcc">
  <name>FCC</name>
  <sku>0x10</sku>
  <defcc ref="US"/>
  <netband mode="11b">
    <band>
      <freqband ref="F1_2412_2462"/>
      <maxpower>30</maxpower>
      <flags>IEEE80211_CHAN_B</flags>
    </band>
  </netband>
...
<country id="CA">
  <isocc>124</isocc> <name>Canada</name> <rd ref="fcc"/>
</country>

No, 30 is max for US and Canada. If you want higher, you have to force it to go unregulated. which may or may not work, and may or may not actually increase the power, and may or may not violate applicable laws in your area... (technically... though I'm not sure anyone has been arrested/fined for that...)
Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!

Offline jimp

  • Administrator
  • Hero Member
  • *****
  • Posts: 14935
    • View Profile
Re: What is txpower? Should I be able to set txpower higher than 30?
« Reply #2 on: May 01, 2012, 11:30:06 am »
FYI- That's from /usr/src/etc/regdomain.xml and there are more power levels depending on the band...

Code: [Select]
  <netband mode="11b">
    <band>
      <freqband ref="F1_2412_2462"/>
      <maxpower>30</maxpower>
      <flags>IEEE80211_CHAN_B</flags>
    </band>
  </netband>
  <netband mode="11g">
    <band>
      <freqband ref="F1_2412_2462"/>
      <maxpower>30</maxpower>
      <flags>IEEE80211_CHAN_G</flags>
    </band>
  </netband>
  <netband mode="11a">
    <band>
      <freqband ref="F1_5180_5240"/>
      <maxpower>17</maxpower>
    </band>
    <band>
      <freqband ref="F1_5745_5805"/>
      <maxpower>23</maxpower>
    </band>
    <band>
      <freqband ref="F1_5825_5825"/>
      <maxpower>23</maxpower>
      <flags>IEEE80211_CHAN_PASSIVE</flags>
    </band>
  </netband>
  <netband mode="11ng">
    <band>
      <freqband ref="F1_2412_2462"/>
      <maxpower>30</maxpower>
      <flags>IEEE80211_CHAN_G</flags>
      <flags>IEEE80211_CHAN_HT20</flags>
    </band>
    <band>
      <freqband ref="F1_2412_2462"/>
      <maxpower>30</maxpower>
      <flags>IEEE80211_CHAN_G</flags>
      <flags>IEEE80211_CHAN_HT40</flags>
    </band>
  </netband>
  <netband mode="11na">
    <band>
      <freqband ref="F1_5180_5240"/>
      <maxpower>17</maxpower>
Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!

Offline ryan29

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: What is txpower? Should I be able to set txpower higher than 30?
« Reply #3 on: May 05, 2012, 05:39:02 am »
Thanks for the reply.  From what you've said, txpower is dBm, so I have a few more questions then.  The card I have lists 26dBm as the max and 23dBm @ 54Mbps.  I had assumed txpower was something read from the wireless card and was the power level the card was currently transmitting at, but that's not right, is it?

Something else that confuses me then is why the transmit power in the GUI shows 0-99 if the selected regulatory domain is going to limit it to 30.  Are they even related?  Changing that setting in the GUI doesn't do anything for me even though I know I can change txpower on my card.  Using ifconfig ath0_wlan0 txpower 5 will cause the signal to be a couple bars weaker with my AP about 5 feet from my desk.

Ignoring the GUI, I'm assuming with a txpower of 30 my wifi card will be asked to use 30dBm, but won't go above 26dBm internally.  Is that correct?

Offline rt_rex

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
Re: What is txpower? Should I be able to set txpower higher than 30?
« Reply #4 on: May 05, 2012, 03:00:15 pm »
I have read somewhere the TX power units in freebsd arerepresented by 0.5 dbm.
Meaning 30 dbm = 30*0.5=15 dbm=30 mW

Jimp can you confirm this ?

thanks


Edit: I read it here
http://osdir.com/ml/freebsd-wireless/2011-08/msg00052.html
« Last Edit: May 05, 2012, 03:11:29 pm by rt_rex »
Donīt Try this @home go outside!
WIFI Link @ 76 km

Offline jimp

  • Administrator
  • Hero Member
  • *****
  • Posts: 14935
    • View Profile
Re: What is txpower? Should I be able to set txpower higher than 30?
« Reply #5 on: May 05, 2012, 04:58:45 pm »
The author of that e-mail would know more than me. I don't know about that low down.
Need help fast? Commercial Support!

Co-Author of pfSense: The Definitive Guide. - Check the Doc Wiki for FAQs.

Do not PM for help!

Offline rt_rex

  • Jr. Member
  • **
  • Posts: 84
    • View Profile
Re: What is txpower? Should I be able to set txpower higher than 30?
« Reply #6 on: May 05, 2012, 05:50:17 pm »
Thanks Jimp

JPtech i have been looking allover for the listing of wireless caps on freebds an finaly i have found them  ;D
http://www.freebsd.org/cgi/man.cgi?query=ifconfig&apropos=0&sektion=8&manpath=FreeBSD+8.1-RELEASE+and+Ports&arch=default&format=html

Hope it will help you (some pages down look for "The following parameters are specific to cloning IEEE 802.11 wireless...")
Donīt Try this @home go outside!
WIFI Link @ 76 km

Offline ryan29

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: What is txpower? Should I be able to set txpower higher than 30?
« Reply #7 on: May 06, 2012, 09:38:46 am »
That mailing list post might be specific to the Intel iwn(4) driver.  From what I can tell, txpower is set in increments of .5dBm and stored, internally, as an integer.  When I set it to 20.5 it works, but 20.6 gives an error:
Code: [Select]
ifconfig: invalid tx power (must be .5 dBm units)So, to me, that means the value shown by txpower is definitely in dBm.  I'm still confused about txpowmax being 50.0 though.  Is it 2xdBm?  I also don't know why txpower can be set above 26dBm for my specific card.

I subscribed to the freebsd-wireless mailing list and sent a message to it to see if someone there can give a better explanation.  With the exception of the GUI setting it doesn't look like pfSense actually touches any of the parts involved.

Here are a few links I found to related info.