First attempt at receiving MIB and SIB in SA mode
This commit is contained in:
+12
-4
@@ -314,13 +314,15 @@ static void process_queued_nr_nfapi_msgs(NR_UE_MAC_INST_t *mac, int sfn_slot)
|
||||
{
|
||||
LOG_E(NR_MAC, "[%d %d] No corresponding tx_data_request for given dl_tti_request sfn/slot\n",
|
||||
NFAPI_SFNSLOT2SFN(dl_tti_sfn_slot), NFAPI_SFNSLOT2SLOT(dl_tti_sfn_slot));
|
||||
save_nr_measurement_info(dl_tti_request);
|
||||
if (get_softmodem_params()->nsa)
|
||||
save_nr_measurement_info(dl_tti_request);
|
||||
free(dl_tti_request);
|
||||
dl_tti_request = NULL;
|
||||
}
|
||||
else if (dl_tti_request->dl_tti_request_body.nPDUs > 0 && tx_data_request->Number_of_PDUs > 0)
|
||||
{
|
||||
save_nr_measurement_info(dl_tti_request);
|
||||
if (get_softmodem_params()->nsa)
|
||||
save_nr_measurement_info(dl_tti_request);
|
||||
check_and_process_dci(dl_tti_request, tx_data_request, NULL, NULL);
|
||||
}
|
||||
else
|
||||
@@ -432,9 +434,15 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
|
||||
|
||||
module_id_t mod_id = 0;
|
||||
NR_UE_MAC_INST_t *mac = get_mac_inst(mod_id);
|
||||
if (mac->scc == NULL)
|
||||
if (mac->scc == NULL || mac->scc_SIB == NULL) //Melissa TODO this isnt correct
|
||||
{
|
||||
LOG_D(MAC, "mac->scc == NULL!\n");
|
||||
if (get_softmodem_params()->sa && get_softmodem_params()->emulate_l2)
|
||||
{
|
||||
LOG_D(NR_MAC, "We haven't gotten MIB or SIB yet. Lets see if we received it\n");
|
||||
nr_ue_dl_indication(&mac->dl_info, &ul_time_alignment);
|
||||
process_queued_nr_nfapi_msgs(mac, sfn_slot);
|
||||
}
|
||||
LOG_D(MAC, "mac->scc == NULL or mac->scc_SIB == NULL!\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -493,7 +493,10 @@ int main( int argc, char **argv ) {
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
if (!get_softmodem_params()->nsa) {
|
||||
if (get_softmodem_params()->emulate_l2)
|
||||
start_oai_nrue_threads();
|
||||
|
||||
if (!get_softmodem_params()->nsa && !get_softmodem_params()->emulate_l2) {
|
||||
for (int CC_id=0; CC_id<MAX_NUM_CCs; CC_id++) {
|
||||
PHY_vars_UE_g[0][CC_id] = (PHY_VARS_NR_UE *)malloc(sizeof(PHY_VARS_NR_UE));
|
||||
UE[CC_id] = PHY_vars_UE_g[0][CC_id];
|
||||
|
||||
@@ -89,6 +89,7 @@ extern void init_NR_UE(int, char*);
|
||||
extern void init_NR_UE_threads(int);
|
||||
extern void reset_opp_meas(void);
|
||||
extern void print_opp_meas(void);
|
||||
extern void start_oai_nrue_threads(void);
|
||||
void *UE_thread(void *arg);
|
||||
void init_nr_ue_vars(PHY_VARS_NR_UE *ue, uint8_t UE_id, uint8_t abstraction_flag);
|
||||
void init_nrUE_standalone_thread(int ue_idx);
|
||||
|
||||
@@ -98,6 +98,7 @@ extern "C"
|
||||
#define CONFIG_HLP_DISABLNBIOT "disable nb-iot, even if defined in config\n"
|
||||
#define CONFIG_HLP_USRP_THREAD "having extra thead for usrp tx\n"
|
||||
#define CONFIG_HLP_NFAPI "Change the nFAPI mode for NR\n"
|
||||
#define CONFIG_L2_EMULATOR "Run in L2 emulated mode (disable PHY layer)\n"
|
||||
|
||||
/*-----------------------------------------------------------------------------------------------------------------------------------------------------*/
|
||||
/* command line parameters common to eNodeB and UE */
|
||||
@@ -125,6 +126,7 @@ extern "C"
|
||||
#define NSA softmodem_params.nsa
|
||||
#define NODE_NUMBER softmodem_params.node_number
|
||||
#define NON_STOP softmodem_params.non_stop
|
||||
#define EMULATE_L2 softmodem_params.emulate_l2
|
||||
|
||||
#define DEFAULT_RFCONFIG_FILE "/usr/local/etc/syriq/ue.band7.tm1.PRB100.NR40.dat";
|
||||
|
||||
@@ -163,6 +165,7 @@ extern int usrp_tx_thread;
|
||||
{"do-prb-interpolation", CONFIG_HLP_PRBINTER, PARAMFLAG_BOOL, iptr:&PRB_INTERPOLATION, defintval:0, TYPE_INT, 0}, \
|
||||
{"nfapi", CONFIG_HLP_NFAPI, 0, u8ptr:&nfapi_mode, defintval:0, TYPE_UINT8, 0}, \
|
||||
{"non-stop", CONFIG_HLP_NONSTOP, PARAMFLAG_BOOL, iptr:&NON_STOP, defintval:0, TYPE_INT, 0}, \
|
||||
{"emulate-l2", CONFIG_L2_EMULATOR, PARAMFLAG_BOOL, iptr:&EMULATE_L2, defintval:0, TYPE_INT, 0}, \
|
||||
}
|
||||
|
||||
#define CONFIG_HLP_NSA "Enable NSA mode \n"
|
||||
@@ -258,6 +261,7 @@ typedef struct {
|
||||
int nsa;
|
||||
uint16_t node_number;
|
||||
int non_stop;
|
||||
int emulate_l2;
|
||||
} softmodem_params_t;
|
||||
|
||||
extern uint64_t get_softmodem_optmask(void);
|
||||
|
||||
Reference in New Issue
Block a user