srsue, amarisoft/srsENB: Support setting rx/tx_gain attributes

Change-Id: I4228ba8746a54db4c17443718c01069d431361b9
This commit is contained in:
Pau Espin 2020-04-20 15:14:51 +02:00
parent 491f77cd0f
commit a6d6304afc
7 changed files with 24 additions and 8 deletions

View File

@ -209,7 +209,10 @@ class AmarisoftENB(enb.eNodeB):
# rf driver is shared between amarisoft enb and ue, so it has a
# different cfg namespace 'trx'. Copy needed values over there:
config.overlay(values, dict(trx=dict(rf_dev_type=values['enb'].get('rf_dev_type', None),
rf_dev_args=values['enb'].get('rf_dev_args', None))))
rf_dev_args=values['enb'].get('rf_dev_args', None),
rx_gain=values['enb'].get('rx_gain', None),
tx_gain=values['enb'].get('tx_gain', None),
)))
self.gen_conf = values

View File

@ -274,7 +274,10 @@ class AmarisoftUE(MS):
# rf driver is shared between amarisoft enb and ue, so it has a
# different cfg namespace 'trx'. Copy needed values over there:
config.overlay(values, dict(trx=dict(rf_dev_type=values['ue'].get('rf_dev_type', None),
rf_dev_args=values['ue'].get('rf_dev_args', None))))
rf_dev_args=values['ue'].get('rf_dev_args', None),
rx_gain=values['ue'].get('rx_gain', None),
tx_gain=values['ue'].get('tx_gain', None),
)))
self.gen_conf_file(self.config_file, AmarisoftUE.CFGFILE, values)
self.gen_conf_file(self.config_rf_file, AmarisoftUE.CFGFILE_RF, values)

View File

@ -92,6 +92,8 @@ RESOURCES_SCHEMA = {
'enb[].id': schema.UINT,
'enb[].num_prb': schema.UINT,
'enb[].transmission_mode': schema.LTE_TRANSMISSION_MODE,
'enb[].tx_gain': schema.UINT,
'enb[].rx_gain': schema.UINT,
'enb[].rf_dev_type': schema.STR,
'enb[].rf_dev_args': schema.STR,
'enb[].additional_args': schema.STR,
@ -134,6 +136,8 @@ RESOURCES_SCHEMA = {
'modem[].additional_args': schema.STR,
'modem[].airplane_t_on_ms': schema.INT,
'modem[].airplane_t_off_ms': schema.INT,
'modem[].tx_gain': schema.UINT,
'modem[].rx_gain': schema.UINT,
'osmocon_phone[].serial_device': schema.STR,
}

View File

@ -10,8 +10,8 @@ rf_driver: {
% endif
},
tx_gain: 89.0, /* TX gain (in dB) B2x0: 0 to 89.8 dB */
rx_gain: 60.0, /* RX gain (in dB) B2x0: 0 to 73 dB */
tx_gain: ${trx.tx_gain}, /* TX gain (in dB) B2x0: 0 to 89.8 dB */
rx_gain: ${trx.rx_gain}, /* RX gain (in dB) B2x0: 0 to 73 dB */
% if trx.rf_dev_type == 'zmq':
tx_time_offset: 0,
% else:

View File

@ -64,8 +64,8 @@ drb_config = ${enb.drb_filename}
# Default "auto". B210 USRP: 400 us, bladeRF: 0 us.
#####################################################################
[rf]
tx_gain = 80
rx_gain = 40
tx_gain = ${enb.tx_gain}
rx_gain = ${enb.rx_gain}
device_name = ${enb.rf_dev_type}

View File

@ -37,8 +37,8 @@ dl_earfcn = 2850,3050
dl_earfcn = 2850
% endif
freq_offset = 0
tx_gain = 80
#rx_gain = 40
tx_gain = ${ue.tx_gain}
rx_gain = ${ue.rx_gain}
#nof_radios = 1
nof_antennas = ${ue.num_antennas}

View File

@ -135,16 +135,22 @@ enb:
srsenb:
num_prb: 100
enable_pcap: false
tx_gain: 80
rx_gain: 40
amarisoftenb:
num_prb: 100
enable_pcap: false
tx_gain: 89
rx_gain: 60
srsue:
enable_pcap: false
airplane_t_on_ms: -1
airplane_t_off_ms: -1
num_carriers: 1
tx_gain: 80
rx_gain: 40
iperf3cli:
time: 60