Commit 9cf15c80 authored by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen

polish the code/update instructions

parent f2653443
......@@ -48,8 +48,8 @@ UE1 and UE2: Get and build vencore_app from d2d-l3-stub (branch: l3_stub)
--------------------------------
TEST ONE-TO-MANY
Run UE1 then UE2, for example:
UE1: sudo ./lte-softmodem-stub -U --emul_iface eth0
UE2: sudo ./lte-softmodem-stub -U --emul_iface eno1
UE1: sudo ./lte-softmodem-stub -U --emul-iface eth0
UE2: sudo ./lte-softmodem-stub -U --emul-iface eno1
Test with Ping
- Sender - UE1: ping -I oip0 224.0.0.1
......@@ -63,20 +63,20 @@ Filter the incomming packets according to GroupL2Id: receiver (one-to-many) can
For the moment, both sender and receiver use the same set of Ids (hardcoded)
UE1 (sender)
- sudo ./lte-softmodem-stub -U --emul_iface eth0
- sudo ./lte-softmodem-stub -U --emul-iface eth0
- ./vencore_app #send the sourceL2Id, groupL2Id to OAI
- ping -I oip0 224.0.0.1
UE2(receiver)
- sudo ./lte-softmodem-stub -U --emul_iface eno1
- sudo ./lte-softmodem-stub -U --emul-iface eno1
#we can see the incomming packets from OAI log, however, cannot see from Wireshark -> they are discarded at MAC layer
- ./vencore_app #we can see the packets appearing in Wireshark
--------------------------------------
TEST PC5-S (UE1 -sender, UE2 - receiver)
step 1:
- UE1: sudo ./lte-softmodem-stub -U --emul_iface eth0
- UE1: sudo ./lte-softmodem-stub -U --emul-iface eth0
step 2:
- UE2: sudo ./lte-softmodem-stub -U --emul_iface eno1
- UE2: sudo ./lte-softmodem-stub -U --emul-iface eno1
- UE2: ./vencore_app -r #listen to incomming message from PC5-S
step 3:
- UE1: ./vencore_app -s #send a message via PC5-S (e.g., DirectCommunicationRequest)
......@@ -85,9 +85,9 @@ step 3:
--------------------------------------
TEST PC5-D
step 1:
- UE1: sudo ./lte-softmodem-stub -U --emul_iface eth0
- UE1: sudo ./lte-softmodem-stub -U --emul-iface eth0
- UE1: ./vencore_app -d #send a PC5-Discovery-Announcement via PC5D
step 2:
- UE2: sudo ./lte-softmodem-stub -U --emul_iface eno1
- UE2: sudo ./lte-softmodem-stub -U --emul-iface eno1
- UE2: ./vencore_app -d #send a PC5-Discovery-Announcement via PC5D
......@@ -433,7 +433,7 @@ typedef struct {
ip_traffic_type_t traffic_type;
uint32_t sourceL2Id;
uint32_t destinationL2Id;
} __attribute__((__packed__)) pdcp_data_header_t;
} __attribute__((__packed__)) pc5s_header_t;
//new PC5S-message
typedef struct {
......@@ -442,7 +442,7 @@ typedef struct {
//example of PC5-S messages
typedef struct {
pdcp_data_header_t pdcp_data_header;
pc5s_header_t pc5s_header;
union {
uint8_t status;
PC5SignallingMessage pc5_signalling_message;
......
This diff is collapsed.
......@@ -103,7 +103,6 @@ typedef enum {
} Group_Communication_Status_t;
struct GroupCommunicationEstablishReq {
uint8_t type; //0 - rx, 1 - tx
uint32_t sourceL2Id;
uint32_t groupL2Id;
uint32_t groupIpAddress;
......@@ -129,11 +128,12 @@ struct PC5SEstablishReq{
};
struct PC5SEstablishRsp{
uint32_t sourceL2Id;
uint32_t destinationL2Id;
uint8_t status;
uint32_t slrbid_lcid28;
uint32_t slrbid_lcid29;
uint32_t slrbid_lcid30;
};
//PC5_DISCOVERY MESSAGE
typedef struct {
unsigned char payload[PC5_DISCOVERY_PAYLOAD_SIZE];
......
......@@ -5536,7 +5536,6 @@ void *rrc_control_socket_thread_fct(void *arg)
#ifdef DEBUG_CTRL_SOCKET
LOG_I(RRC,"[GroupCommunicationEstablishReq] Received on socket from ProSe App (msg type: %d)\n",sl_ctrl_msg_recv->type);
LOG_I(RRC,"[GroupCommunicationEstablishReq] type: %d\n",sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.type);
LOG_I(RRC,"[GroupCommunicationEstablishReq] source Id: 0x%08x\n",sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.sourceL2Id);
LOG_I(RRC,"[GroupCommunicationEstablishReq] group Id: 0x%08x\n",sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.groupL2Id);
LOG_I(RRC,"[GroupCommunicationEstablishReq] group IP Address: " IPV4_ADDR "\n",IPV4_ADDR_FORMAT(sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.groupIpAddress));
......@@ -5567,15 +5566,7 @@ void *rrc_control_socket_thread_fct(void *arg)
*(UE->DRB_config[0][0]->eps_BearerIdentity) = 3;
UE->DRB_config[0][0]->logicalChannelIdentity = CALLOC(1, sizeof(long));
*(UE->DRB_config[0][0]->logicalChannelIdentity) = UE->DRB_config[0][0]->drb_Identity; //(long) (ue_context_pP->ue_context.e_rab[i].param.e_rab_id + 2); // value : x+2
/*
struct RLC_Config *DRB_rlc_config = CALLOC(1,sizeof(struct RLC_Config));
struct PDCP_Config *DRB_pdcp_config = CALLOC(1,sizeof(struct PDCP_Config));
struct PDCP_Config__rlc_UM *PDCP_rlc_UM = CALLOC(1,sizeof(struct PDCP_Config__rlc_UM));
struct LogicalChannelConfig *DRB_lchan_config = CALLOC(1,sizeof(struct LogicalChannelConfig));
struct LogicalChannelConfig__ul_SpecificParameters
*DRB_ul_SpecificParameters = CALLOC(1, sizeof(struct LogicalChannelConfig__ul_SpecificParameters));
long *logicalchannelgroup_drb = CALLOC(1, sizeof(long));
*/
DRB_rlc_config = CALLOC(1,sizeof(struct RLC_Config));
DRB_pdcp_config = CALLOC(1,sizeof(struct PDCP_Config));
PDCP_rlc_UM = CALLOC(1,sizeof(struct PDCP_Config__rlc_UM));
......@@ -5696,16 +5687,7 @@ void *rrc_control_socket_thread_fct(void *arg)
memset(send_buf, 0, BUFSIZE);
sl_ctrl_msg_send = calloc(1, sizeof(struct sidelink_ctrl_element));
sl_ctrl_msg_send->type = GROUP_COMMUNICATION_ESTABLISH_RSP;
//in case of TX, assign a new SLRB and prepare for the filter
if (sl_ctrl_msg_recv->sidelinkPrimitive.group_comm_establish_req.type == 1) {
sl_ctrl_msg_send->sidelinkPrimitive.slrb_id = SLRB_ID; //slrb_id
//pthread_mutex_lock(&slrb_mutex);
slrb_id = SLRB_ID;
//pthread_mutex_unlock(&slrb_mutex);
} else{ //RX
sl_ctrl_msg_send->sidelinkPrimitive.slrb_id = SL_DEFAULT_RAB_ID;
}
sl_ctrl_msg_send->sidelinkPrimitive.slrb_id = 3; //slrb_id
memcpy((void *)send_buf, (void *)sl_ctrl_msg_send, sizeof(struct sidelink_ctrl_element));
free(sl_ctrl_msg_send);
......@@ -5961,17 +5943,6 @@ void *rrc_control_socket_thread_fct(void *arg)
#endif
);
} else {//RX
/* rrc_rlc_config_asn1_req(&ctxt,
(SRB_ToAddModList_t*)NULL,
UE->DRB_configList,
(DRB_ToReleaseList_t*)NULL
#ifdef Rel14
,(PMCH_InfoList_r9_t *)NULL
, sourceL2Id, 0
#endif
);
*/
//configure MAC with sourceL2Id/groupL2ID
rrc_mac_config_req_ue(module_id,0,0, //eNB_index =0
(RadioResourceConfigCommonSIB_t *)NULL,
......@@ -6013,102 +5984,13 @@ void *rrc_control_socket_thread_fct(void *arg)
}
/*
//store sourceL2Id, destinationL2Id
if (type > 0) { //TX
UE_rrc_inst[module_id].sourceL2Id = sourceL2Id;
UE_rrc_inst[module_id].destinationL2Id = destinationL2Id;
// configure lower layers PDCP/MAC/PHY
rrc_mac_config_req_ue(module_id,0,0, //eNB_index =0
(RadioResourceConfigCommonSIB_t *)NULL,
(struct PhysicalConfigDedicated *)NULL,
#if defined(Rel10) || defined(Rel14)
(SCellToAddMod_r10_t *)NULL,
//struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
#endif
(MeasObjectToAddMod_t **)NULL,
(MAC_MainConfig_t *)NULL,
0,
(struct LogicalChannelConfig *)NULL,
(MeasGapConfig_t *)NULL,
(TDD_Config_t *)NULL,
(MobilityControlInfo_t *)NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL
#if defined(Rel10) || defined(Rel14)
,0,
(MBSFN_AreaInfoList_r9_t *)NULL,
(PMCH_InfoList_r9_t *)NULL
#endif
#ifdef CBA
,
0,
0
#endif
#if defined(Rel10) || defined(Rel14)
,CONFIG_ACTION_ADD,
&sourceL2Id,
&destinationL2Id
#endif
);
} else {//RX
UE_rrc_inst[module_id].sourceL2Id = sourceL2Id;
// configure lower layers PDCP/MAC/PHY
rrc_mac_config_req_ue(module_id,0,0, //eNB_index =0
(RadioResourceConfigCommonSIB_t *)NULL,
(struct PhysicalConfigDedicated *)NULL,
#if defined(Rel10) || defined(Rel14)
(SCellToAddMod_r10_t *)NULL,
//struct PhysicalConfigDedicatedSCell_r10 *physicalConfigDedicatedSCell_r10,
#endif
(MeasObjectToAddMod_t **)NULL,
(MAC_MainConfig_t *)NULL,
0,
(struct LogicalChannelConfig *)NULL,
(MeasGapConfig_t *)NULL,
(TDD_Config_t *)NULL,
(MobilityControlInfo_t *)NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL
#if defined(Rel10) || defined(Rel14)
,0,
(MBSFN_AreaInfoList_r9_t *)NULL,
(PMCH_InfoList_r9_t *)NULL
#endif
#ifdef CBA
,
0,
0
#endif
#if defined(Rel10) || defined(Rel14)
,CONFIG_ACTION_ADD,
&sourceL2Id,
NULL
#endif
);
}
*/
LOG_I(RRC,"Send PC5EstablishRsp to ProSe App\n");
memset(send_buf, 0, BUFSIZE);
sl_ctrl_msg_send = calloc(1, sizeof(struct sidelink_ctrl_element));
sl_ctrl_msg_send->type = PC5S_ESTABLISH_RSP;
sl_ctrl_msg_send->sidelinkPrimitive.pc5s_establish_rsp.sourceL2Id = sourceL2Id;
sl_ctrl_msg_send->sidelinkPrimitive.pc5s_establish_rsp.destinationL2Id = destinationL2Id;
sl_ctrl_msg_send->sidelinkPrimitive.pc5s_establish_rsp.status = 1;
sl_ctrl_msg_send->sidelinkPrimitive.pc5s_establish_rsp.slrbid_lcid28 = 10;
sl_ctrl_msg_send->sidelinkPrimitive.pc5s_establish_rsp.slrbid_lcid29 = 10;
sl_ctrl_msg_send->sidelinkPrimitive.pc5s_establish_rsp.slrbid_lcid30 = 10;
memcpy((void *)send_buf, (void *)sl_ctrl_msg_send, sizeof(struct sidelink_ctrl_element));
prose_addr_len = sizeof(prose_app_addr);
......
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