Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify warning message when setting channel PSK during meshtastic --ch-add #507

Closed
rcarteraz opened this issue Mar 16, 2024 · 1 comment · Fixed by #508
Closed

Clarify warning message when setting channel PSK during meshtastic --ch-add #507

rcarteraz opened this issue Mar 16, 2024 · 1 comment · Fixed by #508
Labels
good first issue Good for newcomers help wanted Extra attention is needed

Comments

@rcarteraz
Copy link
Member

When running meshtastic --ch-add <channel_name> --ch-set psk random the channel is added successfully, but it prints a warning:

Connected to radio
Writing modified channels to device
Warning: Need to specify '--ch-index'.

This warning is confusing because the channel is still added and the PSK is set correctly, despite the message implying that --ch-index is required.

Suggested Improvement:

Update the warning message to provide more clarity on the expected behavior when setting the channel PSK during --ch-add. For example:

Warning: '--ch-index' not specified. Channel added with the next available index.

Or, consider removing the warning entirely if the command executes successfully without requiring --ch-index when setting the PSK.

Additional Notes:

  • The current behavior is not a bug, but the warning message is misleading and can cause confusion.
  • Improving the warning message or removing it altogether would enhance the user experience and clarity of the command.
  • If a specific channel index is desired, users can still specify it using --ch-index.
@ianmcorvidae
Copy link
Contributor

The fix I put up is slightly different -- it instead makes --ch-index and --ch-add incompatible, so that after adding a channel, the CLI can set the channel index to that of the newly added channel, and then allow modifying that channel further. To do this without the change would require knowing what index the new channel will be added at, and without the incompatibility can do the nonintuitive thing of adding one channel and then modifying a different one, so I think it's better that way, but obviously open to ideas. With --ch-add and --ch-index incompatible, though, I think the error message is fine as-is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
3 participants