From 69ad8250fe490e6fb17789e903343b47e43fdfcb Mon Sep 17 00:00:00 2001 From: Florent Date: Mon, 16 Feb 2026 14:12:37 -0400 Subject: [PATCH] add an error when serial connexion is not made to suggest trying -r --- src/meshcore_cli/meshcore_cli.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/meshcore_cli/meshcore_cli.py b/src/meshcore_cli/meshcore_cli.py index 68cb611..f3b0d1c 100644 --- a/src/meshcore_cli/meshcore_cli.py +++ b/src/meshcore_cli/meshcore_cli.py @@ -4436,6 +4436,8 @@ async def main(argv): mc = await MeshCore.create_tcp(host=hostname, port=port, debug=debug, only_error=json_output) elif not serial_port is None : # connect via serial port mc = await MeshCore.create_serial(port=serial_port, baudrate=baudrate, debug=debug, only_error=json_output) + if mc is None: # did not connect + logger.error("To connect to a repeater, use -r option.") elif BLEAK_AVAILABLE : # connect via ble client = None if device or address and len(address.split(":")) == 6 :