Merge remote-tracking branch 'origin/hack-exit-gnb-when-no-enb-nsa' into integration_2021_wk18_a
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
while true
|
||||
do
|
||||
echo "gNB will be started automatically..."
|
||||
sleep 1
|
||||
sudo .././cmake_targets/ran_build/build/nr-softmodem -E -O ../targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb.conf
|
||||
done
|
||||
@@ -130,6 +130,18 @@ void x2ap_eNB_handle_sctp_association_resp(instance_t instance, sctp_new_associa
|
||||
DevAssert(x2ap_enb_data_p != NULL);
|
||||
dump_trees();
|
||||
|
||||
/* gNB: exit if connection to eNB failed - to be modified if needed.
|
||||
* We may want to try to connect over and over again until we succeed
|
||||
* but the modifications to the code to get this behavior are complex.
|
||||
* Exit on error is a simple solution that can be caught by a script
|
||||
* for example.
|
||||
*/
|
||||
if (instance_p->cell_type == CELL_MACRO_GNB
|
||||
&& sctp_new_association_resp->sctp_state == SCTP_STATE_UNREACHABLE) {
|
||||
X2AP_ERROR("association with eNB failed, is it running? If no, run it first. If yes, check IP addresses in your configuration file.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (sctp_new_association_resp->sctp_state != SCTP_STATE_ESTABLISHED) {
|
||||
X2AP_WARN("Received unsuccessful result for SCTP association (%u), instance %ld, cnx_id %u\n",
|
||||
sctp_new_association_resp->sctp_state,
|
||||
|
||||
Reference in New Issue
Block a user