# how to set txpower for a usb wireless nic using ndiswrapper?

## dirtbag

anyone know how to do this from ndiswrapper?

i cant seem to do it the "normal" way

```

[jason@badman ~]$ sudo iwconfig wlan4 txpower 12

[jason@badman ~]$ iwconfig wlan4

wlan4     IEEE 802.11g  ESSID:"dirtbag2"  

          Mode:Managed  Frequency:2.447 GHz  Access Point: 00:24:01:43:24:B4   

          Bit Rate=78 Mb/s   Tx-Power:20 dBm   Sensitivity=0/3  

          RTS thr:off   Fragment thr:off

          Power Management:off

          Link Quality:50/100  Signal level:-64 dBm  Noise level:-96 dBm

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

[jason@badman ~]$ 

```

-db

----------

## khayyam

dirtbag ...

'txpower' is no doubt set to 'auto', if the card supports different rates then these can be set 'fixed' (where the value, or lower, will be used). So, append 'fixed'.

```
# iwconfig wlan4 txpower 12 fixed
```

or using net-wireless/iw

```
# iw dev wlan4 set txpower fixed 120
```

best ... khay

----------

## dirtbag

thanks for the info!

the command seems to have taken without complaint, but iwconfig command output still shows the txpower as 20dBm 

so im not sure if its really set or the output of iwconfig is lying to me or what.

```

[root@badman jason]# iwconfig wlan4 txpower 12 fixed

[root@badman jason]# iwconfig 

p4p1      no wireless extensions.

lo        no wireless extensions.

wlan4     IEEE 802.11g  ESSID:"dirtbag2"  

          Mode:Managed  Frequency:2.447 GHz  Access Point: 00:24:01:43:24:B4   

          Bit Rate=52 Mb/s   Tx-Power:20 dBm   Sensitivity=0/3      <----still shows 20 ?

          RTS thr:off   Fragment thr:off

          Encryption key:05FE-C5D0-6C55-7753-F4D2-F25B-AA4A-CCA3   Security mode:restricted

          Power Management:off

          Link Quality:48/100  Signal level:-65 dBm  Noise level:-96 dBm

          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0

          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

[root@badman jason]# 

-db

```

----------

## khayyam

 *dirtbag wrote:*   

> the command seems to have taken without complaint, but iwconfig command output still shows the txpower as 20dBm so im not sure if its really set or the output of iwconfig is lying to me or what.

 

dirtbag ... I'm not sure what to suggest, it may be a result of using NDISWrapper. You might get better results with net-wireless/iw as CFG80211 may be in use and not WEXT ... again, not sure this has any baring, but worth a try.

best ... khay

----------

## dirtbag

yeah the problem is that the regular 8192 (rtl8192 and the newer 8192cu) drivers for this silly thing dont work well and either

1. connect to my AP and dont pass traffic 

or 

2. connect to my AP and pass traffic, but have a LOT of drops.. 

but ill keep playing with it..

 thanks for the info!

ooh btw, this is the asus N13 http://www.asus.com/Networking/USBN13_B1/

-db

----------

## John R. Graham

Moved from Kernel & Hardware to Networking & Security as it fits better here.

- John

----------

## khayyam

 *dirtbag wrote:*   

> yeah the problem is that the regular 8192 (rtl8192 and the newer 8192cu) drivers for this silly thing dont work well

 

dirtbag ... haven't used either, but generally haven't had much luck with usb cards. You might look at and/or pastebin the output of 'iw list' ... it should provide some idea of what the cards capablities are.

best ... khay

----------

## NeddySeagoon

dirtbag,

Many USB cards do not support changing Tx power.  They are limited by the USB bus power, which is 2.5w for everything.

Can you check with another (non ndiswrapper) driver?

20dbm is half the permitted max of 26dbm Tx power in the UK.

Each 6db is a power doubling as its a log scale.

----------

