Commit 4fb87f9d authored by Melissa Elkadi's avatar Melissa Elkadi

Filling rach_ind and sending to proxy

Seems to be working at the moment but
may need to add more info in the rach_ind.
Also, need to verify gNB is getting the
rach_ind and starting RA procedure.
parent 7a15a219
......@@ -179,6 +179,17 @@ static void *NRUE_phy_stub_standalone_pnf_task(void *arg)
if (nr_prach == 1)
{
nfapi_nr_rach_indication_t rach_ind = {
.header = {
.message_id = NFAPI_NR_PHY_MSG_TYPE_RACH_INDICATION,
},
.sfn = frame_tx,
.slot = nr_slot_tx,
.pdu_list = NULL,
.number_of_pdus = 0,
};
send_nsa_standalone_msg(&rach_ind);
/* Fill rach indication here and send to proxy. Basically take pieces from
L1_nr_prach_procedures() and send it to the proxy. prach from ue->gNb->gnb sends rach->ue receives rach
The UE is basically filling the rach and proxy will receive and think that it came from the gNB. The
......
......@@ -127,7 +127,18 @@ void nrue_init_standalone_socket(const char *addr, int tx_port, int rx_port)
tx_port, rx_port, addr);
}
void send_nsa_standalone_msg(nfapi_nr_rach_indication_t *rach_ind)
{
char buffer[NFAPI_MAX_PACKED_MESSAGE_SIZE];
int encoded_size = nfapi_nr_p7_message_pack(rach_ind, buffer, sizeof(buffer), NULL);
LOG_I(NR_MAC, "NR_RACH_IND sent to Proxy, Size: %d Frame %d Subframe %d\n", encoded_size,
rach_ind->sfn, rach_ind->slot);
if (send(ue_tx_sock_descriptor, buffer, encoded_size, 0) < 0)
{
LOG_E(NR_MAC, "Send Proxy NR_UE failed\n");
return;
}
}
static void save_nr_measurement_info(nfapi_nr_dl_tti_request_t *dl_tti_request)
{
int num_pdus = dl_tti_request->dl_tti_request_body.nPDUs;
......
......@@ -218,6 +218,8 @@ typedef struct nfapi_dl_tti_config_req_tx_data_req_t
nfapi_nr_tx_data_request_t *tx_data_req_pdu_list;
} nfapi_dl_tti_config_req_tx_data_req_t;
void send_nsa_standalone_msg(nfapi_nr_rach_indication_t *rach_ind);
/**\brief done free of memory allocation by module_id and release to pointer pool.
\param module_id module id*/
int nr_ue_if_module_kill(uint32_t module_id);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment