|
| sdr = None |
| Global Parameters #. More...
|
|
| rxStream = None |
|
| recorder = None |
|
int | FIG_LEN = 16384 |
|
int | Rate = 5e6 |
|
int | fft_size = 2**12 |
|
int | numBufferSamps = 1000 |
|
| rssiPwrBuffer = collections.deque(maxlen=numBufferSamps) |
|
| timePwrBuffer = collections.deque(maxlen=numBufferSamps) |
|
| freqPwrBuffer = collections.deque(maxlen=numBufferSamps) |
|
| noisPwrBuffer = collections.deque(maxlen=numBufferSamps) |
|
| rssiPwrBuffer_fpga = collections.deque(maxlen=numBufferSamps) |
|
int | frameCounter = 0 |
|
int | num_samps_circ_buff = 10 |
|
| rssi_circ_buff = np.zeros(num_samps_circ_buff) |
|
| pwr_circ_buff = np.zeros(num_samps_circ_buff) |
|
int | logLevel = 3 |
|
| filename |
|
| level |
|
| format |
|
| fig = plt.figure(figsize=(20, 8), dpi=120) |
| Create Plots #. More...
|
|
| hspace |
|
| top |
|
| ax1 = fig.add_subplot(6, 1, 1) |
|
| title = ax1.text(0.5, 1, '|', ha="center") |
|
| label |
|
| animated |
|
| fontsize |
|
| ax2 = fig.add_subplot(6, 1, 2) |
|
| ax3 = fig.add_subplot(6, 1, 3) |
|
| ax4 = fig.add_subplot(6, 1, 4) |
|
| freqScale = np.arange(-Rate / 2, Rate / 2, Rate / fft_size) |
|
| ax5 = fig.add_subplot(6, 1, 5) |
|
| True |
|
| linestyle |
|
| ax6 = fig.add_subplot(6, 1, 6) |
|
SISO_RX.py
Simple receiver. Receive signal and plot it continuously. Signal can be
recorded and stored in HDF5 format. Alternatively, RX samples can be
recorded into a binary file using the "write_to_file" function.
Run both the SISO_TX.py script and this (SISO_RX.py) script
at the same time.
Multiple modes are supported:
- BASIC: Receives and plots signal without recording it
- REC: Receives and stores RX signal into file
- REPLAY: Read back existing file and report RSSI
AGC:
To enable AGC, set the AGCen flag to 1. The AGC runs in the FPGA fabric.
If enabled, LMS7 gains (LNA, TIA, PGA) start at their maximum values and
get adjusted once AGC is triggered.
To trigger AGC, first, both the AGC and packet detector need to be enabled via
the following two commands:
sdr.writeRegister("IRIS30", FPGA_IRIS030_WR_PKT_DET_ENABLE, 1)
sdr.writeRegister("IRIS30", FPGA_IRIS030_WR_AGC_ENABLE_FLAG, 1)
Second, we need a way to let the packet detector start looking at the
incoming samples in order to determine whether a gain adjustment is needed
To do so, we need to use the following commands:
sdr.writeRegister("IRIS30", FPGA_IRIS030_WR_PKT_DET_NEW_FRAME, 1)
Currently, AGC only supports the CBRS RF frontend. It cannot be used
with the Iris Dev Board or UHF board
NOTE ON GAINS:
Gain settings will vary depending on RF frontend board being used
If using CBRS:
rxgain: at 2.5GHz [3:1:105], at 3.6GHz [3:1:102]
If using only Dev Board:
rxgain: at both frequency bands [0:1:30]
Usage example: python3 SISO_RX.py --serial="RF3C000034" --rxMode="REC" --AGCen=0
---------------------------------------------------------------------
Copyright © 2018-2019. Rice University.
RENEW OPEN SOURCE LICENSE: http://renew-wireless.org/license
---------------------------------------------------------------------
LOGGER #
SOAPY_SDR_FATAL = 1, //!< A fatal error. The application will most likely terminate. This is the highest priority. SOAPY_SDR_CRITICAL = 2, //!< A critical error. The application might not be able to continue running successfully. SOAPY_SDR_ERROR = 3, //!< Error.An operation didn't complete successfully, but application as a whole not affected. SOAPY_SDR_WARNING = 4, //!< A warning. An operation completed with an unexpected result. SOAPY_SDR_NOTICE = 5, //!< A notice, which is an information with just a higher priority. SOAPY_SDR_INFO = 6, //!< An informational message, usually denoting the successful completion of an operation. SOAPY_SDR_DEBUG = 7, //!< A debugging message. SOAPY_SDR_TRACE = 8, //!< A tracing message. This is the lowest priority. SOAPY_SDR_SSI = 9, //!< Streaming status indicators such as "U" (underflow) and "O" (overflow).