From bf904c69068bfc2c4b544673e48a74e3d8b08a2f Mon Sep 17 00:00:00 2001 From: DJ Holt Date: Mon, 16 Sep 2024 23:24:03 -0600 Subject: [PATCH] Allow port number to be specified with tcp hostname --- meshtastic/__main__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/meshtastic/__main__.py b/meshtastic/__main__.py index 02d9abc..8aff798 100644 --- a/meshtastic/__main__.py +++ b/meshtastic/__main__.py @@ -1155,8 +1155,14 @@ def common(): ) elif args.host: try: + if ":" in args.host: + tcp_hostname, tcp_port = args.host.split(':') + else: + tcp_hostname = args.host + tcp_port = 4403 client = meshtastic.tcp_interface.TCPInterface( - args.host, + tcp_hostname, + portNumber=tcp_port, debugOut=logfile, noProto=args.noproto, noNodes=args.no_nodes,