diff --git a/config/obsw_config.py b/config/obsw_config.py
index 9b47d40629bf8dbea1feadbcc9609421aab72ab4..99955e7cbd8e4c0ceb8adce49c9a1acfa4dcc592 100644
--- a/config/obsw_config.py
+++ b/config/obsw_config.py
@@ -199,3 +199,11 @@ def get_glob_com_if():
     global G_COM_IF
     return G_COM_IF
 
+def set_glob_mode(new_mode : ModeList):
+    global G_MODE_ID
+    G_MODE_ID = new_mode
+
+def get_glob_mode():
+    global G_MODE_ID
+    return G_MODE_ID
+
diff --git a/core/tmtc_client_core.py b/core/tmtc_client_core.py
index bbf060f1ec6757a360a5af938fd3aa3b9afdf687..3508f4e34a82ba5d51ab95b996b810c32af2473f 100755
--- a/core/tmtc_client_core.py
+++ b/core/tmtc_client_core.py
@@ -46,7 +46,7 @@ def run_tmtc_client(use_gui: bool, reduced_printout: bool = False):
 
     if not use_gui:
         # The global variables are set by the argument parser.
-        tmtc_handler = TmTcHandler(g.G_COM_IF, g.G_MODE_ID)
+        tmtc_handler = TmTcHandler(g.get_glob_com_if(), g.get_glob_mode())
         tmtc_handler.set_one_shot_or_loop_handling(g.G_LISTENER_AFTER_OP)
         tmtc_handler.initialize()
         tmtc_handler.start()