Reduce transmission power for 88w8887

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Reduce transmission power for 88w8887

1,552 Views
hbabar
Contributor II

Hello,

I am using the 88w8887 wifi module from nxp on our iMx6 system. I want to reduce the transmission power for the wifi module arbitrarily. I am using the sd8xxx and mlan drivers from Nxp. The kernel parameters wext_priv and cfg80211 are enabled. This should be possible with:

iw uap0 set txpower limit 1300

but I get  'command failed: Bad address (-14)'

using uaputl.exe

./uaputl.exe sys_cfg_tx_power [TX_POWER]

has no effect either.

Any help would be appreciated.

Tags (2)
0 Kudos
5 Replies

1,537 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello @hbabar ,

Try to use these steps to limit tx power, please!

------------------------------------------------

1. Building driver source code and get configuration files and mlanut tools

#  cd wlan_src

# make build

# cd ../

# ls

weidong_sun_0-1654743120003.png

# cd bin_sd8887

# ls

weidong_sun_1-1654743185869.png

# cd config

# ls

weidong_sun_2-1654743234732.png

txpwrlimit_cfg.conf is used to configure TX power of wifi chip.

2. Using txpwrlimit_cfg.conf file

---using mlanutl tool to convert the file to .bin .

# mlanutl mlan0 hostcmd txpwrlimit_cfg.conf generate_raw txpwrlimit_cfg.bin

copy the .pin file to /lib/firmware/nxp

# cp ./txpwrlimit_cfg.bin /lib/firmware/nxp

---when loading driver , load txpwrlimit_cfg.bin a parameter.

# insmod sd8887 ...... txpwrlimit_cfg=nxp/txpwrlimit_cfg.bin ....

[Note]

Before converting txpwrlimit_cfg.conf to .bin file, you can also change txpwrlimit_cfg.conf. BUTbasically, it doesn't need to be changed.

 

Hope above steps are helpful for you.

Have a good day!

Regards,

weidong

 

1,417 Views
hbabar
Contributor II

I used a modified txpwrlimit_cfg.conf file to set the power of all modulation groups in all all channels to 1. So, for e.g. the setting for channel 1 looks like this:

ChanTRPC.TlvType:2=0x0189
ChanTRPC.TlvLength:2={
    TLVStartFreq:2=2407
    TLVChanWidth:1=20
    TLVChanNum:1=1
    TLVPwr:20='0,1,1,1,2,1,3,1,4,1,5,1,6,1,7,1,8,1,9,1'
}

But I do not see a corresponding difference in the tx power levels. When I run the following command to read the powerlevels in the bin file, this is the output:

root@zxc:~# ./mlanutl uap0 get_txpwrlimit /lib/firmware/nxp/txpwrlimit_1.bin
------------------------------------------------------------------------------------
Get txpwrlimit: sub_band=0x0 len=404
StartFreq: 2407
ChanWidth: 20
ChanNum:   1
Pwr:0,18,1,17,2,17,3,15,4,17,5,17,6,15,7,15,8,15,9,13
StartFreq: 2407
ChanWidth: 20
ChanNum:   2
Pwr:0,18,1,17,2,17,3,15,4,17,5,17,6,15,7,15,8,15,9,13
StartFreq: 2407
ChanWidth: 20
ChanNum:   3
Pwr:0,18,1,17,2,17,3,15,4,17,5,17,6,15,7,15,8,15,9,13
StartFreq: 2407
ChanWidth: 20
ChanNum:   4
Pwr:0,18,1,17,2,17,3,15,4,17,5,17,6,15,7,15,8,15,9,13
StartFreq: 2407
ChanWidth: 20
ChanNum:   5
Pwr:0,18,1,17,2,17,3,15,4,17,5,17,6,15,7,15,8,15,9,13
StartFreq: 2407
ChanWidth: 20
ChanNum:   6
Pwr:0,18,1,17,2,17,3,15,4,17,5,17,6,15,7,15,8,15,9,13
StartFreq: 2407
ChanWidth: 20
ChanNum:   7
Pwr:0,18,1,17,2,17,3,15,4,17,5,17,6,15,7,15,8,15,9,13
StartFreq: 2407
ChanWidth: 20
ChanNum:   8
Pwr:0,18,1,17,2,17,3,15,4,17,5,17,6,15,7,15,8,15,9,13
StartFreq: 2407
ChanWidth: 20
ChanNum:   9
Pwr:0,18,1,17,2,17,3,15,4,17,5,17,6,15,7,15,8,15,9,13
StartFreq: 2407
ChanWidth: 20
ChanNum:   10
Pwr:0,18,1,17,2,17,3,15,4,17,5,17,6,15,7,15,8,15,9,13
StartFreq: 2407
ChanWidth: 20
ChanNum:   11
Pwr:0,18,1,17,2,17,3,15,4,17,5,17,6,15,7,15,8,15,9,13
StartFreq: 2407
ChanWidth: 20
ChanNum:   12
Pwr:0,18,1,17,2,17,3,15,4,17,5,17,6,15,7,15,8,15,9,13
StartFreq: 2407
ChanWidth: 20
ChanNum:   13
Pwr:0,18,1,17,2,17,3,15,4,17,5,17,6,15,7,15,8,15,9,13
StartFreq: 2414
ChanWidth: 20
ChanNum:   14
Pwr:0,18,1,17,2,17,3,15,4,17,5,17,6,15,7,15,8,15,9,13

 It looks like the changes that I made in the conf file were not translated correctly to raw data. Any idea why ?
