WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2015-Jan-03 19:59:02

Badger
Member
Registered: 2015-Jan-03
Posts: 1

Disable AGC in 802.11 Reference Design

We are working on 802.11 Reference Design (Version 1.1) for AP Application, and we want to disable AGC.

I found two places in wlan_phy_util.c (http://warpproject.org/trac/browser/Ref … l.c?desc=1) should be modified. One is Line 426, and another is Line 476. Also, we keep BB and RF gain are the same in Line 433&434 and Line 483&484. But When we use   log_capture_continuous.py    to get the data, it seems at least BB gain still changes over time when viewed using ofdm_chan_est_viewer.m. How can we total disable AGC.

Thanks in advance!

Offline

 

#2 2015-Jan-04 02:53:58

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: Disable AGC in 802.11 Reference Design

Changing those two "#if 0" to "#if 1" should disconnect the AGC core from the MAX2829 Rx gain settings. In this mode AGC core will still run and will select gains, but these gain selections will not affect the MAX2829. The reference code will still read the (unused) AGC gain selections per reception and log these selections with the packet metadata.

Offline

 

#3 2018-Jul-20 11:47:41

lizhuqi
Member
Registered: 2017-Oct-17
Posts: 14

Re: Disable AGC in 802.11 Reference Design

Hi, I also want to disable AGC for my application.

But I found the code in those lines has been deleted. So I am wondering what I should do to disable AGC?

In addition, I have two questions:

1. Is there any way to set constant BB gain and RF gain to the value I want??
2. What should I do if I want to add a command to set BB gain and RF gain with python code?

Thanks!!

Offline

 

#4 2018-Jul-20 11:48:46

lizhuqi
Member
Registered: 2017-Oct-17
Posts: 14

Re: Disable AGC in 802.11 Reference Design

Currently, I am using 802.11 reference design V1.7.7 on warp v3

Offline

 

#5 2018-Jul-20 12:13:30

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: Disable AGC in 802.11 Reference Design

You can disable AGC by modifying w3_low.c - change that "#if 0" to "#if 1" to disable AGC, then modify the arguments to the "setRadioParam()" calls to select your RF and baseband gains.

2. What should I do if I want to add a command to set BB gain and RF gain with python code?

This is not implemented by default; you will need to implement this command in the C code. The easiest method is to define a new LOW_PARAM value, then modify the wlan_platform_low_param_handler() function to implement your custom LOW_PARAM processing. After modifying the C you can use the existing Python "n.set_low_param(YOUR_PARAM_ID, val)" method to set the parameter from Python.

Offline

 

#6 2018-Jul-20 13:47:17

lizhuqi
Member
Registered: 2017-Oct-17
Posts: 14

Re: Disable AGC in 802.11 Reference Design

Thank you for the answer!!

I am also wondering how can I re-compile the project into .bin file after making these changes.

Offline

 

#7 2018-Jul-20 14:01:48

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: Disable AGC in 802.11 Reference Design

You can convert the download.bit file created by the SDK during the "Program FPGA" process to create a bootable .bin file. Refer to the SD Config howto for details.

Offline

 

#8 2018-Aug-27 03:05:54

vutran
Member
Registered: 2017-Jul-01
Posts: 52

Re: Disable AGC in 802.11 Reference Design

Hi, I follow this post and I can disable AGC.
However, if I want to switch back to AGC, the following 2 lines are enough?

Code:

	radio_controller_setCtrlSource(RC_BASEADDR, RC_ALL_RF, RC_REG0_RXHP_CTRLSRC, RC_CTRLSRC_HW);
	radio_controller_setRxGainSource(RC_BASEADDR, RC_ALL_RF, RC_GAINSRC_HW);

Offline

 

#9 2018-Aug-27 08:57:36

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: Disable AGC in 802.11 Reference Design

However, if I want to switch back to AGC, the following 2 lines are enough?

Yes, I believe so - those lines will configure the radio to use the AGC core's RXHP and Rx Gain outputs.

Offline

 

Board footer