Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions meshtastic/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1245,6 +1245,19 @@ def common():
noProto=args.noproto,
noNodes=args.no_nodes,
)
except FileNotFoundError:
# Handle the case where the serial device is not found
message = (
f"File Not Found Error:\n"
)
message += f" The serial device at '{args.port}' was not found.\n"
message += " Please check the following:\n"
message += " 1. Is the device connected properly?\n"
message += " 2. Is the correct serial port specified?\n"
message += " 3. Are the necessary drivers installed?\n"
message += " 4. Are you using a **power-only USB cable**? A power-only cable cannot transmit data.\n"
message += " Ensure you are using a **data-capable USB cable**.\n"
meshtastic.util.our_exit(message, 1)
except PermissionError as ex:
username = os.getlogin()
message = "Permission Error:\n"
Expand Down
Loading