Regards,
hbabar

0 Kudos

1,406 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hi @hbabar ,

 

It is enough to use default txpwr_limit file for application. Up to now few users change it.
So don't recommend to change the file.

 

Regards,

weidong

 

0 Kudos

1,358 Views
hbabar
Contributor II

Hi @weidong_sun

how can I set the transmission power then to a value that I want ?

Regards,
hbabar

Tags (1)
0 Kudos

1,515 Views
hbabar
Contributor II

Hello @weidong_sun 

thanks a lot for your reply. I didn't know that the txprwlimit_cfg.conf had to be converted to .bin .

Here is a snippet from the txpwrlimit_cfg.conf file explaining the configuration:

## Set CFG data for Tx power limitation
##
## TLVStartFreq: Starting Frequency of the band for this channel
## 2407, 2414 or 2400 for 2.4 GHz
## 5000
## 4000
## TLVChanWidth: Channel Width
## 20
## TLVChanNum : Channel Number
## TLVPwr[] : ModulationGroup
## 0: CCK (1,2,5.5,11 Mbps)
## 1: OFDM (6,9,12,18 Mbps)
## 2: OFDM (24,36 Mbps)
## 3: OFDM (48,54 Mbps)
## 4: HT20 (0,1,2)
## 5: HT20 (3,4)
## 6: HT20 (5,6,7)
## 7: HT40 (0,1,2)
## 8: HT40 (3,4)
## 9: HT40 (5,6,7)
## 10: VHT_QAM256 (MCS8)
## 11: VHT_40_QAM256 (MCS8,9)
## 12: VHT_80_PSK (MCS0,1,2)
## 13: VHT_80_QAM16 (MCS3,4)
## 14: VHT_80_QAM64 (MCS5,6,7)
## 15: VHT_80_QAM256 (MCS8,9)
## Power Limit in dBm
## 

And here is the configuration for channel 36:

## 5G subband1 Tx power limit CFG
txpwrlimit_5g_cfg_set_sub0={
CmdCode=0x00fb # do NOT change this line
Action:2=1 # 1 - SET
SubBand:2=0 # do NOT use this member in set cmd

ChanTRPC.TlvType:2=0x0189
ChanTRPC.TlvLength:2={
TLVStartFreq:2=5000
TLVChanWidth:1=20
TLVChanNum:1=36
TLVPwr:30='0,17,1,15,2,15,3,11,4,15,5,15,6,11,7,15,8,15,9,11,10,11,11,11,12,13,13,13,14,10,15,10'
}

Shouldn't the last line here be TLVPwr:32='...' since there are 32 values ?

Thanks and have a nice day.

Regards,

hbabar

0 Kudos