From bec2b7bba719593a4706f8f9fa2cc334ee03c35b Mon Sep 17 00:00:00 2001 From: Chun-Yeow Yeoh Date: Thu, 2 Jul 2015 15:04:04 +0800 Subject: [PATCH 1/6] lte-softmodem: fix the wrongly Nid_cell Make sure that we fetch the cell id from config file rather than always fix it to 0. Signed-off-by: Mhd Zaher Mahfouz Signed-off-by: Chun-Yeow Yeoh --- targets/RT/USER/lte-softmodem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index 1867e6181d..5235cbe9a8 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -2770,7 +2770,7 @@ int main( int argc, char **argv ) PHY_vars_eNB_g[0] = malloc(sizeof(PHY_VARS_eNB*)); for (CC_id=0; CC_idNid_cell,cooperation_flag,transmission_mode,abstraction_flag); PHY_vars_eNB_g[0][CC_id]->CC_id = CC_id; #ifndef OPENAIR2 From cd38e360130c2266124dd6c7e031803b8a0a8269 Mon Sep 17 00:00:00 2001 From: Chun-Yeow Yeoh Date: Mon, 6 Jul 2015 18:06:35 +0800 Subject: [PATCH 2/6] lte-softmodem: add timing advance setting in command line for UE FDD band 5 requires HW advance timing set to 0. Signed-off-by: Chun-Yeow Yeoh --- targets/RT/USER/lte-softmodem.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index 1867e6181d..a3d29c43ef 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -318,6 +318,7 @@ static LTE_DL_FRAME_PARMS *frame_parms[MAX_NUM_CCs]; int multi_thread=1; uint32_t target_dl_mcs = 28; //maximum allowed mcs uint32_t target_ul_mcs = 10; +uint32_t timing_advance = 0; uint8_t exit_missed_slots=1; uint64_t num_missed_slots=0; // counter for the number of missed slots @@ -2042,7 +2043,7 @@ static void get_options (int argc, char **argv) {NULL, 0, NULL, 0} }; - while ((c = getopt_long (argc, argv, "C:dK:g:F:G:hqO:m:SUVRM:r:P:Ws:t:x:",long_options,NULL)) != -1) { + while ((c = getopt_long (argc, argv, "C:dK:g:F:G:hqO:m:SUVRM:r:P:Ws:t:x:A:",long_options,NULL)) != -1) { switch (c) { case LONG_OPTION_MAXPOWER: tx_max_power[0]=atoi(optarg); @@ -2117,6 +2118,10 @@ static void get_options (int argc, char **argv) #endif break; + case 'A': + timing_advance = atoi (optarg); + break; + case 'C': for (CC_id=0; CC_idN_RB_DL; // connect the TX/RX buffers if (UE_flag==1) { #ifdef OAI_USRP - openair_daq_vars.timing_advance = 160; + openair_daq_vars.timing_advance = timing_advance; #else openair_daq_vars.timing_advance = 160; #endif From e8cc09b3cccdc5ba9c0cee75d8c24efbb5aae7f2 Mon Sep 17 00:00:00 2001 From: Chun-Yeow Yeoh Date: Wed, 8 Jul 2015 14:14:27 +0800 Subject: [PATCH 3/6] lte-ue: fix the initialization of UE NAS The NAS UE is not initialized by the UE of lte-softmodem. Fix this. Signed-off-by: Chun-Yeow Yeoh --- targets/RT/USER/lte-ue.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/targets/RT/USER/lte-ue.c b/targets/RT/USER/lte-ue.c index 7c82b7976c..f12c6b1240 100644 --- a/targets/RT/USER/lte-ue.c +++ b/targets/RT/USER/lte-ue.c @@ -1019,6 +1019,10 @@ void *UE_thread(void *arg) openair0_timestamp timestamp; +#ifdef NAS_UE + MessageDef *message_p; +#endif + #ifdef RTAI RT_TASK *task = rt_task_init_schmod(nam2num("UE thread"), 0, 0, 0, SCHED_FIFO, 0xF); @@ -1074,6 +1078,11 @@ void *UE_thread(void *arg) printf("starting UE thread\n"); +#ifdef NAS_UE + message_p = itti_alloc_new_message(TASK_NAS_UE, INITIALIZE_MESSAGE); + itti_send_msg_to_task (TASK_NAS_UE, INSTANCE_DEFAULT, message_p); +#endif + T0 = rt_get_time_ns(); first_rx = 1; rxpos=0; From 75b32aad87964e32d683503c5d5fd2baf184068c Mon Sep 17 00:00:00 2001 From: Raymond Knopp Date: Thu, 19 Nov 2015 00:32:18 -0800 Subject: [PATCH 4/6] Applied patch to lte_dfts.c (inline function cmacc for x86) to correct bug in ibfly3 --- openair1/PHY/TOOLS/lte_dfts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openair1/PHY/TOOLS/lte_dfts.c b/openair1/PHY/TOOLS/lte_dfts.c index c031d5d384..ec4577a67a 100644 --- a/openair1/PHY/TOOLS/lte_dfts.c +++ b/openair1/PHY/TOOLS/lte_dfts.c @@ -94,7 +94,7 @@ static inline void cmacc(__m128i a,__m128i b, __m128i *re32, __m128i *im32) cmac_tmp = _mm_sign_epi16(b,*(__m128i*)reflip); // cmac_tmp = _mm_shufflelo_epi16(b,_MM_SHUFFLE(2,3,0,1)); // cmac_tmp = _mm_shufflehi_epi16(cmac_tmp,_MM_SHUFFLE(2,3,0,1)); - cmac_tmp = _mm_shuffle_epi8(b,_mm_set_epi8(13,12,15,14,9,8,11,10,5,4,7,6,1,0,3,2)); + cmac_tmp = _mm_shuffle_epi8(cmac_tmp,_mm_set_epi8(13,12,15,14,9,8,11,10,5,4,7,6,1,0,3,2)); cmac_tmp_im32 = _mm_madd_epi16(cmac_tmp,a); *re32 = _mm_add_epi32(*re32,cmac_tmp_re32); From 9eac7ac6ffdb299a18bd894096b67a5aeba2b4b7 Mon Sep 17 00:00:00 2001 From: gauthier Date: Wed, 16 Dec 2015 09:06:50 +0100 Subject: [PATCH 5/6] fixed TX/RX timing for B210 5 MHz --- targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp | 8 +++----- .../GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf | 6 +++--- .../PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.usrpb210.conf | 6 +++--- targets/RT/USER/lte-softmodem.c | 4 ++-- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp index 0885ef6dd1..b12f7397f0 100644 --- a/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp +++ b/targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp @@ -464,7 +464,7 @@ int openair0_dev_init_usrp(openair0_device* device, openair0_config_t *openair0_ break; case 7680000: openair0_cfg[0].samples_per_packet = 1024; - openair0_cfg[0].tx_sample_advance = 103; + openair0_cfg[0].tx_sample_advance = 70;//103; openair0_cfg[0].tx_scheduling_advance = 5*openair0_cfg[0].samples_per_packet; break; case 1920000: @@ -479,13 +479,11 @@ int openair0_dev_init_usrp(openair0_device* device, openair0_config_t *openair0_ } } - - for(i=0;iusrp->get_rx_num_channels();i++) { if (iusrp->set_rx_rate(openair0_cfg[0].sample_rate,i); s->usrp->set_rx_bandwidth(openair0_cfg[0].rx_bw,i); - printf("Setting rx freq/gain on channel %lu/%lu\n",i,s->usrp->get_rx_num_channels()); + printf("Setting rx freq/gain on channel %lu/%lu : BW %f (readback %f)\n",i,s->usrp->get_rx_num_channels(),openair0_cfg[0].rx_bw/1e6,s->usrp->get_rx_bandwidth(i)/1e6); s->usrp->set_rx_freq(openair0_cfg[0].rx_freq[i],i); set_rx_gain_offset(&openair0_cfg[0],i); @@ -506,7 +504,7 @@ int openair0_dev_init_usrp(openair0_device* device, openair0_config_t *openair0_ if (iusrp->set_tx_rate(openair0_cfg[0].sample_rate,i); s->usrp->set_tx_bandwidth(openair0_cfg[0].tx_bw,i); - printf("Setting tx freq/gain on channel %lu/%lu\n",i,s->usrp->get_tx_num_channels()); + printf("Setting tx freq/gain on channel %lu/%lu: BW %f (readback %f)\n",i,s->usrp->get_tx_num_channels(),openair0_cfg[0].tx_bw/1e6,s->usrp->get_tx_bandwidth(i)/1e6); s->usrp->set_tx_freq(openair0_cfg[0].tx_freq[i],i); s->usrp->set_tx_gain(openair0_cfg[0].tx_gain[i],i); } diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf index 2f11e42ba9..d8ea58910a 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.conf @@ -36,7 +36,7 @@ eNBs = nb_antennas_tx = 1; nb_antennas_rx = 1; tx_gain = 90; - rx_gain = 120; + rx_gain = 132; prach_root = 0; prach_config_index = 0; prach_high_speed = "DISABLE"; @@ -143,10 +143,10 @@ eNBs = NETWORK_INTERFACES : { ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; - ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.216/24"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.213/24"; ENB_INTERFACE_NAME_FOR_S1U = "eth0"; - ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.216/24"; + ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.213/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.usrpb210.conf index 57a43fb414..c2234b56c7 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.usrpb210.conf @@ -132,7 +132,7 @@ eNBs = }; ////////// MME parameters: - mme_ip_address = ( { ipv4 = "192.168.13.11"; + mme_ip_address = ( { ipv4 = "192.168.12.11"; ipv6 = "192:168:30::17"; active = "yes"; preference = "ipv4"; @@ -142,10 +142,10 @@ eNBs = NETWORK_INTERFACES : { ENB_INTERFACE_NAME_FOR_S1_MME = "eth0"; - ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.13.10/24"; + ENB_IPV4_ADDRESS_FOR_S1_MME = "192.168.12.213/24"; ENB_INTERFACE_NAME_FOR_S1U = "eth0"; - ENB_IPV4_ADDRESS_FOR_S1U = "192.168.13.10/24"; + ENB_IPV4_ADDRESS_FOR_S1U = "192.168.12.213/24"; ENB_PORT_FOR_S1U = 2152; # Spec 2152 }; diff --git a/targets/RT/USER/lte-softmodem.c b/targets/RT/USER/lte-softmodem.c index 45625e7e73..19e1c5b653 100644 --- a/targets/RT/USER/lte-softmodem.c +++ b/targets/RT/USER/lte-softmodem.c @@ -2854,8 +2854,8 @@ int main( int argc, char **argv ) } else if (frame_parms[0]->N_RB_DL == 25) { openair0_cfg[card].sample_rate=7.68e6; openair0_cfg[card].samples_per_frame = 76800; - openair0_cfg[card].tx_bw = 2.5e6; - openair0_cfg[card].rx_bw = 2.5e6; + openair0_cfg[card].tx_bw = 5e6; + openair0_cfg[card].rx_bw = 5e6; } else if (frame_parms[0]->N_RB_DL == 6) { openair0_cfg[card].sample_rate=1.92e6; From 69e10a76c32470ce35f6096b46254721b3d40318 Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Thu, 17 Dec 2015 13:05:11 +0100 Subject: [PATCH 6/6] fixed rx gain settings for USRP B210 --- .../GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf | 2 +- .../GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf | 2 +- targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.usrpb210.conf | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf index e864f47edb..6470b310f0 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.local.conf @@ -36,7 +36,7 @@ eNBs = nb_antennas_tx = 1; nb_antennas_rx = 1; tx_gain = 90; - rx_gain = 120; + rx_gain = 132; prach_root = 0; prach_config_index = 0; prach_high_speed = "DISABLE"; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf index 7bc8e8593a..4722040b07 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.usrpb210.epc.remote.conf @@ -35,7 +35,7 @@ eNBs = nb_antennas_tx = 1; nb_antennas_rx = 1; tx_gain = 90; - rx_gain = 119; + rx_gain = 132; prach_root = 0; prach_config_index = 0; prach_high_speed = "DISABLE"; diff --git a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.usrpb210.conf b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.usrpb210.conf index c2234b56c7..6e3357e49b 100644 --- a/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.usrpb210.conf +++ b/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.usrpb210.conf @@ -36,7 +36,7 @@ eNBs = nb_antennas_tx = 2; nb_antennas_rx = 2; tx_gain = 90; - rx_gain = 115; + rx_gain = 132; prach_root = 0; prach_config_index = 0; prach_high_speed = "DISABLE";