diff --git a/lib/src/radio/radio.cc b/lib/src/radio/radio.cc index fcd915ff7..213fd1e4b 100644 --- a/lib/src/radio/radio.cc +++ b/lib/src/radio/radio.cc @@ -181,7 +181,7 @@ int radio::init(const rf_args_t& args, phy_interface_radio* phy_) // Set individual gains for (uint32_t i = 0; i < args.nof_carriers; i++) { if (args.tx_gain_ch[i] > 0) { - for (uint32_t j = 0; j < nof_antennas; i++) { + for (uint32_t j = 0; j < nof_antennas; j++) { uint32_t phys_antenna_idx = i * nof_antennas + j; // From channel number deduce RF device index and channel diff --git a/srsenb/src/main.cc b/srsenb/src/main.cc index 2d03d9045..39b3b7775 100644 --- a/srsenb/src/main.cc +++ b/srsenb/src/main.cc @@ -90,6 +90,11 @@ void parse_args(all_args_t* args, int argc, char* argv[]) ("rf.srate", bpo::value(&args->rf.srate_hz)->default_value(0.0), "Force Tx and Rx sampling rate in Hz") ("rf.rx_gain", bpo::value(&args->rf.rx_gain)->default_value(50), "Front-end receiver gain") ("rf.tx_gain", bpo::value(&args->rf.tx_gain)->default_value(70), "Front-end transmitter gain") + ("rf.tx_gain[0]", bpo::value(&args->rf.tx_gain_ch[0])->default_value(-1), "Front-end transmitter gain CH0") + ("rf.tx_gain[1]", bpo::value(&args->rf.tx_gain_ch[1])->default_value(-1), "Front-end transmitter gain CH1") + ("rf.tx_gain[2]", bpo::value(&args->rf.tx_gain_ch[2])->default_value(-1), "Front-end transmitter gain CH2") + ("rf.tx_gain[3]", bpo::value(&args->rf.tx_gain_ch[3])->default_value(-1), "Front-end transmitter gain CH3") + ("rf.tx_gain[4]", bpo::value(&args->rf.tx_gain_ch[4])->default_value(-1), "Front-end transmitter gain CH4") ("rf.dl_freq", bpo::value(&args->rf.dl_freq)->default_value(-1), "Downlink Frequency (if positive overrides EARFCN)") ("rf.ul_freq", bpo::value(&args->rf.ul_freq)->default_value(-1), "Uplink Frequency (if positive overrides EARFCN)")