open-sdr / openwifi

open-source IEEE 802.11 WiFi baseband FPGA (chip) design: driver, software
GNU Affero General Public License v3.0
3.78k stars 643 forks source link

Can I change Txpower by set “AD9361_RADIO_ON_TX_ATT” in different value? #125

Closed CaptainiFalcon closed 2 years ago

CaptainiFalcon commented 2 years ago

Can I change Txpower by set “AD9361_RADIO_ON_TX_ATT(which define in sdr.h)” in different value? There is "#define AD9361_RADIO_ON_TX_ATT 000 //please align with rf_init.sh" in sdr.h. If I change it to “#define AD9361_RADIO_ON_TX_ATT 3000 // AD9361_RADIO_ON_TX_ATT 3000 means 3dB, 0 means 0dB” Does it means the txpower is 2 times of origin txpower? Thanks very much.

It is very risky connecting tx to rx. It might damage your rx. You need a attenuator in between. Or lower the tx power.

The rf_init.sh only set the initial attenuation. The real-time attenuation is controlled in driver sdr.c. Please search set_tx_att in sdr.c. You will see how we do tx power control by Analog devices API.

Originally posted by @JiaoXianjun in https://github.com/open-sdr/openwifi/issues/57#issuecomment-785682102

CaptainiFalcon commented 2 years ago

This issue is similar with issue#116(which I see after I ask the issue#125),^____^

JiaoXianjun commented 2 years ago

define AD9361_RADIO_ON_TX_ATT 3000

define AD9361_RADIO_ON_TX_ATT 3000

will give you 3dB attenuation on TX. In other words, your TX power will be half as the original.

JiaoXianjun commented 2 years ago

Now we have more easier way to configure the Tx ATT: https://github.com/open-sdr/openwifi/blob/master/doc/app_notes/frequent_trick.md#Tx-power-config