From 5fdcef60f6fcbdf0dc9a4181892eb1b0dde9588e Mon Sep 17 00:00:00 2001
From: Philipp Gorczak
Date: Wed, 12 Jul 2017 13:52:13 +0200
Subject: [PATCH 1/6] Install binaries.
---
srsenb/src/CMakeLists.txt | 2 ++
srsue/src/CMakeLists.txt | 2 ++
2 files changed, 4 insertions(+)
diff --git a/srsenb/src/CMakeLists.txt b/srsenb/src/CMakeLists.txt
index 199650fac..14f02e574 100644
--- a/srsenb/src/CMakeLists.txt
+++ b/srsenb/src/CMakeLists.txt
@@ -42,3 +42,5 @@ if (NOT ${BUILDENB_CMD} STREQUAL "")
else(NOT ${BUILDENB_CMD} STREQUAL "")
message(STATUS "No post-build-ENB command defined")
endif (NOT ${BUILDENB_CMD} STREQUAL "")
+
+install(TARGETS srsenb DESTINATION bin)
diff --git a/srsue/src/CMakeLists.txt b/srsue/src/CMakeLists.txt
index 5a56bb057..94d29f739 100644
--- a/srsue/src/CMakeLists.txt
+++ b/srsue/src/CMakeLists.txt
@@ -50,3 +50,5 @@ if (NOT ${BUILDUE_CMD} STREQUAL "")
else(NOT ${BUILDUE_CMD} STREQUAL "")
message(STATUS "No post-build-UE command defined")
endif (NOT ${BUILDUE_CMD} STREQUAL "")
+
+install(TARGETS srsue DESTINATION bin)
From 407d2ef024ae2bb58cc82053d84f69b4b3ab885e Mon Sep 17 00:00:00 2001
From: Philipp Gorczak
Date: Thu, 13 Jul 2017 10:21:38 +0200
Subject: [PATCH 2/6] Use runtime dir parameter for executables.
---
srsenb/src/CMakeLists.txt | 2 +-
srsue/src/CMakeLists.txt | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/srsenb/src/CMakeLists.txt b/srsenb/src/CMakeLists.txt
index 14f02e574..0656133af 100644
--- a/srsenb/src/CMakeLists.txt
+++ b/srsenb/src/CMakeLists.txt
@@ -43,4 +43,4 @@ else(NOT ${BUILDENB_CMD} STREQUAL "")
message(STATUS "No post-build-ENB command defined")
endif (NOT ${BUILDENB_CMD} STREQUAL "")
-install(TARGETS srsenb DESTINATION bin)
+install(TARGETS srsenb DESTINATION ${RUNTIME_DIR})
diff --git a/srsue/src/CMakeLists.txt b/srsue/src/CMakeLists.txt
index 94d29f739..b2d8047f8 100644
--- a/srsue/src/CMakeLists.txt
+++ b/srsue/src/CMakeLists.txt
@@ -51,4 +51,4 @@ else(NOT ${BUILDUE_CMD} STREQUAL "")
message(STATUS "No post-build-UE command defined")
endif (NOT ${BUILDUE_CMD} STREQUAL "")
-install(TARGETS srsue DESTINATION bin)
+install(TARGETS srsue DESTINATION ${RUNTIME_DIR})
From 39ebc0e5fdb71593d344d0eac2c64c239a921047 Mon Sep 17 00:00:00 2001
From: Andre Puschmann
Date: Fri, 14 Jul 2017 10:46:27 +0200
Subject: [PATCH 3/6] gracefully exit MAC test when radio init fails
---
srsue/test/mac/mac_test.cc | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/srsue/test/mac/mac_test.cc b/srsue/test/mac/mac_test.cc
index 7c7e19cf0..3b5cd7a9b 100644
--- a/srsue/test/mac/mac_test.cc
+++ b/srsue/test/mac/mac_test.cc
@@ -458,7 +458,9 @@ int main(int argc, char *argv[])
}
// Init Radio and PHY
- radio.init();
+ if (!radio.init()) {
+ exit(1);
+ }
phy.init(&radio, &mac, NULL, &phy_log);
if (prog_args.rf_rx_gain > 0 && prog_args.rf_tx_gain > 0) {
radio.set_rx_gain(prog_args.rf_rx_gain);
From 00be4a5de7840f1d2cd7c7f023196c37dca2f780 Mon Sep 17 00:00:00 2001
From: Andre Puschmann
Date: Fri, 14 Jul 2017 10:41:44 +0200
Subject: [PATCH 4/6] fix bug with uninitalized number of rx antennas
---
lib/src/phy/ue/ue_cell_search.c | 2 +-
srsue/src/phy/phy.cc | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/src/phy/ue/ue_cell_search.c b/lib/src/phy/ue/ue_cell_search.c
index f8c38a1bb..f7d244387 100644
--- a/lib/src/phy/ue/ue_cell_search.c
+++ b/lib/src/phy/ue/ue_cell_search.c
@@ -95,7 +95,7 @@ int srslte_ue_cellsearch_init_multi(srslte_ue_cellsearch_t * q, uint32_t max_fra
{
int ret = SRSLTE_ERROR_INVALID_INPUTS;
- if (q != NULL) {
+ if (q != NULL && nof_rx_antennas > 0) {
ret = SRSLTE_ERROR;
srslte_cell_t cell;
diff --git a/srsue/src/phy/phy.cc b/srsue/src/phy/phy.cc
index cf673cce6..dea66346b 100644
--- a/srsue/src/phy/phy.cc
+++ b/srsue/src/phy/phy.cc
@@ -59,6 +59,7 @@ phy::phy() : workers_pool(MAX_WORKERS),
void phy::set_default_args(phy_args_t *args)
{
+ args->nof_rx_ant = 1;
args->ul_pwr_ctrl_en = false;
args->prach_gain = -1;
args->cqi_max = -1;
From 32b3046d0ff58e4f0ecb9c7843b3dd589bab4275 Mon Sep 17 00:00:00 2001
From: Andre Puschmann
Date: Mon, 24 Jul 2017 18:10:31 +0200
Subject: [PATCH 5/6] fix segfault in UE PHY tests
- added dummy rrc class to UE phy tests
---
srsue/test/phy/ue_itf_test_prach.cc | 13 +++++++++++--
srsue/test/phy/ue_itf_test_sib1.cc | 11 +++++++++--
2 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/srsue/test/phy/ue_itf_test_prach.cc b/srsue/test/phy/ue_itf_test_prach.cc
index 91df6a2fc..d3b4d39df 100644
--- a/srsue/test/phy/ue_itf_test_prach.cc
+++ b/srsue/test/phy/ue_itf_test_prach.cc
@@ -199,6 +199,14 @@ srslte_softbuffer_tx_t softbuffer_tx;
uint16_t temp_c_rnti;
+
+class rrc_dummy : public srsue::rrc_interface_phy
+{
+public:
+ void in_sync() {};
+ void out_of_sync() {};
+};
+
/******** MAC Interface implementation */
class testmac : public srsue::mac_interface_phy
{
@@ -326,7 +334,8 @@ private:
testmac my_mac;
-srslte::radio_multi radio;
+srslte::radio_multi radio;
+rrc_dummy rrc_dummy;
int main(int argc, char *argv[])
{
@@ -336,7 +345,7 @@ int main(int argc, char *argv[])
// Init Radio and PHY
radio.init();
- my_phy.init(&radio, &my_mac, NULL, &log);
+ my_phy.init(&radio, &my_mac, &rrc_dummy, &log);
if (prog_args.rf_rx_gain > 0 && prog_args.rf_tx_gain > 0) {
radio.set_rx_gain(prog_args.rf_rx_gain);
radio.set_tx_gain(prog_args.rf_tx_gain);
diff --git a/srsue/test/phy/ue_itf_test_sib1.cc b/srsue/test/phy/ue_itf_test_sib1.cc
index 08116b22c..310ecfc18 100644
--- a/srsue/test/phy/ue_itf_test_sib1.cc
+++ b/srsue/test/phy/ue_itf_test_sib1.cc
@@ -90,6 +90,13 @@ uint32_t total_oks=0;
uint8_t payload[1024];
srslte_softbuffer_rx_t softbuffer;
+class rrc_dummy : public srsue::rrc_interface_phy
+{
+public:
+ void in_sync() {};
+ void out_of_sync() {};
+};
+
/******** MAC Interface implementation */
class testmac : public srsue::mac_interface_phy
{
@@ -147,7 +154,7 @@ public:
testmac my_mac;
srslte::radio_multi radio;
-
+rrc_dummy rrc_dummy;
@@ -159,7 +166,7 @@ int main(int argc, char *argv[])
// Init Radio and PHY
radio.init();
- my_phy.init(&radio, &my_mac, NULL, &log);
+ my_phy.init(&radio, &my_mac, &rrc_dummy, &log);
if (prog_args.rf_gain > 0) {
radio.set_rx_gain(prog_args.rf_gain);
} else {
From 12603e4da258e180a5dbb98dc906fccf2273e71f Mon Sep 17 00:00:00 2001
From: Paul Sutton
Date: Wed, 2 Aug 2017 15:47:49 +0100
Subject: [PATCH 6/6] Bugfix for RRC ASN MeasConfig packing
---
lib/src/asn1/liblte_rrc.cc | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/lib/src/asn1/liblte_rrc.cc b/lib/src/asn1/liblte_rrc.cc
index 3bfa4a540..e4621994e 100644
--- a/lib/src/asn1/liblte_rrc.cc
+++ b/lib/src/asn1/liblte_rrc.cc
@@ -2006,6 +2006,7 @@ LIBLTE_ERROR_ENUM liblte_rrc_pack_meas_object_eutra_ie(LIBLTE_RRC_MEAS_OBJECT_EU
liblte_value_2_bits(0, ie_ptr, 1);
// Optional indicators
+ liblte_value_2_bits(meas_obj_eutra->offset_freq_not_default, ie_ptr, 1);
liblte_value_2_bits(meas_obj_eutra->cells_to_remove_list_present, ie_ptr, 1);
if(0 != meas_obj_eutra->N_cells_to_add_mod)
{
@@ -2035,7 +2036,10 @@ LIBLTE_ERROR_ENUM liblte_rrc_pack_meas_object_eutra_ie(LIBLTE_RRC_MEAS_OBJECT_EU
liblte_rrc_pack_neigh_cell_config_ie(meas_obj_eutra->neigh_cell_cnfg, ie_ptr);
// Offset Freq
- liblte_rrc_pack_q_offset_range_ie(meas_obj_eutra->offset_freq, ie_ptr);
+ if(meas_obj_eutra->offset_freq_not_default)
+ {
+ liblte_rrc_pack_q_offset_range_ie(meas_obj_eutra->offset_freq, ie_ptr);
+ }
// Cells To Remove List
if(meas_obj_eutra->cells_to_remove_list_present)
@@ -2329,6 +2333,9 @@ LIBLTE_ERROR_ENUM liblte_rrc_pack_meas_object_to_add_mod_list_ie(LIBLTE_RRC_MEAS
// Meas Object ID
liblte_rrc_pack_meas_object_id_ie(list->meas_obj_list[i].meas_obj_id, ie_ptr);
+ // Meas Object Choice Extension
+ liblte_value_2_bits(0, ie_ptr, 1); // Choice from before extension marker
+
// Meas Object Choice
liblte_value_2_bits(list->meas_obj_list[i].meas_obj_type, ie_ptr, 2);