diff --git a/executables/agent_if/e2_agent_api.h b/executables/agent_if/e2_agent_api.h
index 654ae3c2e740c9c82a533e31f835028cd06edb97..c922cad59097aff6e40a419770ee3427f95a1eef 100644
--- a/executables/agent_if/e2_agent_api.h
+++ b/executables/agent_if/e2_agent_api.h
@@ -1,11 +1,33 @@
+/*
+ * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The OpenAirInterface Software Alliance licenses this file to You under
+ * the OAI Public License, Version 1.1  (the "License"); you may not use this file
+ * except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.openairinterface.org/?page_id=698
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *-------------------------------------------------------------------------------
+ * For more information about the OpenAirInterface (OAI) Software Alliance:
+ *      contact@openairinterface.org
+ */
+
+
+
 #ifndef E2_AGENT_API_MOSAIC_H
 #define E2_AGENT_API_MOSAIC_H
 
 #include "sm_io.h"
 
 
-void init_agent_api(const char* server_ip_str, 
-                    int mcc, 
+void init_agent_api(int mcc, 
                     int mnc, 
                     int mnc_digit_len,
                     int nb_id,
diff --git a/executables/nr-softmodem.c b/executables/nr-softmodem.c
index 8de81cd9caf5cfe66a115e0e25323cf2bacd26e2..110d6571a5ca43d124eec84eaf78b84482cedae6 100644
--- a/executables/nr-softmodem.c
+++ b/executables/nr-softmodem.c
@@ -933,25 +933,6 @@ int main( int argc, char **argv ) {
     exit_fun("[SOFTMODEM] Error, configuration module init failed\n");
   }
 
-//////////////////////////////////
-//////////////////////////////////
-//// Init the E2 Agent
-  const char server_ip_str[] = "192.168.52.10";
-
-//  const gNB_RRC_INST* rrc = RC.nrrrc[mod_id];
-//  assert(rrc);
-
-  const int mcc = 208;  //rrc->configuration.mcc[0]; // 208;
-  const int mnc =  94; // rrc->configuration.mnc[0]; // 94;
-  const int mnc_digit_len = 2; // rrc->configuration.mnc_digit_length[0]; // 2;
-  const int nb_id = 42; // rrc->configuration.cell_identity; //42;
-  sm_io_ag_t io = {.read = read_RAN, .write = write_RAN};
-
-  init_agent_api(server_ip_str, mcc, mnc, mnc_digit_len, nb_id, io);
-//////////////////////////////////
-//////////////////////////////////
-
-
   set_softmodem_sighandler();
 #ifdef DEBUG_CONSOLE
   setvbuf(stdout, NULL, _IONBF, 0);
@@ -972,6 +953,7 @@ int main( int argc, char **argv ) {
     exit(-1);
   }
 
+
   openair0_cfg[0].threequarter_fs = threequarter_fs;
 
   if (get_softmodem_params()->do_ra)
@@ -1086,6 +1068,26 @@ int main( int argc, char **argv ) {
 
   config_sync_var=0;
 
+//////////////////////////////////
+//////////////////////////////////
+//// Init the E2 Agent
+
+  sleep(2);
+  const gNB_RRC_INST* rrc = RC.nrrrc[mod_id];
+  assert(rrc != NULL && "rrc cannot be NULL");
+
+  const int mcc = rrc->configuration.mcc[0]; // 208;
+  const int mnc = rrc->configuration.mnc[0]; // 94;
+  const int mnc_digit_len = rrc->configuration.mnc_digit_length[0]; // 2;
+  const int nb_id = rrc->configuration.cell_identity; //42;
+  sm_io_ag_t io = {.read = read_RAN, .write = write_RAN};
+
+  printf("[E2 NODE]: mcc = %d mnc = %d mnc_digit = %d nd_id = %d \n", mcc, mnc, mnc_digit_len, nb_id);
+
+  init_agent_api( mcc, mnc, mnc_digit_len, nb_id, io);
+//////////////////////////////////
+//////////////////////////////////
+
   if (NFAPI_MODE==NFAPI_MODE_PNF) {
     wait_nfapi_init("main?");
   }