From 5f7c3a1a48eaec7b3f432ffb8ec2ce37d5b3dd88 Mon Sep 17 00:00:00 2001 From: Louis Arge Date: Mon, 16 Mar 2026 05:32:57 -0600 Subject: [PATCH 1/3] fix: make nodes & connections instance level instead of class level (shared by all instances) --- synapse/client/config.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/synapse/client/config.py b/synapse/client/config.py index afb68dc..168000c 100644 --- a/synapse/client/config.py +++ b/synapse/client/config.py @@ -4,11 +4,9 @@ class Config(object): - nodes = [] - connections = [] - def __init__(self): - pass + self.nodes = [] + self.connections = [] def _gen_node_id(self): return len(self.nodes) + 1 From f5cb6e99276b3bd88f2c2b5cf010a6d3c359f839 Mon Sep 17 00:00:00 2001 From: Louis Arge Date: Mon, 16 Mar 2026 05:33:29 -0600 Subject: [PATCH 2/3] fix: validate that name and serial do not contain spaces, since it'll break discoverability --- synapse/server/entrypoint.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/synapse/server/entrypoint.py b/synapse/server/entrypoint.py index 0511fa6..99b5037 100644 --- a/synapse/server/entrypoint.py +++ b/synapse/server/entrypoint.py @@ -63,6 +63,13 @@ def main( ) args = parser.parse_args() + # if these contain spaces, the discovery will fail because the broadcast + # packet is parsed with str.split() in discover.py and each space marks a new token + if " " in args.name: + parser.error("--name must not contain spaces") + if " " in args.serial: + parser.error("--serial must not contain spaces") + init_logging(level=logging.DEBUG if args.verbose else logging.INFO) # verify that network interface is real From 58880f15a3b4e982041021091ce2cd80e8462665 Mon Sep 17 00:00:00 2001 From: Louis Arge Date: Mon, 16 Mar 2026 05:55:29 -0600 Subject: [PATCH 3/3] fix: simulator broadbandsource was dropping frames < 100hz --- synapse/simulator/nodes/broadband_source.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/synapse/simulator/nodes/broadband_source.py b/synapse/simulator/nodes/broadband_source.py index bbe4deb..b2e3ebe 100644 --- a/synapse/simulator/nodes/broadband_source.py +++ b/synapse/simulator/nodes/broadband_source.py @@ -78,6 +78,9 @@ async def run(self): now = time.time_ns() elapsed_ns = now - t_last_ns n_samples = int(sample_rate_hz * elapsed_ns / 1e9) + if n_samples == 0: + continue + samples = [[ch.id, [r_sample(bit_width) for _ in range(n_samples)]] for ch in channels] try: @@ -105,7 +108,7 @@ async def run(self): except Exception as e: self.logger.error(f"Error sending data: {e}") - t_last_ns = now + t_last_ns += int(n_samples * 1e9 / sample_rate_hz) except Exception as e: print(f"Error sending data: {e}")