From 5b6068bca2d8ab3d634f632c4a39a65099c1ee10 Mon Sep 17 00:00:00 2001 From: Adrien Martin Date: Tue, 19 May 2026 17:52:26 +0200 Subject: [PATCH 1/3] Add diagnostic interval to wm-node-conf Signed-off-by: Adrien Martin --- .../wirepas_gateway/configure_node.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/python_transport/wirepas_gateway/configure_node.py b/python_transport/wirepas_gateway/configure_node.py index 2c73c420..7dfd1c0f 100755 --- a/python_transport/wirepas_gateway/configure_node.py +++ b/python_transport/wirepas_gateway/configure_node.py @@ -143,6 +143,7 @@ def configure( start=None, authentication_key=None, cipher_key=None, + diag_interval=None, ): sink = self.sink_manager.get_sink(sink_name) if sink is None: @@ -165,6 +166,11 @@ def configure( config["cipher_key"] = cipher_key if authentication_key is not None: config["authentication_key"] = authentication_key + if diag_interval is not None: + seq, diag, data = sink.proxy.GetAppConfig() + config["app_config_seq"] = seq + config["app_config_diag"] = diag_interval + config["app_config_data"] = bytearray(data) ret = sink.write_config(config) print("Configuration done with result = {}".format(ret)) @@ -337,6 +343,16 @@ def main(): help="Start the sink after configuration", ) + parser.add_argument( + "-d", + "--diag_interval", + type=int_type, + default=get_default_value_from_env("WM_CN_DIAGNOSTIC_INTERVAL"), + help="Diagnostic interval in network expressed in seconds. " + "Ex: -d 60 " + "Note: Value should be one of [0, 30, 60, 120, 300, 600, 1800]. Value 0 means that no diagnostic will be sent.", + ) + args = parser.parse_args() sink_configurator = SinkConfigurator() @@ -354,6 +370,7 @@ def main(): start=args.start, authentication_key=args.authentication_key, cipher_key=args.cipher_key, + diag_interval=args.diag_interval, ) From bd965651194f73897ff418639d517a9f9562f98d Mon Sep 17 00:00:00 2001 From: Adrien Martin Date: Thu, 21 May 2026 09:34:34 +0200 Subject: [PATCH 2/3] Do not store ignored value Signed-off-by: Adrien Martin --- python_transport/wirepas_gateway/configure_node.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python_transport/wirepas_gateway/configure_node.py b/python_transport/wirepas_gateway/configure_node.py index 7dfd1c0f..2c6b9e68 100755 --- a/python_transport/wirepas_gateway/configure_node.py +++ b/python_transport/wirepas_gateway/configure_node.py @@ -167,7 +167,7 @@ def configure( if authentication_key is not None: config["authentication_key"] = authentication_key if diag_interval is not None: - seq, diag, data = sink.proxy.GetAppConfig() + seq, _, data = sink.proxy.GetAppConfig() config["app_config_seq"] = seq config["app_config_diag"] = diag_interval config["app_config_data"] = bytearray(data) From e04b5db5f886d2623e111f07832319d8dad129e3 Mon Sep 17 00:00:00 2001 From: Adrien Martin Date: Thu, 21 May 2026 15:27:29 +0200 Subject: [PATCH 3/3] Cut line in two ! Signed-off-by: Adrien Martin --- python_transport/wirepas_gateway/configure_node.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python_transport/wirepas_gateway/configure_node.py b/python_transport/wirepas_gateway/configure_node.py index 2c6b9e68..954e32c2 100755 --- a/python_transport/wirepas_gateway/configure_node.py +++ b/python_transport/wirepas_gateway/configure_node.py @@ -350,7 +350,8 @@ def main(): default=get_default_value_from_env("WM_CN_DIAGNOSTIC_INTERVAL"), help="Diagnostic interval in network expressed in seconds. " "Ex: -d 60 " - "Note: Value should be one of [0, 30, 60, 120, 300, 600, 1800]. Value 0 means that no diagnostic will be sent.", + "Note: Value should be one of [0, 30, 60, 120, 300, 600, 1800]. " + "Value 0 means that no diagnostic will be sent.", ) args = parser.parse_args()