diff --git a/component/srslte/buildout.cfg b/component/srslte/buildout.cfg new file mode 100644 index 0000000000000000000000000000000000000000..e07c902c0d32720561ebffee6940242f3558e5c4 --- /dev/null +++ b/component/srslte/buildout.cfg @@ -0,0 +1,46 @@ +[buildout] +extends = + ../cmake/buildout.cfg + ../mbedtls/buildout.cfg + ../pkgconfig/buildout.cfg + ../lksctp-tools/buildout.cfg + ../libconfig/buildout.cfg + ../boost-lib/buildout.cfg + ../fftw3/buildout.cfg + +parts = + srsLTE + +[srsLTE] +recipe = slapos.recipe.cmmi +url = https://github.com/srsLTE/srsLTE/archive/release_18_09.zip +md5sum = d9007ff9bd03ba67c6ed8acfd9bf2a7a +pre-configure = + mkdir -p build +configure-command = cd build && ${cmake:location}/bin/cmake ../ + +make-binary = +make-targets= cd build && + make DESTDIR=@@LOCATION@@ -j1 install + + +configure-options = + -DCMAKE_C_FLAGS="${:CMAKE_CFLAGS}" + -DCMAKE_CXX_FLAGS="${:CMAKE_CFLAGS}" + -DCMAKE_INSTALL_RPATH=${:CMAKE_LIBRARY_PATH} + -DCMAKE_INCLUDE_PATH=${mbedtls:location}/include + -DCMAKE_LIBRARY_PATH=${mbedtls:location}/lib + +CMAKE_CFLAGS = -I${bzip2:location}/include -I${fftw3:location}/include -I${mbedtls:location}/include -I${lksctp-tools:location}/include -I${libconfig:location}/include -I${boost-lib:location}/include +CMAKE_LIBRARY_PATH = ${bzip2:location}/lib:${mbedtls:location}/lib:${lksctp-tools:location}/lib:${libconfig:location}/lib:${boost-lib:location}/lib:${fftw3:location}/lib + +environment = + CMAKE_INSTALL_PREFIX=${buildout:directory}/bin + CMAKE_PROGRAM_PATH=${cmake:location}/bin + CMAKE_INCLUDE_PATH=${bzip2:location}/include:${mbedtls:location}/include:${lksctp-tools:location}/include:${libconfig:location}/include:${boost-lib:location}/include:${fftw3:location}/include + CMAKE_LIBRARY_PATH=${:CMAKE_LIBRARY_PATH} + CPPFLAGS=${:CMAKE_CFLAGS} + LDFLAGS=-L${bzip2:location}/lib -L${mbedtls:location}/lib -L${lksctp-tools:location}/lib -L${libconfig:location}/lib -L${boost-lib:location}/lib -L${fftw3:location}/lib + PATH=${cmake:location}/bin:${pkgconfig:location}/bin:%(PATH)s + + diff --git a/software/srslte/buildout.hash.cfg b/software/srslte/buildout.hash.cfg new file mode 100644 index 0000000000000000000000000000000000000000..f668799cfbfd4689c147d53ebfce853ad505a5f8 --- /dev/null +++ b/software/srslte/buildout.hash.cfg @@ -0,0 +1,55 @@ +# THIS IS NOT A BUILDOUT FILE, despite purposedly using a compatible syntax. +# The only allowed lines here are (regexes): +# - "^#" comments, copied verbatim +# - "^[" section beginings, copied verbatim +# - lines containing an "=" sign which must fit in the following categorie. +# - "^\s*filename\s*=\s*path\s*$" where "path" is relative to this file +# Copied verbatim. +# - "^\s*hashtype\s*=.*" where "hashtype" is one of the values supported +# by the re-generation script. +# Re-generated. +# - other lines are copied verbatim +# Substitution (${...:...}), extension ([buildout] extends = ...) and +# section inheritance (< = ...) are NOT supported (but you should really +# not need these here). +[template] +filename = instance.cfg +md5sum = 79d32243ed4c09d5deef1bff89899064 + +[template-srslte] +filename = instance-srslte.cfg +md5sum = 6b1111d64531d847f963770ed00e404a + + +[config-drb] +filename = config/drb.conf +md5sum = 6c7329c6f38a37fe5031a3d660c70af7 + +[config-enb] +filename = config/enb.conf +md5sum = a52eb159b4282468c2c3e4c12b8a3182 + +[config-epc] +filename = config/epc.conf +md5sum = 56f283bd0721edbf617ca4e99156e710 + +[config-mbms] +filename = config/mbms.conf +md5sum = 10af1d48b9ef6451817b8744e529ed66 + +[config-rr] +filename = config/rr.conf +md5sum = dc2f73c6a3c46356fde971f3d64b2900 + +[config-sib] +filename = config/sib.conf +md5sum = 7b3925879cfc839458fe9fa598d24042 + +[config-ue] +filename = config/ue.conf +md5sum = 869cca5a1c87a9766d0650f4ef374dc1 + +[config-user_db] +filename = config/user_db.csv +md5sum = e37cd54eb08de3202cc0250437a2f181 + diff --git a/software/srslte/config/drb.conf b/software/srslte/config/drb.conf new file mode 100644 index 0000000000000000000000000000000000000000..32b6e937668d0d48a9f6f5255b9911087c553ee7 --- /dev/null +++ b/software/srslte/config/drb.conf @@ -0,0 +1,54 @@ + +// All times are in ms. Use -1 for infinity, where available + +qci_config = ( + +{ + qci=7; + pdcp_config = { + discard_timer = 100; + pdcp_sn_size = 12; + } + rlc_config = { + ul_um = { + sn_field_length = 10; + }; + dl_um = { + sn_field_length = 10; + t_reordering = 45; + }; + }; + logical_channel_config = { + priority = 13; + prioritized_bit_rate = -1; + bucket_size_duration = 100; + log_chan_group = 2; + }; +}, +{ + qci=9; + pdcp_config = { + discard_timer = -1; + status_report_required = true; + } + rlc_config = { + ul_am = { + t_poll_retx = 120; + poll_pdu = 64; + poll_byte = 750; + max_retx_thresh = 16; + }; + dl_am = { + t_reordering = 50; + t_status_prohibit = 50; + }; + }; + logical_channel_config = { + priority = 11; + prioritized_bit_rate = -1; + bucket_size_duration = 100; + log_chan_group = 3; + }; +} + +); diff --git a/software/srslte/config/enb.conf b/software/srslte/config/enb.conf new file mode 100644 index 0000000000000000000000000000000000000000..472a61e330042b14686c8f0f209112086e47779a --- /dev/null +++ b/software/srslte/config/enb.conf @@ -0,0 +1,168 @@ +##################################################################### +# srsENB configuration file +##################################################################### + +##################################################################### +# eNB configuration +# +# enb_id: 20-bit eNB identifier. +# cell_id: 8-bit cell identifier. +# tac: 16-bit Tracking Area Code. +# mcc: Mobile Country Code +# mnc: Mobile Network Code +# mme_addr: IP address of MME for S1 connnection +# gtp_bind_addr: Local IP address to bind for GTP connection +# s1c_bind_addr: Local IP address to bind for S1AP connection +# n_prb: Number of Physical Resource Blocks (6,15,25,50,75,100) +# tm: Transmission mode 1-4 (TM1 default) +# nof_ports: Number of Tx ports (1 port default, set to 2 for TM2/3/4) +# +##################################################################### +[enb] +enb_id = 0x19B +cell_id = 0x01 +phy_cell_id = 1 +tac = 0x0007 +mcc = 001 +mnc = 01 +mme_addr = 127.0.1.100 +gtp_bind_addr = 127.0.1.1 +s1c_bind_addr = 127.0.1.1 +n_prb = 50 +#tm = 4 +#nof_ports = 2 + +##################################################################### +# eNB configuration files +# +# sib_config: SIB1, SIB2 and SIB3 configuration file +# note: when enabling mbms, use the sib.conf.mbsfn configuration file which includes SIB13 +# rr_config: Radio Resources configuration file +# drb_config: DRB configuration file +##################################################################### +[enb_files] +sib_config = sib.conf +rr_config = rr.conf +drb_config = drb.conf + +##################################################################### +# RF configuration +# +# dl_earfcn: EARFCN code for DL +# tx_gain: Transmit gain (dB). +# rx_gain: Optional receive gain (dB). If disabled, AGC if enabled +# +# Optional parameters: +# dl_freq: Override DL frequency corresponding to dl_earfcn +# ul_freq: Override UL frequency corresponding to dl_earfcn (must be set if dl_freq is set) +# device_name: Device driver family. Supported options: "auto" (uses first found), "UHD" or "bladeRF" +# device_args: Arguments for the device driver. Options are "auto" or any string. +# Default for UHD: "recv_frame_size=9232,send_frame_size=9232" +# Default for bladeRF: "" +# #time_adv_nsamples: Transmission time advance (in number of samples) to compensate for RF delay +# from antenna to timestamp insertion. +# Default "auto". B210 USRP: 100 samples, bladeRF: 27. +# burst_preamble_us: Preamble length to transmit before start of burst. +# Default "auto". B210 USRP: 400 us, bladeRF: 0 us. +##################################################################### +[rf] +dl_earfcn = 2550 +tx_gain = 56 +rx_gain = 40 + +device_name = soapy +device_args = rxant=LNAL,txant=BAND1 +time_adv_nsamples = 70 +burst_preamble_us = 0 + +##################################################################### +# MAC-layer packet capture configuration +# +# Packets are captured to file in the compact format decoded by +# the Wireshark mac-lte-framed dissector and with DLT 147. +# To use the dissector, edit the preferences for DLT_USER to +# add an entry with DLT=147, Payload Protocol=mac-lte-framed. +# For more information see: https://wiki.wireshark.org/MAC-LTE +# +# enable: Enable MAC layer packet captures (true/false) +# filename: File path to use for packet captures +##################################################################### +[pcap] +enable = true +filename = /tmp/enb.pcap + +##################################################################### +# Log configuration +# +# Log levels can be set for individual layers. "all_level" sets log +# level for all layers unless otherwise configured. +# Format: e.g. phy_level = info +# +# In the same way, packet hex dumps can be limited for each level. +# "all_hex_limit" sets the hex limit for all layers unless otherwise +# configured. +# Format: e.g. phy_hex_limit = 32 +# +# Logging layers: phy, mac, rlc, pdcp, rrc, nas, gtpu, usim, all +# Logging levels: debug, info, warning, error, none +# +# filename: File path to use for log output. Can be set to stdout +# to print logs to standard output +# file_max_size: Maximum file size (in kilobytes). When passed, multiple files are created. +# If set to negative, a single log file will be created. +##################################################################### +[log] +all_level = warning +all_hex_limit = 32 +filename = /tmp/enb.log +file_max_size = -1 + +[gui] +enable = false + +##################################################################### +# Scheduler configuration options +# +# pdsch_mcs: Optional fixed PDSCH MCS (ignores reported CQIs if specified) +# pdsch_max_mcs: Optional PDSCH MCS limit +# pusch_mcs: Optional fixed PUSCH MCS (ignores reported CQIs if specified) +# pusch_max_mcs: Optional PUSCH MCS limit +# #nof_ctrl_symbols: Number of control symbols +# +##################################################################### +[scheduler] +#pdsch_mcs = -1 +#pdsch_max_mcs = -1 +#pusch_mcs = -1 +pusch_max_mcs = 16 +nof_ctrl_symbols = 3 + +##################################################################### +# Expert configuration options +# +# pusch_max_its: Maximum number of turbo decoder iterations (Default 4) +# pusch_8bit_decoder: Use 8-bit for LLR representation and turbo decoder trellis computation (Experimental) +# nof_phy_threads: Selects the number of PHY threads (maximum 4, minimum 1, default 2) +# metrics_period_secs: Sets the period at which metrics are requested from the UE. +# pregenerate_signals: Pregenerate uplink signals after attach. Improves CPU performance. +# tx_amplitude: Transmit amplitude factor (set 0-1 to reduce PAPR) +# link_failure_nof_err: Number of PUSCH failures after which a radio-link failure is triggered. +# a link failure is when SNR<0 and CRC=KO +# max_prach_offset_us: Maximum allowed RACH offset (in us) +# enable_mbsfn: Enable MBMS transmission in the eNB +# m1u_multiaddr: Multicast addres the M1-U socket will register to +# m1u_if_addr: Address of the inteferface the M1-U interface will listen for multicast packets. +# +##################################################################### +[expert] +pusch_max_its = 6 # These are half iterations +#pusch_8bit_decoder = false +#nof_phy_threads = 2 +#pregenerate_signals = false +#tx_amplitude = 0.6 +#link_failure_nof_err = 50 +rrc_inactivity_timer = 60000 +#max_prach_offset_us = 30 +#enable_mbsfn = false +#m1u_multiaddr = 239.255.0.1 +#m1u_if_addr = 127.0.1.201 diff --git a/software/srslte/config/epc.conf b/software/srslte/config/epc.conf new file mode 100644 index 0000000000000000000000000000000000000000..940c8c11e18a7c0388c1788715badaddb29a1cbf --- /dev/null +++ b/software/srslte/config/epc.conf @@ -0,0 +1,96 @@ +##################################################################### +# srsEPC configuration file +##################################################################### + +##################################################################### +# MME configuration +# +# mme_code: 8-bit MME code identifies the MME within a group. +# mme_group: 16-bit MME group identifier. +# tac: 16-bit Tracking Area Code. +# mcc: Mobile Country Code +# mnc: Mobile Network Code +# apn: Set Access Point Name (APN) +# mme_bind_addr: IP bind addr to listen for eNB S1-MME connnections +# dns_addr: DNS server address for the UEs +# +##################################################################### +[mme] +mme_code = 0x1a +mme_group = 0x0001 +tac = 0x0007 +mcc = 001 +mnc = 01 +mme_bind_addr = 127.0.1.100 +apn = default +dns_addr = 8.8.8.8 + +##################################################################### +# HSS configuration +# +# algo: Authentication algorithm (xor/milenage) +# db_file: Location of .csv file that stores UEs information. +# +##################################################################### +[hss] +auth_algo = xor +db_file = user_db.csv + + +##################################################################### +# SP-GW configuration +# +# gtpu_bind_addr: GTP-U bind address. +# sgi_if_addr: SGi TUN interface IP address. +# sgi_if_name: SGi TUN interface name. +# +##################################################################### + +[spgw] +gtpu_bind_addr = 127.0.1.100 +sgi_if_addr = 172.16.0.1 +sgi_if_name = srs_spgw_sgi + +#################################################################### +# PCAP configuration +# +# Packets are captured to file in the compact format decoded by +# the Wireshark s1ap dissector and with DLT 150. +# To use the dissector, edit the preferences for DLT_USER to +# add an entry with DLT=150, Payload Protocol=s1ap. +# +# enable: Enable or disable the PCAP. +# filename: File name where to save the PCAP. +# +#################################################################### +[pcap] +enable = false +filename = /tmp/epc.pcap + +#################################################################### +# Log configuration +# +# Log levels can be set for individual layers. "all_level" sets log +# level for all layers unless otherwise configured. +# Format: e.g. s1ap_level = info +# +# In the same way, packet hex dumps can be limited for each level. +# "all_hex_limit" sets the hex limit for all layers unless otherwise +# configured. +# Format: e.g. s1ap_hex_limit = 32 +# +# Logging layers: s1ap, gtpc, spgw, hss, all +# Logging levels: debug, info, warning, error, none +# +# filename: File path to use for log output. Can be set to stdout +# to print logs to standard output +##################################################################### +[log] +all_level = debug +all_hex_limit = 32 +filename = /tmp/epc.log + +#s1ap_level = debug +#gtpc_level = debug +#spgw_level = debug +#hss_level = debug diff --git a/software/srslte/config/mbms.conf b/software/srslte/config/mbms.conf new file mode 100644 index 0000000000000000000000000000000000000000..19993e1fa14de519c70197aa36050167dc445aee --- /dev/null +++ b/software/srslte/config/mbms.conf @@ -0,0 +1,47 @@ +##################################################################### +# srsMBMS configuration file +##################################################################### + +##################################################################### +# MBMS-GW configuration +# +# name: MBMS-GW name +# sgi_mb_if_name: SGi-mb TUN interface name +# sgi_mb_if_addr: SGi-mb interface IP address +# sgi_mb_if_mask: SGi-mb interface IP mask +# m1u_multi_addr: Multicast group for eNBs (FIXME this should be setup with M2/M3) +# m1u_multi_if: IP of local interface for multicast traffic +# m1u_multi_ttl: TTL for M1-U multicast traffic +# +##################################################################### +[mbms_gw] +name = srsmbmsgw01 +sgi_mb_if_name = sgi_mb +sgi_mb_if_addr = 172.16.0.254 +sgi_mb_if_mask = 255.255.255.255 +m1u_multi_addr = 239.255.0.1 +m1u_multi_if = 127.0.1.200 +m1u_multi_ttl = 1 + +#################################################################### +# Log configuration +# +# Log levels can be set for individual layers. "all_level" sets log +# level for all layers unless otherwise configured. +# Format: e.g. s1ap_level = info +# +# In the same way, packet hex dumps can be limited for each level. +# "all_hex_limit" sets the hex limit for all layers unless otherwise +# configured. +# Format: e.g. s1ap_hex_limit = 32 +# +# Logging layers: mbms_gw, all +# Logging levels: debug, info, warning, error, none +# +# filename: File path to use for log output. Can be set to stdout +# to print logs to standard output +##################################################################### +[log] +all_level = debug +all_hex_limit = 32 +filename = /tmp/mbms.log diff --git a/software/srslte/config/rr.conf b/software/srslte/config/rr.conf new file mode 100644 index 0000000000000000000000000000000000000000..e819cf4e4212dc32b369798130ad68b8bd4b1cbc --- /dev/null +++ b/software/srslte/config/rr.conf @@ -0,0 +1,50 @@ +mac_cnfg = +{ + phr_cnfg = + { + dl_pathloss_change = "3dB"; // Valid: 1, 3, 6 or INFINITY + periodic_phr_timer = 50; + prohibit_phr_timer = 0; + }; + ulsch_cnfg = + { + max_harq_tx = 4; + periodic_bsr_timer = 20; // in ms + retx_bsr_timer = 320; // in ms + }; + + time_alignment_timer = -1; // -1 is infinity +}; + +phy_cnfg = +{ + phich_cnfg = + { + duration = "Normal"; + resources = "1/6"; + }; + + pusch_cnfg_ded = + { + beta_offset_ack_idx = 6; + beta_offset_ri_idx = 6; + beta_offset_cqi_idx = 6; + }; + + // PUCCH-SR resources are scheduled on time-frequeny domain first, then multiplexed in the same resource. + sched_request_cnfg = + { + dsr_trans_max = 64; + period = 20; // in ms + subframe = [1]; // vector of subframe indices allowed for SR transmissions + nof_prb = 2; // number of PRBs on each extreme used for SR (total prb is twice this number) + }; + cqi_report_cnfg = + { + mode = "periodic"; + simultaneousAckCQI = true; + period = 40; // in ms + subframe = [0]; + nof_prb = 2; + }; +}; diff --git a/software/srslte/config/sib.conf b/software/srslte/config/sib.conf new file mode 100644 index 0000000000000000000000000000000000000000..80b2894f631eb2e445a63cd5f46408db9bf3fb9a --- /dev/null +++ b/software/srslte/config/sib.conf @@ -0,0 +1,116 @@ +sib1 = +{ + intra_freq_reselection = "Allowed"; + q_rx_lev_min = -130; + //p_max = 3; + cell_barred = "Not Barred" + si_window_length = 20; + sched_info = + ( + { + si_periodicity = 16; + si_mapping_info = []; // comma-separated array of SIB-indexes (from 3 to 13). + // Leave empty or commented to just scheduler sib2 + } + ); + system_info_value_tag = 0; +}; + +sib2 = +{ + rr_config_common_sib = + { + rach_cnfg = + { + num_ra_preambles = 52; + preamble_init_rx_target_pwr = -104; + pwr_ramping_step = 6; // in dB + preamble_trans_max = 10; + ra_resp_win_size = 10; // in ms + mac_con_res_timer = 64; // in ms + max_harq_msg3_tx = 4; + }; + bcch_cnfg = + { + modification_period_coeff = 16; // in ms + }; + pcch_cnfg = + { + default_paging_cycle = 32; // in rf + nB = "1"; + }; + prach_cnfg = + { + root_sequence_index = 128; + prach_cnfg_info = + { + high_speed_flag = false; + prach_config_index = 3; + prach_freq_offset = 2; + zero_correlation_zone_config = 5; + }; + }; + pdsch_cnfg = + { + p_b = 0; + rs_power = 0; + }; + pusch_cnfg = + { + n_sb = 1; + hopping_mode = "inter-subframe"; + pusch_hopping_offset = 2; + enable_64_qam = false; // 64QAM PUSCH is not currently enabled + ul_rs = + { + cyclic_shift = 0; + group_assignment_pusch = 0; + group_hopping_enabled = false; + sequence_hopping_enabled = false; + }; + }; + pucch_cnfg = + { + delta_pucch_shift = 2; + n_rb_cqi = 2; + n_cs_an = 0; + n1_pucch_an = 12; + }; + ul_pwr_ctrl = + { + p0_nominal_pusch = -85; + alpha = 0.7; + p0_nominal_pucch = -107; + delta_flist_pucch = + { + format_1 = 0; + format_1b = 3; + format_2 = 1; + format_2a = 2; + format_2b = 2; + }; + delta_preamble_msg3 = 8; + }; + ul_cp_length = "Normal"; + }; + + ue_timers_and_constants = + { + t300 = 2000; // in ms + t301 = 100; // in ms + t310 = 1000; // in ms + n310 = 1; + t311 = 1000; // in ms + n311 = 1; + }; + + freqInfo = + { + ul_carrier_freq_present = true; + ul_bw_present = true; + additional_spectrum_emission = 1; + }; + + time_alignment_timer = "INFINITY"; // use "sf500", "sf750", etc. +}; + diff --git a/software/srslte/config/ue.conf b/software/srslte/config/ue.conf new file mode 100644 index 0000000000000000000000000000000000000000..1209fe89d6791ac09de8af940e95ec946317f4a3 --- /dev/null +++ b/software/srslte/config/ue.conf @@ -0,0 +1,253 @@ +##################################################################### +# srsUE configuration file +##################################################################### +# RF configuration +# +# dl_earfcn: Downlink EARFCN code. +# freq_offset: Uplink and Downlink optional frequency offset (in Hz) +# tx_gain: Transmit gain (dB). +# rx_gain: Optional receive gain (dB). If disabled, AGC if enabled +# +# Optional parameters: +# dl_freq: Override DL frequency corresponding to dl_earfcn +# ul_freq: Override UL frequency corresponding to dl_earfcn +# nof_rx_ant: Number of RX antennas (Default 1, supported 1 or 2) +# device_name: Device driver family. Supported options: "auto" (uses first found), "UHD" or "bladeRF" +# device_args: Arguments for the device driver. Options are "auto" or any string. +# Default for UHD: "recv_frame_size=9232,send_frame_size=9232" +# Default for bladeRF: "" +# time_adv_nsamples: Transmission time advance (in number of samples) to compensate for RF delay +# from antenna to timestamp insertion. +# Default "auto". B210 USRP: 100 samples, bladeRF: 27. +# burst_preamble_us: Preamble length to transmit before start of burst. +# Default "auto". B210 USRP: 400 us, bladeRF: 0 us. +# continuous_tx: Transmit samples continuously to the radio or on bursts (auto/yes/no). +# Default is auto (yes for UHD, no for rest) +##################################################################### +[rf] +dl_earfcn = 3400 +freq_offset = 0 +tx_gain = 80 +#rx_gain = 40 + +#nof_rx_ant = 1 +#device_name = auto +#device_args = auto +#time_adv_nsamples = auto +#burst_preamble_us = auto +#continuous_tx = auto + + +##################################################################### +# MAC-layer packet capture configuration +# +# Packets are captured to file in the compact format decoded by +# the Wireshark mac-lte-framed dissector and with DLT 147. +# To use the dissector, edit the preferences for DLT_USER to +# add an entry with DLT=147, Payload Protocol=mac-lte-framed. +# For more information see: https://wiki.wireshark.org/MAC-LTE +# +# enable: Enable MAC layer packet captures (true/false) +# filename: File path to use for packet captures +##################################################################### +[pcap] +enable = false +filename = /tmp/ue.pcap +nas_enable = false +nas_filename = /tmp/nas.pcap + +##################################################################### +# Log configuration +# +# Log levels can be set for individual layers. "all_level" sets log +# level for all layers unless otherwise configured. +# Format: e.g. phy_level = info +# +# In the same way, packet hex dumps can be limited for each level. +# "all_hex_limit" sets the hex limit for all layers unless otherwise +# configured. +# Format: e.g. phy_hex_limit = 32 +# +# Logging layers: phy, mac, rlc, pdcp, rrc, nas, gw, usim, all +# Logging levels: debug, info, warning, error, none +# +# filename: File path to use for log output. Can be set to stdout +# to print logs to standard output +# file_max_size: Maximum file size (in kilobytes). When passed, multiple files are created. +# If set to negative, a single log file will be created. +##################################################################### +[log] +all_level = warning +phy_lib_level = none +all_hex_limit = 32 +filename = /tmp/ue.log +file_max_size = -1 + +##################################################################### +# USIM configuration +# +# mode: USIM mode (soft/pcsc) +# algo: Authentication algorithm (xor/milenage) +# op: 128-bit Operator Variant Algorithm Configuration Field (hex) +# k: 128-bit subscriber key (hex) +# imsi: 15 digit International Mobile Subscriber Identity +# imei: 15 digit International Mobile Station Equipment Identity +# pin: PIN in case real SIM card is used +# reader: Specify card reader by it's name as listed by 'pcsc_scan'. If empty, try all available readers. +##################################################################### +[usim] +mode = soft +algo = xor +opc = 63BFA50EE6523365FF14C1F45F88737D +k = 00112233445566778899aabbccddeeff +imsi = 001010123456789 +imei = 353490069873319 +#reader = +#pin = 1234 + +##################################################################### +# RRC configuration +# +# ue_category: Sets UE category (range 1-5). Default: 4 +# feature_group: Hex value of the featureGroupIndicators field in the +# UECapabilityInformation message. Default 0xe6041000 +##################################################################### +[rrc] +#ue_category = 4 +#feature_group = 0xe6041000 + +##################################################################### +# NAS configuration +# +# apn: Set Access Point Name (APN) +# user: Username for CHAP authentication +# pass: Password for CHAP authentication +# force_imsi_attach: Whether to always perform an IMSI attach +##################################################################### +[nas] +#apn = internetinternet +#user = srsuser +#pass = srspass +#force_imsi_attach = false + +[gui] +enable = false + +##################################################################### +# Expert configuration options +# +# ip_netmask: Netmask of the tun_srsue device. Default: 255.255.255.0 +# ip_devname: Nanme of the tun_srsue device. Default: tun_srsue +# rssi_sensor_enabled: Enable or disable RF frontend RSSI sensor. Required for RSRP metrics but +# can cause UHD instability for long-duration testing. Default true. +# rx_gain_offset: RX Gain offset to add to rx_gain to calibrate RSRP readings +# prach_gain: PRACH gain (dB). If defined, forces a gain for the tranmsission of PRACH only., +# Default is to use tx_gain in [rf] section. +# cqi_max: Upper bound on the maximum CQI to be reported. Default 15. +# cqi_fixed: Fixes the reported CQI to a constant value. Default disabled. +# snr_ema_coeff: Sets the SNR exponential moving average coefficient (Default 0.1) +# snr_estim_alg: Sets the noise estimation algorithm. (Default refs) +# Options: pss: use difference between received and known pss signal, +# refs: use difference between noise references and noiseless (after filtering) +# empty: use empty subcarriers in the boarder of pss/sss signal +# pdsch_max_its: Maximum number of turbo decoder iterations (Default 4) +# attach_enable_64qam: Enables PUSCH 64QAM modulation before attachment (Necessary for old +# Amarisoft LTE 100 eNodeB, disabled by default) +# nof_phy_threads: Selects the number of PHY threads (maximum 4, minimum 1, default 2) +# equalizer_mode: Selects equalizer mode. Valid modes are: "mmse", "zf" or any +# non-negative real number to indicate a regularized zf coefficient. +# Default is MMSE. +# time_correct_period: Period for sampling time offset correction. Default is 10 (ue_sync.c), +# good for long channels. For best performance at highest SNR reduce it to 1. +# sfo_correct_disable: Disables phase correction before channel estimation to compensate for +# sampling frequency offset. Default is enabled. +# sfo_ema: EMA coefficient to average sample offsets used to compute SFO +# sfo_correct_period: Period in ms to correct sample time to adjust for SFO +# sss_algorithm: Selects the SSS estimation algorithm. Can choose between +# {full, partial, diff}. +# estimator_fil_auto: The channel estimator smooths the channel estimate with an adaptative filter. +# estimator_fil_stddev: Sets the channel estimator smooth gaussian filter standard deviation. +# estimator_fil_order: Sets the channel estimator smooth gaussian filter order (even values perform better). +# The taps are [w, 1-2w, w] +# +# pregenerate_signals: Pregenerate uplink signals after attach. Improves CPU performance. +# +# average_subframe_enabled: Averages in the time domain the channel estimates within 1 subframe. +# Needs accurate CFO correction. +# +# sic_pss_enabled: Applies Successive Interference Cancellation to PSS signals when searching for neighbour cells. +# Must be disabled if cells have identical channel and timing, for instance if generated from +# the same source. +# +# metrics_csv_enable: Write UE metrics to CSV file. +# +# metrics_period_secs: Sets the period at which metrics are requested from the UE. +# +# metrics_csv_filename: File path to use for CSV metrics. +# +# cfo_integer_enabled: Enables integer CFO estimation and correction. This needs improvement +# and may lead to incorrect synchronization. Use with caution. +# cfo_correct_tol_hz: Tolerance (in Hz) for digial CFO compensation. Lower tolerance means that +# a new table will be generated more often. +# +# cfo_is_doppler: Assume detected CFO is doppler and correct the UL in the same direction. If disabled, the CFO is assumed +# to be caused by the local oscillator and the UL correction is in the opposite direction. Default assumes oscillator. +# cfo_pss_ema: CFO Exponential Moving Average coefficient for PSS estimation during TRACK. +# cfo_ref_ema: CFO Exponential Moving Average coefficient for RS estimation after PSS acquisition +# cfo_ref_mask: Bitmask for subframes on which to run RS estimation (set to 0 to disable, default sf=[1, 5]) +# cfo_loop_bw: CFO feedback loop bandwidth for samples from PSS or RS +# cfo_loop_pss_tol: Tolerance (in Hz) of the PSS estimation method. Below this value, PSS estimation does not feeds back the loop +# and RS estimations are used instead (when available) +# cfo_loop_ref_min: Tolerance (in Hz) of the RS estimation method. Below this value, RS estimation does not feeds back the loop +# cfo_loop_pss_timeout: After the PSS estimation is below cfo_loop_pss_tol for cfo_loop_pss_timeout times consecutively, +# RS adjustments are allowed. +# +# pdsch_csi_enabled: Stores the Channel State Information and uses it for weightening the softbits. It is only +# used in TM1. It is True by default. +# +# pdsch_8bit_decoder: Use 8-bit for LLR representation and turbo decoder trellis computation (Experimental) +# +##################################################################### +[expert] +#ip_netmask = 255.255.255.0 +#ip_devname = tun_srsue +#mbms_service = -1 +#rssi_sensor_enabled = false +#rx_gain_offset = 62 +#prach_gain = 30 +#cqi_max = 15 +#cqi_fixed = 10 +#snr_ema_coeff = 0.1 +#snr_estim_alg = refs +#pdsch_max_its = 8 # These are half iterations +#attach_enable_64qam = false +#nof_phy_threads = 2 +#equalizer_mode = mmse +#time_correct_period = 5 +#sfo_correct_disable = false +#sfo_ema = 0.1 +#sfo_correct_period = 10 +#sss_algorithm = full +#estimator_fil_auto = false +#estimator_fil_stddev = 1.0 +#estimator_fil_order = 4 +#average_subframe_enabled = true +#sic_pss_enabled = true +#pregenerate_signals = false +#metrics_csv_enable = false +#metrics_period_secs = 1 +#metrics_csv_filename = /tmp/ue_metrics.csv +#pdsch_csi_enabled = true +#pdsch_8bit_decoder = false + +# CFO related values +#cfo_is_doppler = false +#cfo_integer_enabled = false +#cfo_correct_tol_hz = 1.0 +#cfo_pss_ema = 0.05 +#cfo_ref_mask = 1023 +#cfo_loop_bw_pss = 0.05 +#cfo_loop_bw_ref = 0.01 +#cfo_loop_pss_tol = 400 +#cfo_loop_ref_min = 0 +#cfo_loop_pss_conv = 20 diff --git a/software/srslte/config/user_db.csv b/software/srslte/config/user_db.csv new file mode 100644 index 0000000000000000000000000000000000000000..6996816ce1de0294f9d6e7eb4fbb6e79c8cf05ea --- /dev/null +++ b/software/srslte/config/user_db.csv @@ -0,0 +1,35 @@ +# +# .csv to store UE's information in HSS +# Kept in the following format: "Name,IMSI,Key,OP_Type,OP,AMF,SQN,QCI" +# +# Name: Human readable name to help distinguish UE's. Ignored by the HSS +# IMSI: UE's IMSI value +# Key: UE's key, where other keys are derived from. Stored in hexadecimal +# OP_Type: Operator's code type, either OP or OPc +# OP/OPc: Operator Code/Cyphered Operator Code, stored in hexadecimal +# AMF: Authentication management field, stored in hexadecimal +# SQN: UE's Sequence number for freshness of the authentication +# QCI: QoS Class Identifier for the UE's default bearer. +# +# Note: Lines starting by '#' are ignored and will be overwritten +ue3,001010000001001,00112233445566778899aabbccddeeff,op,63bfa50ee6523365ff14c1f45f88737d,8002,000000001234,7 +ue4,001010000001002,00112233445566778899aabbccddeeff,op,63bfa50ee6523365ff14c1f45f88737d,8002,000000001234,7 +ue5,001010000001003,00112233445566778899aabbccddeeff,op,63bfa50ee6523365ff14c1f45f88737d,8002,000000001234,7 +ue6,001010000001004,00112233445566778899aabbccddeeff,op,63bfa50ee6523365ff14c1f45f88737d,8002,000000001234,7 +ue7,001010000001005,00112233445566778899aabbccddeeff,op,63bfa50ee6523365ff14c1f45f88737d,8002,000000001234,7 +ue8,001010000001006,00112233445566778899aabbccddeeff,op,63bfa50ee6523365ff14c1f45f88737d,8002,000000001234,7 +ue9,001010000001007,00112233445566778899aabbccddeeff,op,63bfa50ee6523365ff14c1f45f88737d,8002,000000001234,7 +ue10,001010000001008,00112233445566778899aabbccddeeff,op,63bfa50ee6523365ff14c1f45f88737d,8002,000000001234,7 +ue11,001010000001009,00112233445566778899aabbccddeeff,op,63bfa50ee6523365ff14c1f45f88737d,8002,000000001234,7 +ue12,001010000001010,00112233445566778899aabbccddeeff,op,63bfa50ee6523365ff14c1f45f88737d,8002,000000001234,7 +ue13,001010000001011,00112233445566778899aabbccddeeff,op,63bfa50ee6523365ff14c1f45f88737d,8002,000000001234,7 +ue14,001010000001012,00112233445566778899aabbccddeeff,op,63bfa50ee6523365ff14c1f45f88737d,8002,000000001234,7 +ue15,001010000001013,00112233445566778899aabbccddeeff,op,63bfa50ee6523365ff14c1f45f88737d,8002,000000001234,7 +ue16,001010000001014,00112233445566778899aabbccddeeff,op,63bfa50ee6523365ff14c1f45f88737d,8002,000000001234,7 +ue17,001010000001015,00112233445566778899aabbccddeeff,op,63bfa50ee6523365ff14c1f45f88737d,8002,000000001234,7 +ue18,001010000001016,00112233445566778899aabbccddeeff,op,63bfa50ee6523365ff14c1f45f88737d,8002,000000001234,7 +ue19,001010000001017,00112233445566778899aabbccddeeff,op,63bfa50ee6523365ff14c1f45f88737d,8002,000000001234,7 +ue20,001010000001018,00112233445566778899aabbccddeeff,op,63bfa50ee6523365ff14c1f45f88737d,8002,000000001234,7 +ue21,001010000001019,00112233445566778899aabbccddeeff,op,63bfa50ee6523365ff14c1f45f88737d,8002,000000001234,7 +ue2,001010123456780,00112233445566778899aabbccddeeff,opc,63bfa50ee6523365ff14c1f45f88737d,8000,000000001234,7 +ue1,001010123456789,00112233445566778899aabbccddeeff,opc,63bfa50ee6523365ff14c1f45f88737d,9001,00000000137e,7 diff --git a/software/srslte/instance-srslte.cfg b/software/srslte/instance-srslte.cfg new file mode 100644 index 0000000000000000000000000000000000000000..f290e2bc287bf32844f988252ae294846830e2ba --- /dev/null +++ b/software/srslte/instance-srslte.cfg @@ -0,0 +1,89 @@ +[buildout] + +extends = {{ monitor_template_output }} + +parts = + config-drb + config-enb + config-epc + config-mbms + config-rr + config-sib + config-ue + config-user_db + srsepc + srsenb + monitor-base + publish-connection-information + +eggs-directory = {{ eggs_directory }} +develop-eggs-directory = {{ develop_eggs_directory }} +offline = true + +[directory] +srsconfig = $${buildout:directory}/.srs + +[config-base] +recipe = slapos.recipe.template:jinja2 +mode = 0664 +extensions = jinja2.ext.do +context = + section directory directory + +[config-drb] +<= config-base +template = {{ config_drb_template }} +rendered = $${directory:srsconfig}/drb.conf + +[config-enb] +<= config-base +template = {{ config_enb_template }} +rendered = $${directory:srsconfig}/enb.conf + +[config-epc] +<= config-base +template = {{ config_epc_template }} +rendered = $${directory:srsconfig}/epc.conf + +[config-mbms] +<= config-base +template = {{ config_mbms_template }} +rendered = $${directory:srsconfig}/mbms.conf + +[config-rr] +<= config-base +template = {{ config_rr_template }} +rendered = $${directory:srsconfig}/rr.conf + +[config-sib] +<= config-base +template = {{ config_sib_template }} +rendered = $${directory:srsconfig}/sib.conf + +[config-ue] +<= config-base +template = {{ config_ue_template }} +rendered = $${directory:srsconfig}/ue.conf + +[config-user_db] +<= config-base +template = {{ config_user_db_template }} +rendered = $${directory:srsconfig}/user_db.csv + +[srsepc] +recipe = slapos.cookbook:wrapper +wrapper-path = $${directory:services}/$${:_buildout_section_name_} +pidfile = $${directory:run}/srsepc.pid +command-line = + /usr/bin/sudo {{ srsepc_bin }} + +[srsenb] +recipe = slapos.cookbook:wrapper +wrapper-path = $${directory:services}/$${:_buildout_section_name_} +pidfile = $${directory:run}/srsenb.pid +command-line = + /usr/bin/sudo {{ srsenb_bin }} + +[publish-connection-information] +recipe = slapos.cookbook:publish +monitor-setup-url = https://monitor.app.officejs.com/#page=settings_configurator&url=$${monitor-publish-parameters:monitor-url}&username=$${monitor-publish-parameters:monitor-user}&password=$${monitor-publish-parameters:monitor-password} diff --git a/software/srslte/instance.cfg b/software/srslte/instance.cfg new file mode 100644 index 0000000000000000000000000000000000000000..f383d0fb34ecd2af16148439e9a388e4b9e95eb1 --- /dev/null +++ b/software/srslte/instance.cfg @@ -0,0 +1,40 @@ +[buildout] +parts = + switch_softwaretype + +eggs-directory = ${buildout:eggs-directory} +develop-eggs-directory = ${buildout:develop-eggs-directory} + +[switch_softwaretype] +recipe = slapos.cookbook:softwaretype +default = $${instance-base-srslte:rendered} + +[instance-base-srslte] +recipe = slapos.recipe.template:jinja2 +template = ${template-srslte:output} +rendered = $${buildout:directory}/template-base-srslte.cfg +extensions = jinja2.ext.do +context = key develop_eggs_directory buildout:develop-eggs-directory + key eggs_directory buildout:eggs-directory + key slapparameter_dict slap-configuration:configuration + raw buildout_bin ${buildout:bin-directory} + raw monitor_template_output ${monitor-template:output} + raw config_drb_template ${config-drb:target} + raw config_enb_template ${config-enb:target} + raw config_epc_template ${config-epc:target} + raw config_mbms_template ${config-mbms:target} + raw config_rr_template ${config-rr:target} + raw config_sib_template ${config-sib:target} + raw config_ue_template ${config-ue:target} + raw config_user_db_template ${config-user_db:target} + raw srsenb_bin ${srsLTE:location}/usr/local/bin/srsenb + raw srsepc_bin ${srsLTE:location}/usr/local/bin/srsepc +mode = 0644 + +[slap-configuration] +recipe = slapos.cookbook:slapconfiguration.serialised +computer = $${slap-connection:computer-id} +partition = $${slap-connection:partition-id} +url = $${slap-connection:server-url} +key = $${slap-connection:key-file} +cert = $${slap-connection:cert-file} diff --git a/software/srslte/software.cfg b/software/srslte/software.cfg new file mode 100644 index 0000000000000000000000000000000000000000..d711c46818f04444dbb38b1ead38388eb68b68d9 --- /dev/null +++ b/software/srslte/software.cfg @@ -0,0 +1,77 @@ +[buildout] + +extends = + ../../component/srslte/buildout.cfg + ../../stack/slapos.cfg + ../../stack/monitor/buildout.cfg + buildout.hash.cfg + +parts = + slapos-cookbook + srsLTE + template + template-srslte + config-drb + config-enb + config-epc + config-mbms + config-rr + config-sib + config-ue + config-user_db + +[template] +recipe = slapos.recipe.template +url = ${:_profile_base_location_}/${:filename} +output = ${buildout:directory}/template.cfg + +[template-srslte] +recipe = slapos.recipe.template +url = ${:_profile_base_location_}/${:filename} +output = ${buildout:directory}/${:filename} + + +[config-drb] +recipe = slapos.recipe.build:download +url = ${:_profile_base_location_}/config/${:filename} +filename = drb.conf + +[config-enb] +recipe = slapos.recipe.build:download +url = ${:_profile_base_location_}/config/${:filename} +filename = enb.conf + + +[config-epc] +recipe = slapos.recipe.build:download +url = ${:_profile_base_location_}/config/${:filename} +filename = epc.conf + +[config-mbms] +recipe = slapos.recipe.build:download +url = ${:_profile_base_location_}/config/${:filename} +filename = mbms.conf + +[config-rr] +recipe = slapos.recipe.build:download +url = ${:_profile_base_location_}/config/${:filename} +filename = rr.conf + +[config-sib] +recipe = slapos.recipe.build:download +url = ${:_profile_base_location_}/config/${:filename} +filename = sib.conf + +[config-ue] +recipe = slapos.recipe.build:download +url = ${:_profile_base_location_}/config/${:filename} +filename = ue.conf + +[config-user_db] +recipe = slapos.recipe.build:download +url = ${:_profile_base_location_}/config/${:filename} +filename = user_db.csv + +[versions] +slapos.recipe.template = 4.3 +apache-libcloud = 2.4.0